From cefd0daba954c7ae337f0485147e5294581f71d3 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Tue, 17 Dec 2024 20:54:26 +0000 Subject: [PATCH 1/2] chore!: promote AnalyticsAdmin to v2 --- .repo-metadata-full.json | 4 +- AnalyticsAdmin/.OwlBot.yaml | 2 +- AnalyticsAdmin/README.md | 5 +- AnalyticsAdmin/owlbot.py | 62 +- .../src/V1alpha/AccessBetweenFilter.php | 4 +- AnalyticsAdmin/src/V1alpha/AccessBinding.php | 2 +- .../src/V1alpha/AccessDateRange.php | 4 +- .../src/V1alpha/AccessDimension.php | 2 +- .../src/V1alpha/AccessDimensionHeader.php | 2 +- .../src/V1alpha/AccessDimensionValue.php | 2 +- AnalyticsAdmin/src/V1alpha/AccessFilter.php | 2 +- .../src/V1alpha/AccessInListFilter.php | 2 +- AnalyticsAdmin/src/V1alpha/AccessMetric.php | 2 +- .../src/V1alpha/AccessMetricHeader.php | 2 +- .../src/V1alpha/AccessMetricValue.php | 2 +- .../src/V1alpha/AccessNumericFilter.php | 4 +- .../V1alpha/AccessNumericFilter/Operation.php | 2 - .../V1alpha/AccessNumericFilter_Operation.php | 16 - AnalyticsAdmin/src/V1alpha/AccessOrderBy.php | 2 +- .../AccessOrderBy/DimensionOrderBy.php | 6 +- .../DimensionOrderBy/OrderType.php | 2 - .../V1alpha/AccessOrderBy/MetricOrderBy.php | 4 +- .../AccessOrderBy_DimensionOrderBy.php | 16 - ...cessOrderBy_DimensionOrderBy_OrderType.php | 16 - .../V1alpha/AccessOrderBy_MetricOrderBy.php | 16 - AnalyticsAdmin/src/V1alpha/AccessQuota.php | 10 +- .../src/V1alpha/AccessQuotaStatus.php | 4 +- .../src/V1alpha/AccessStringFilter.php | 6 +- .../V1alpha/AccessStringFilter/MatchType.php | 2 - .../V1alpha/AccessStringFilter_MatchType.php | 16 - AnalyticsAdmin/src/V1alpha/Account.php | 14 +- AnalyticsAdmin/src/V1alpha/AccountSummary.php | 6 +- .../AcknowledgeUserDataCollectionRequest.php | 4 +- AnalyticsAdmin/src/V1alpha/AdSenseLink.php | 4 +- .../V1alpha/AnalyticsAdminServiceClient.php | 36 - .../AnalyticsAdminServiceGrpcClient.php | 1968 --- .../src/V1alpha/AndroidAppDataStream.php | 277 - ...yVideo360AdvertiserLinkProposalRequest.php | 2 +- ...Video360AdvertiserLinkProposalResponse.php | 2 +- .../src/V1alpha/ArchiveAudienceRequest.php | 2 +- .../V1alpha/ArchiveCustomDimensionRequest.php | 2 +- .../V1alpha/ArchiveCustomMetricRequest.php | 2 +- .../src/V1alpha/AttributionSettings.php | 10 +- ...quisitionConversionEventLookbackWindow.php | 2 - .../AdsWebConversionDataExportScope.php | 2 - .../OtherConversionEventLookbackWindow.php | 2 - .../ReportingAttributionModel.php | 2 - ...quisitionConversionEventLookbackWindow.php | 16 - ...ngs_OtherConversionEventLookbackWindow.php | 16 - ...tionSettings_ReportingAttributionModel.php | 16 - AnalyticsAdmin/src/V1alpha/Audience.php | 16 +- .../AudienceExclusionDurationMode.php | 2 - .../AudienceDimensionOrMetricFilter.php | 6 +- .../BetweenFilter.php | 6 +- .../InListFilter.php | 4 +- .../NumericFilter.php | 6 +- .../NumericFilter/Operation.php | 2 - .../NumericValue.php | 2 - .../StringFilter.php | 8 +- .../StringFilter/MatchType.php | 2 - ...eDimensionOrMetricFilter_BetweenFilter.php | 16 - ...ceDimensionOrMetricFilter_InListFilter.php | 16 - ...eDimensionOrMetricFilter_NumericFilter.php | 16 - ...OrMetricFilter_NumericFilter_Operation.php | 16 - ...ceDimensionOrMetricFilter_NumericValue.php | 16 - ...ceDimensionOrMetricFilter_StringFilter.php | 16 - ...nOrMetricFilter_StringFilter_MatchType.php | 16 - .../src/V1alpha/AudienceEventFilter.php | 4 +- .../src/V1alpha/AudienceEventTrigger.php | 4 +- .../AudienceEventTrigger/LogCondition.php | 2 - .../AudienceEventTrigger_LogCondition.php | 16 - .../src/V1alpha/AudienceFilterClause.php | 2 +- .../AudienceClauseType.php | 2 - ...udienceFilterClause_AudienceClauseType.php | 16 - .../src/V1alpha/AudienceSequenceFilter.php | 4 +- .../AudienceSequenceStep.php | 10 +- ...nceSequenceFilter_AudienceSequenceStep.php | 16 - .../src/V1alpha/AudienceSimpleFilter.php | 4 +- ...Audience_AudienceExclusionDurationMode.php | 16 - AnalyticsAdmin/src/V1alpha/AuditUserLink.php | 189 - .../src/V1alpha/AuditUserLinksRequest.php | 159 - .../src/V1alpha/AuditUserLinksResponse.php | 109 - .../BatchCreateAccessBindingsRequest.php | 2 +- .../V1alpha/BatchCreateUserLinksRequest.php | 159 - .../V1alpha/BatchCreateUserLinksResponse.php | 67 - .../BatchDeleteAccessBindingsRequest.php | 2 +- .../V1alpha/BatchDeleteUserLinksRequest.php | 117 - .../V1alpha/BatchGetAccessBindingsRequest.php | 2 +- .../src/V1alpha/BatchGetUserLinksRequest.php | 121 - .../src/V1alpha/BatchGetUserLinksResponse.php | 67 - .../BatchUpdateAccessBindingsRequest.php | 2 +- .../V1alpha/BatchUpdateUserLinksRequest.php | 117 - .../V1alpha/BatchUpdateUserLinksResponse.php | 67 - AnalyticsAdmin/src/V1alpha/BigQueryLink.php | 16 +- .../src/V1alpha/CalculatedMetric.php | 14 +- .../V1alpha/CalculatedMetric/MetricUnit.php | 2 - .../CalculatedMetric/RestrictedMetricType.php | 2 - ...yVideo360AdvertiserLinkProposalRequest.php | 2 +- .../src/V1alpha/ChangeHistoryChange.php | 8 +- .../ChangeHistoryResource.php | 2 - ...ngeHistoryChange_ChangeHistoryResource.php | 16 - .../src/V1alpha/ChangeHistoryEvent.php | 10 +- AnalyticsAdmin/src/V1alpha/ChannelGroup.php | 10 +- .../src/V1alpha/ChannelGroupFilter.php | 2 +- .../ChannelGroupFilter/InListFilter.php | 2 - .../ChannelGroupFilter/StringFilter.php | 6 +- .../StringFilter/MatchType.php | 2 - .../ChannelGroupFilter_InListFilter.php | 16 - .../ChannelGroupFilter_StringFilter.php | 16 - ...nnelGroupFilter_StringFilter_MatchType.php | 16 - .../Client/AnalyticsAdminServiceClient.php | 474 +- .../src/V1alpha/ConnectedSiteTag.php | 4 +- .../src/V1alpha/ConversionEvent.php | 14 +- .../ConversionCountingMethod.php | 2 - .../DefaultConversionValue.php | 6 +- .../src/V1alpha/ConversionValues.php | 8 +- .../V1alpha/CreateAccessBindingRequest.php | 4 +- .../src/V1alpha/CreateAdSenseLinkRequest.php | 4 +- .../CreateAndroidAppDataStreamRequest.php | 115 - .../src/V1alpha/CreateAudienceRequest.php | 4 +- .../src/V1alpha/CreateBigQueryLinkRequest.php | 4 +- .../V1alpha/CreateCalculatedMetricRequest.php | 6 +- .../src/V1alpha/CreateChannelGroupRequest.php | 4 +- .../V1alpha/CreateConnectedSiteTagRequest.php | 4 +- .../V1alpha/CreateConversionEventRequest.php | 4 +- .../V1alpha/CreateCustomDimensionRequest.php | 4 +- .../src/V1alpha/CreateCustomMetricRequest.php | 4 +- .../src/V1alpha/CreateDataStreamRequest.php | 4 +- ...yVideo360AdvertiserLinkProposalRequest.php | 4 +- ...teDisplayVideo360AdvertiserLinkRequest.php | 4 +- .../V1alpha/CreateEventCreateRuleRequest.php | 4 +- .../V1alpha/CreateEventEditRuleRequest.php | 4 +- .../V1alpha/CreateExpandedDataSetRequest.php | 4 +- .../src/V1alpha/CreateFirebaseLinkRequest.php | 4 +- .../V1alpha/CreateGoogleAdsLinkRequest.php | 4 +- .../V1alpha/CreateIosAppDataStreamRequest.php | 115 - .../src/V1alpha/CreateKeyEventRequest.php | 4 +- ...CreateMeasurementProtocolSecretRequest.php | 4 +- .../src/V1alpha/CreatePropertyRequest.php | 2 +- .../V1alpha/CreateRollupPropertyRequest.php | 2 +- .../V1alpha/CreateRollupPropertyResponse.php | 2 +- .../CreateRollupPropertySourceLinkRequest.php | 4 +- ...KAdNetworkConversionValueSchemaRequest.php | 4 +- .../V1alpha/CreateSearchAds360LinkRequest.php | 4 +- .../CreateSubpropertyEventFilterRequest.php | 4 +- .../src/V1alpha/CreateSubpropertyRequest.php | 163 - .../src/V1alpha/CreateSubpropertyResponse.php | 121 - .../src/V1alpha/CreateUserLinkRequest.php | 155 - .../V1alpha/CreateWebDataStreamRequest.php | 115 - .../src/V1alpha/CustomDimension.php | 12 +- .../CustomDimension/DimensionScope.php | 2 - .../CustomDimension_DimensionScope.php | 16 - AnalyticsAdmin/src/V1alpha/CustomMetric.php | 12 +- .../V1alpha/CustomMetric/MeasurementUnit.php | 2 - .../src/V1alpha/CustomMetric/MetricScope.php | 2 - .../CustomMetric/RestrictedMetricType.php | 2 - .../V1alpha/CustomMetric_MeasurementUnit.php | 16 - .../src/V1alpha/CustomMetric_MetricScope.php | 16 - .../CustomMetric_RestrictedMetricType.php | 16 - .../src/V1alpha/DataRedactionSettings.php | 6 +- .../src/V1alpha/DataRetentionSettings.php | 6 +- .../RetentionDuration.php | 2 - ...ataRetentionSettings_RetentionDuration.php | 16 - .../src/V1alpha/DataSharingSettings.php | 12 +- AnalyticsAdmin/src/V1alpha/DataStream.php | 10 +- .../DataStream/AndroidAppStreamData.php | 6 +- .../src/V1alpha/DataStream/DataStreamType.php | 2 - .../V1alpha/DataStream/IosAppStreamData.php | 6 +- .../src/V1alpha/DataStream/WebStreamData.php | 8 +- .../DataStream_AndroidAppStreamData.php | 16 - .../src/V1alpha/DataStream_DataStreamType.php | 16 - .../V1alpha/DataStream_IosAppStreamData.php | 16 - .../src/V1alpha/DataStream_WebStreamData.php | 16 - .../V1alpha/DeleteAccessBindingRequest.php | 2 +- .../src/V1alpha/DeleteAccountRequest.php | 2 +- .../src/V1alpha/DeleteAdSenseLinkRequest.php | 2 +- .../DeleteAndroidAppDataStreamRequest.php | 75 - .../src/V1alpha/DeleteBigQueryLinkRequest.php | 2 +- .../V1alpha/DeleteCalculatedMetricRequest.php | 2 +- .../src/V1alpha/DeleteChannelGroupRequest.php | 2 +- .../V1alpha/DeleteConnectedSiteTagRequest.php | 4 +- .../V1alpha/DeleteConversionEventRequest.php | 2 +- .../src/V1alpha/DeleteDataStreamRequest.php | 2 +- ...yVideo360AdvertiserLinkProposalRequest.php | 2 +- ...teDisplayVideo360AdvertiserLinkRequest.php | 2 +- .../V1alpha/DeleteEventCreateRuleRequest.php | 2 +- .../V1alpha/DeleteEventEditRuleRequest.php | 2 +- .../V1alpha/DeleteExpandedDataSetRequest.php | 2 +- .../src/V1alpha/DeleteFirebaseLinkRequest.php | 2 +- .../V1alpha/DeleteGoogleAdsLinkRequest.php | 2 +- .../V1alpha/DeleteIosAppDataStreamRequest.php | 75 - .../src/V1alpha/DeleteKeyEventRequest.php | 2 +- ...DeleteMeasurementProtocolSecretRequest.php | 2 +- .../src/V1alpha/DeletePropertyRequest.php | 2 +- .../DeleteRollupPropertySourceLinkRequest.php | 2 +- ...KAdNetworkConversionValueSchemaRequest.php | 2 +- .../V1alpha/DeleteSearchAds360LinkRequest.php | 2 +- .../DeleteSubpropertyEventFilterRequest.php | 2 +- .../src/V1alpha/DeleteUserLinkRequest.php | 67 - .../V1alpha/DeleteWebDataStreamRequest.php | 75 - .../V1alpha/DisplayVideo360AdvertiserLink.php | 24 +- .../DisplayVideo360AdvertiserLinkProposal.php | 28 +- .../V1alpha/EnhancedMeasurementSettings.php | 22 +- .../src/V1alpha/EventCreateRule.php | 6 +- AnalyticsAdmin/src/V1alpha/EventEditRule.php | 6 +- AnalyticsAdmin/src/V1alpha/EventMapping.php | 10 +- .../src/V1alpha/ExpandedDataSet.php | 10 +- .../src/V1alpha/ExpandedDataSetFilter.php | 2 +- .../ExpandedDataSetFilter/InListFilter.php | 4 +- .../ExpandedDataSetFilter/StringFilter.php | 8 +- .../StringFilter/MatchType.php | 2 - .../ExpandedDataSetFilter_InListFilter.php | 16 - .../ExpandedDataSetFilter_StringFilter.php | 16 - ...edDataSetFilter_StringFilter_MatchType.php | 16 - ...AutomatedGa4ConfigurationOptOutRequest.php | 2 +- ...utomatedGa4ConfigurationOptOutResponse.php | 2 +- .../FetchConnectedGa4PropertyRequest.php | 2 +- .../FetchConnectedGa4PropertyResponse.php | 2 +- AnalyticsAdmin/src/V1alpha/FirebaseLink.php | 6 +- .../AnalyticsAdminServiceGapicClient.php | 9215 -------------- .../src/V1alpha/GetAccessBindingRequest.php | 2 +- .../src/V1alpha/GetAccountRequest.php | 2 +- .../src/V1alpha/GetAdSenseLinkRequest.php | 2 +- .../GetAndroidAppDataStreamRequest.php | 75 - .../V1alpha/GetAttributionSettingsRequest.php | 2 +- .../src/V1alpha/GetAudienceRequest.php | 2 +- .../src/V1alpha/GetBigQueryLinkRequest.php | 2 +- .../V1alpha/GetCalculatedMetricRequest.php | 2 +- .../src/V1alpha/GetChannelGroupRequest.php | 2 +- .../src/V1alpha/GetConversionEventRequest.php | 2 +- .../src/V1alpha/GetCustomDimensionRequest.php | 2 +- .../src/V1alpha/GetCustomMetricRequest.php | 2 +- .../GetDataRedactionSettingsRequest.php | 2 +- .../GetDataRetentionSettingsRequest.php | 2 +- .../V1alpha/GetDataSharingSettingsRequest.php | 2 +- .../src/V1alpha/GetDataStreamRequest.php | 2 +- ...yVideo360AdvertiserLinkProposalRequest.php | 2 +- ...etDisplayVideo360AdvertiserLinkRequest.php | 2 +- .../GetEnhancedMeasurementSettingsRequest.php | 2 +- .../src/V1alpha/GetEventCreateRuleRequest.php | 2 +- .../src/V1alpha/GetEventEditRuleRequest.php | 2 +- .../src/V1alpha/GetExpandedDataSetRequest.php | 2 +- .../src/V1alpha/GetGlobalSiteTagRequest.php | 2 +- .../GetGoogleSignalsSettingsRequest.php | 2 +- .../V1alpha/GetIosAppDataStreamRequest.php | 75 - .../src/V1alpha/GetKeyEventRequest.php | 2 +- .../GetMeasurementProtocolSecretRequest.php | 2 +- .../src/V1alpha/GetPropertyRequest.php | 2 +- .../GetRollupPropertySourceLinkRequest.php | 2 +- ...KAdNetworkConversionValueSchemaRequest.php | 2 +- .../V1alpha/GetSearchAds360LinkRequest.php | 2 +- .../GetSubpropertyEventFilterRequest.php | 2 +- .../src/V1alpha/GetUserLinkRequest.php | 67 - .../src/V1alpha/GetWebDataStreamRequest.php | 75 - AnalyticsAdmin/src/V1alpha/GlobalSiteTag.php | 4 +- AnalyticsAdmin/src/V1alpha/GoogleAdsLink.php | 18 +- .../src/V1alpha/GoogleSignalsSettings.php | 6 +- AnalyticsAdmin/src/V1alpha/GroupingRule.php | 4 +- .../src/V1alpha/IosAppDataStream.php | 277 - AnalyticsAdmin/src/V1alpha/KeyEvent.php | 14 +- .../src/V1alpha/KeyEvent/CountingMethod.php | 2 - .../src/V1alpha/KeyEvent/DefaultValue.php | 6 +- .../src/V1alpha/LinkProposalStatusDetails.php | 6 +- .../src/V1alpha/ListAccessBindingsRequest.php | 6 +- .../V1alpha/ListAccessBindingsResponse.php | 2 +- .../V1alpha/ListAccountSummariesRequest.php | 4 +- .../V1alpha/ListAccountSummariesResponse.php | 2 +- .../src/V1alpha/ListAccountsRequest.php | 6 +- .../src/V1alpha/ListAccountsResponse.php | 2 +- .../src/V1alpha/ListAdSenseLinksRequest.php | 6 +- .../src/V1alpha/ListAdSenseLinksResponse.php | 2 +- .../ListAndroidAppDataStreamsRequest.php | 167 - .../ListAndroidAppDataStreamsResponse.php | 105 - .../src/V1alpha/ListAudiencesRequest.php | 6 +- .../src/V1alpha/ListAudiencesResponse.php | 2 +- .../src/V1alpha/ListBigQueryLinksRequest.php | 6 +- .../src/V1alpha/ListBigQueryLinksResponse.php | 2 +- .../V1alpha/ListCalculatedMetricsRequest.php | 6 +- .../V1alpha/ListCalculatedMetricsResponse.php | 2 +- .../src/V1alpha/ListChannelGroupsRequest.php | 6 +- .../src/V1alpha/ListChannelGroupsResponse.php | 2 +- .../V1alpha/ListConnectedSiteTagsRequest.php | 2 +- .../V1alpha/ListConversionEventsRequest.php | 6 +- .../V1alpha/ListConversionEventsResponse.php | 2 +- .../V1alpha/ListCustomDimensionsRequest.php | 6 +- .../V1alpha/ListCustomDimensionsResponse.php | 2 +- .../src/V1alpha/ListCustomMetricsRequest.php | 6 +- .../src/V1alpha/ListCustomMetricsResponse.php | 2 +- .../src/V1alpha/ListDataStreamsRequest.php | 6 +- .../src/V1alpha/ListDataStreamsResponse.php | 2 +- ...Video360AdvertiserLinkProposalsRequest.php | 6 +- ...ideo360AdvertiserLinkProposalsResponse.php | 2 +- ...tDisplayVideo360AdvertiserLinksRequest.php | 6 +- ...DisplayVideo360AdvertiserLinksResponse.php | 2 +- .../V1alpha/ListEventCreateRulesRequest.php | 6 +- .../V1alpha/ListEventCreateRulesResponse.php | 2 +- .../src/V1alpha/ListEventEditRulesRequest.php | 6 +- .../V1alpha/ListEventEditRulesResponse.php | 2 +- .../V1alpha/ListExpandedDataSetsRequest.php | 6 +- .../V1alpha/ListExpandedDataSetsResponse.php | 2 +- .../src/V1alpha/ListFirebaseLinksRequest.php | 6 +- .../src/V1alpha/ListFirebaseLinksResponse.php | 2 +- .../src/V1alpha/ListGoogleAdsLinksRequest.php | 6 +- .../V1alpha/ListGoogleAdsLinksResponse.php | 2 +- .../V1alpha/ListIosAppDataStreamsRequest.php | 163 - .../V1alpha/ListIosAppDataStreamsResponse.php | 105 - .../src/V1alpha/ListKeyEventsRequest.php | 6 +- .../src/V1alpha/ListKeyEventsResponse.php | 2 +- .../ListMeasurementProtocolSecretsRequest.php | 6 +- ...ListMeasurementProtocolSecretsResponse.php | 2 +- .../src/V1alpha/ListPropertiesRequest.php | 8 +- .../src/V1alpha/ListPropertiesResponse.php | 2 +- .../ListRollupPropertySourceLinksRequest.php | 6 +- .../ListRollupPropertySourceLinksResponse.php | 2 +- ...AdNetworkConversionValueSchemasRequest.php | 6 +- ...dNetworkConversionValueSchemasResponse.php | 2 +- .../V1alpha/ListSearchAds360LinksRequest.php | 6 +- .../V1alpha/ListSearchAds360LinksResponse.php | 2 +- .../ListSubpropertyEventFiltersRequest.php | 6 +- .../ListSubpropertyEventFiltersResponse.php | 2 +- .../src/V1alpha/ListUserLinksRequest.php | 159 - .../src/V1alpha/ListUserLinksResponse.php | 105 - .../src/V1alpha/ListWebDataStreamsRequest.php | 163 - .../V1alpha/ListWebDataStreamsResponse.php | 105 - .../src/V1alpha/MatchingCondition.php | 8 +- .../MatchingCondition/ComparisonType.php | 2 - .../MatchingCondition_ComparisonType.php | 16 - .../src/V1alpha/MaximumUserAccess.php | 78 - .../src/V1alpha/MeasurementProtocolSecret.php | 6 +- .../src/V1alpha/ParameterMutation.php | 4 +- AnalyticsAdmin/src/V1alpha/PostbackWindow.php | 2 +- AnalyticsAdmin/src/V1alpha/Property.php | 26 +- .../src/V1alpha/PropertySummary.php | 8 +- .../V1alpha/ProvisionAccountTicketRequest.php | 4 +- .../ProvisionAccountTicketResponse.php | 2 +- .../V1alpha/ProvisionSubpropertyRequest.php | 4 +- .../V1alpha/ProvisionSubpropertyResponse.php | 4 +- AnalyticsAdmin/src/V1alpha/README.md | 17 - .../V1alpha/ReorderEventEditRulesRequest.php | 2 +- .../src/V1alpha/RollupPropertySourceLink.php | 4 +- .../src/V1alpha/RunAccessReportRequest.php | 18 +- .../src/V1alpha/RunAccessReportResponse.php | 4 +- .../SKAdNetworkConversionValueSchema.php | 10 +- .../src/V1alpha/SearchAds360Link.php | 30 +- .../SearchChangeHistoryEventsRequest.php | 12 +- .../SearchChangeHistoryEventsResponse.php | 2 +- ...AutomatedGa4ConfigurationOptOutRequest.php | 4 +- .../src/V1alpha/SubpropertyEventFilter.php | 4 +- .../V1alpha/SubpropertyEventFilterClause.php | 4 +- .../FilterClauseType.php | 2 - .../SubpropertyEventFilterCondition.php | 2 +- .../StringFilter.php | 8 +- .../StringFilter/MatchType.php | 2 - .../V1alpha/UpdateAccessBindingRequest.php | 2 +- .../src/V1alpha/UpdateAccountRequest.php | 4 +- .../UpdateAndroidAppDataStreamRequest.php | 133 - .../UpdateAttributionSettingsRequest.php | 4 +- .../src/V1alpha/UpdateAudienceRequest.php | 4 +- .../src/V1alpha/UpdateBigQueryLinkRequest.php | 4 +- .../V1alpha/UpdateCalculatedMetricRequest.php | 4 +- .../src/V1alpha/UpdateChannelGroupRequest.php | 4 +- .../V1alpha/UpdateConversionEventRequest.php | 4 +- .../V1alpha/UpdateCustomDimensionRequest.php | 4 +- .../src/V1alpha/UpdateCustomMetricRequest.php | 4 +- .../UpdateDataRedactionSettingsRequest.php | 4 +- .../UpdateDataRetentionSettingsRequest.php | 4 +- .../src/V1alpha/UpdateDataStreamRequest.php | 4 +- ...teDisplayVideo360AdvertiserLinkRequest.php | 4 +- ...dateEnhancedMeasurementSettingsRequest.php | 4 +- .../V1alpha/UpdateEventCreateRuleRequest.php | 4 +- .../V1alpha/UpdateEventEditRuleRequest.php | 4 +- .../V1alpha/UpdateExpandedDataSetRequest.php | 4 +- .../src/V1alpha/UpdateFirebaseLinkRequest.php | 129 - .../V1alpha/UpdateGoogleAdsLinkRequest.php | 4 +- .../UpdateGoogleSignalsSettingsRequest.php | 4 +- .../V1alpha/UpdateIosAppDataStreamRequest.php | 133 - .../src/V1alpha/UpdateKeyEventRequest.php | 4 +- ...UpdateMeasurementProtocolSecretRequest.php | 4 +- .../src/V1alpha/UpdatePropertyRequest.php | 4 +- ...KAdNetworkConversionValueSchemaRequest.php | 4 +- .../V1alpha/UpdateSearchAds360LinkRequest.php | 4 +- .../UpdateSubpropertyEventFilterRequest.php | 4 +- .../src/V1alpha/UpdateUserLinkRequest.php | 77 - .../V1alpha/UpdateWebDataStreamRequest.php | 133 - AnalyticsAdmin/src/V1alpha/UserLink.php | 180 - AnalyticsAdmin/src/V1alpha/WebDataStream.php | 315 - .../src/V1beta/AccessBetweenFilter.php | 4 +- AnalyticsAdmin/src/V1beta/AccessDateRange.php | 4 +- AnalyticsAdmin/src/V1beta/AccessDimension.php | 2 +- .../src/V1beta/AccessDimensionHeader.php | 2 +- .../src/V1beta/AccessDimensionValue.php | 2 +- AnalyticsAdmin/src/V1beta/AccessFilter.php | 2 +- .../src/V1beta/AccessInListFilter.php | 2 +- AnalyticsAdmin/src/V1beta/AccessMetric.php | 2 +- .../src/V1beta/AccessMetricHeader.php | 2 +- .../src/V1beta/AccessMetricValue.php | 2 +- .../src/V1beta/AccessNumericFilter.php | 4 +- .../V1beta/AccessNumericFilter/Operation.php | 2 - AnalyticsAdmin/src/V1beta/AccessOrderBy.php | 2 +- .../V1beta/AccessOrderBy/DimensionOrderBy.php | 6 +- .../DimensionOrderBy/OrderType.php | 2 - .../V1beta/AccessOrderBy/MetricOrderBy.php | 4 +- AnalyticsAdmin/src/V1beta/AccessQuota.php | 10 +- .../src/V1beta/AccessQuotaStatus.php | 4 +- .../src/V1beta/AccessStringFilter.php | 6 +- .../V1beta/AccessStringFilter/MatchType.php | 2 - AnalyticsAdmin/src/V1beta/Account.php | 14 +- AnalyticsAdmin/src/V1beta/AccountSummary.php | 6 +- .../AcknowledgeUserDataCollectionRequest.php | 4 +- .../V1beta/AnalyticsAdminServiceClient.php | 36 - .../V1beta/ArchiveCustomDimensionRequest.php | 2 +- .../src/V1beta/ArchiveCustomMetricRequest.php | 2 +- .../src/V1beta/ChangeHistoryChange.php | 8 +- .../ChangeHistoryResource.php | 2 - .../src/V1beta/ChangeHistoryEvent.php | 10 +- .../Client/AnalyticsAdminServiceClient.php | 127 +- AnalyticsAdmin/src/V1beta/ConversionEvent.php | 14 +- .../ConversionCountingMethod.php | 2 - .../DefaultConversionValue.php | 6 +- .../V1beta/CreateConversionEventRequest.php | 4 +- .../V1beta/CreateCustomDimensionRequest.php | 4 +- .../src/V1beta/CreateCustomMetricRequest.php | 4 +- .../src/V1beta/CreateDataStreamRequest.php | 4 +- .../src/V1beta/CreateFirebaseLinkRequest.php | 4 +- .../src/V1beta/CreateGoogleAdsLinkRequest.php | 4 +- .../src/V1beta/CreateKeyEventRequest.php | 4 +- ...CreateMeasurementProtocolSecretRequest.php | 4 +- .../src/V1beta/CreatePropertyRequest.php | 2 +- AnalyticsAdmin/src/V1beta/CustomDimension.php | 12 +- .../V1beta/CustomDimension/DimensionScope.php | 2 - AnalyticsAdmin/src/V1beta/CustomMetric.php | 12 +- .../V1beta/CustomMetric/MeasurementUnit.php | 2 - .../src/V1beta/CustomMetric/MetricScope.php | 2 - .../CustomMetric/RestrictedMetricType.php | 2 - .../src/V1beta/DataRetentionSettings.php | 6 +- .../RetentionDuration.php | 2 - .../src/V1beta/DataSharingSettings.php | 12 +- AnalyticsAdmin/src/V1beta/DataStream.php | 10 +- .../DataStream/AndroidAppStreamData.php | 6 +- .../src/V1beta/DataStream/DataStreamType.php | 2 - .../V1beta/DataStream/IosAppStreamData.php | 6 +- .../src/V1beta/DataStream/WebStreamData.php | 8 +- .../src/V1beta/DeleteAccountRequest.php | 2 +- .../V1beta/DeleteConversionEventRequest.php | 2 +- .../src/V1beta/DeleteDataStreamRequest.php | 2 +- .../src/V1beta/DeleteFirebaseLinkRequest.php | 2 +- .../src/V1beta/DeleteGoogleAdsLinkRequest.php | 2 +- .../src/V1beta/DeleteKeyEventRequest.php | 2 +- ...DeleteMeasurementProtocolSecretRequest.php | 2 +- .../src/V1beta/DeletePropertyRequest.php | 2 +- AnalyticsAdmin/src/V1beta/FirebaseLink.php | 6 +- .../AnalyticsAdminServiceGapicClient.php | 3678 ------ .../src/V1beta/GetAccountRequest.php | 2 +- .../src/V1beta/GetConversionEventRequest.php | 2 +- .../src/V1beta/GetCustomDimensionRequest.php | 2 +- .../src/V1beta/GetCustomMetricRequest.php | 2 +- .../GetDataRetentionSettingsRequest.php | 2 +- .../V1beta/GetDataSharingSettingsRequest.php | 2 +- .../src/V1beta/GetDataStreamRequest.php | 2 +- .../src/V1beta/GetKeyEventRequest.php | 2 +- .../GetMeasurementProtocolSecretRequest.php | 2 +- .../src/V1beta/GetPropertyRequest.php | 2 +- AnalyticsAdmin/src/V1beta/GoogleAdsLink.php | 18 +- AnalyticsAdmin/src/V1beta/KeyEvent.php | 14 +- .../src/V1beta/KeyEvent/CountingMethod.php | 2 - .../src/V1beta/KeyEvent/DefaultValue.php | 6 +- .../V1beta/ListAccountSummariesRequest.php | 4 +- .../V1beta/ListAccountSummariesResponse.php | 2 +- .../src/V1beta/ListAccountsRequest.php | 6 +- .../src/V1beta/ListAccountsResponse.php | 2 +- .../V1beta/ListConversionEventsRequest.php | 6 +- .../V1beta/ListConversionEventsResponse.php | 2 +- .../V1beta/ListCustomDimensionsRequest.php | 6 +- .../V1beta/ListCustomDimensionsResponse.php | 2 +- .../src/V1beta/ListCustomMetricsRequest.php | 6 +- .../src/V1beta/ListCustomMetricsResponse.php | 2 +- .../src/V1beta/ListDataStreamsRequest.php | 6 +- .../src/V1beta/ListDataStreamsResponse.php | 2 +- .../src/V1beta/ListFirebaseLinksRequest.php | 6 +- .../src/V1beta/ListFirebaseLinksResponse.php | 2 +- .../src/V1beta/ListGoogleAdsLinksRequest.php | 6 +- .../src/V1beta/ListGoogleAdsLinksResponse.php | 2 +- .../src/V1beta/ListKeyEventsRequest.php | 6 +- .../src/V1beta/ListKeyEventsResponse.php | 2 +- .../ListMeasurementProtocolSecretsRequest.php | 6 +- ...ListMeasurementProtocolSecretsResponse.php | 2 +- .../src/V1beta/ListPropertiesRequest.php | 8 +- .../src/V1beta/ListPropertiesResponse.php | 2 +- .../src/V1beta/MeasurementProtocolSecret.php | 6 +- AnalyticsAdmin/src/V1beta/Property.php | 26 +- AnalyticsAdmin/src/V1beta/PropertySummary.php | 8 +- .../V1beta/ProvisionAccountTicketRequest.php | 4 +- .../V1beta/ProvisionAccountTicketResponse.php | 2 +- .../src/V1beta/RunAccessReportRequest.php | 18 +- .../src/V1beta/RunAccessReportResponse.php | 4 +- .../SearchChangeHistoryEventsRequest.php | 12 +- .../SearchChangeHistoryEventsResponse.php | 2 +- .../src/V1beta/UpdateAccountRequest.php | 4 +- .../V1beta/UpdateConversionEventRequest.php | 4 +- .../V1beta/UpdateCustomDimensionRequest.php | 4 +- .../src/V1beta/UpdateCustomMetricRequest.php | 4 +- .../UpdateDataRetentionSettingsRequest.php | 4 +- .../src/V1beta/UpdateDataStreamRequest.php | 4 +- .../src/V1beta/UpdateGoogleAdsLinkRequest.php | 4 +- .../src/V1beta/UpdateKeyEventRequest.php | 4 +- ...UpdateMeasurementProtocolSecretRequest.php | 4 +- .../src/V1beta/UpdatePropertyRequest.php | 4 +- .../AnalyticsAdminServiceClientTest.php | 10132 ---------------- .../AnalyticsAdminServiceClientTest.php | 3685 +++--- .../AnalyticsAdminServiceClientTest.php | 3687 ------ .../AnalyticsAdminServiceClientTest.php | 1252 +- 511 files changed, 4035 insertions(+), 38129 deletions(-) delete mode 100644 AnalyticsAdmin/src/V1alpha/AccessNumericFilter_Operation.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AccessOrderBy_DimensionOrderBy.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AccessOrderBy_DimensionOrderBy_OrderType.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AccessOrderBy_MetricOrderBy.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AccessStringFilter_MatchType.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AnalyticsAdminServiceClient.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AnalyticsAdminServiceGrpcClient.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AndroidAppDataStream.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AttributionSettings_AcquisitionConversionEventLookbackWindow.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AttributionSettings_OtherConversionEventLookbackWindow.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AttributionSettings_ReportingAttributionModel.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_BetweenFilter.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_InListFilter.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_NumericFilter.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_NumericFilter_Operation.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_NumericValue.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_StringFilter.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_StringFilter_MatchType.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceEventTrigger_LogCondition.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceFilterClause_AudienceClauseType.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AudienceSequenceFilter_AudienceSequenceStep.php delete mode 100644 AnalyticsAdmin/src/V1alpha/Audience_AudienceExclusionDurationMode.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AuditUserLink.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AuditUserLinksRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/AuditUserLinksResponse.php delete mode 100644 AnalyticsAdmin/src/V1alpha/BatchCreateUserLinksRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/BatchCreateUserLinksResponse.php delete mode 100644 AnalyticsAdmin/src/V1alpha/BatchDeleteUserLinksRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/BatchGetUserLinksRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/BatchGetUserLinksResponse.php delete mode 100644 AnalyticsAdmin/src/V1alpha/BatchUpdateUserLinksRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/BatchUpdateUserLinksResponse.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ChangeHistoryChange_ChangeHistoryResource.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ChannelGroupFilter_InListFilter.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ChannelGroupFilter_StringFilter.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ChannelGroupFilter_StringFilter_MatchType.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CreateAndroidAppDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CreateIosAppDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CreateSubpropertyRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CreateSubpropertyResponse.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CreateUserLinkRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CreateWebDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CustomDimension_DimensionScope.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CustomMetric_MeasurementUnit.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CustomMetric_MetricScope.php delete mode 100644 AnalyticsAdmin/src/V1alpha/CustomMetric_RestrictedMetricType.php delete mode 100644 AnalyticsAdmin/src/V1alpha/DataRetentionSettings_RetentionDuration.php delete mode 100644 AnalyticsAdmin/src/V1alpha/DataStream_AndroidAppStreamData.php delete mode 100644 AnalyticsAdmin/src/V1alpha/DataStream_DataStreamType.php delete mode 100644 AnalyticsAdmin/src/V1alpha/DataStream_IosAppStreamData.php delete mode 100644 AnalyticsAdmin/src/V1alpha/DataStream_WebStreamData.php delete mode 100644 AnalyticsAdmin/src/V1alpha/DeleteAndroidAppDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/DeleteIosAppDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/DeleteUserLinkRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/DeleteWebDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter_InListFilter.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter_StringFilter.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter_StringFilter_MatchType.php delete mode 100644 AnalyticsAdmin/src/V1alpha/Gapic/AnalyticsAdminServiceGapicClient.php delete mode 100644 AnalyticsAdmin/src/V1alpha/GetAndroidAppDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/GetIosAppDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/GetUserLinkRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/GetWebDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/IosAppDataStream.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ListAndroidAppDataStreamsRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ListAndroidAppDataStreamsResponse.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ListIosAppDataStreamsRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ListIosAppDataStreamsResponse.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ListUserLinksRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ListUserLinksResponse.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ListWebDataStreamsRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/ListWebDataStreamsResponse.php delete mode 100644 AnalyticsAdmin/src/V1alpha/MatchingCondition_ComparisonType.php delete mode 100644 AnalyticsAdmin/src/V1alpha/MaximumUserAccess.php delete mode 100644 AnalyticsAdmin/src/V1alpha/README.md delete mode 100644 AnalyticsAdmin/src/V1alpha/UpdateAndroidAppDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/UpdateFirebaseLinkRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/UpdateIosAppDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/UpdateUserLinkRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/UpdateWebDataStreamRequest.php delete mode 100644 AnalyticsAdmin/src/V1alpha/UserLink.php delete mode 100644 AnalyticsAdmin/src/V1alpha/WebDataStream.php delete mode 100644 AnalyticsAdmin/src/V1beta/AnalyticsAdminServiceClient.php delete mode 100644 AnalyticsAdmin/src/V1beta/Gapic/AnalyticsAdminServiceGapicClient.php delete mode 100644 AnalyticsAdmin/tests/Unit/V1alpha/AnalyticsAdminServiceClientTest.php delete mode 100644 AnalyticsAdmin/tests/Unit/V1beta/AnalyticsAdminServiceClientTest.php diff --git a/.repo-metadata-full.json b/.repo-metadata-full.json index 47293b0e4b2a..5e5cfd4c2d52 100644 --- a/.repo-metadata-full.json +++ b/.repo-metadata-full.json @@ -58,7 +58,7 @@ "AnalyticsAdmin": { "language": "php", "distribution_name": "google/analytics-admin", - "release_level": "preview", + "release_level": "stable", "client_documentation": "https://cloud.google.com/php/docs/reference/analytics-admin/latest", "library_type": "GAPIC_AUTO", "api_shortname": "analyticsadmin" @@ -1599,4 +1599,4 @@ "library_type": "GAPIC_AUTO", "api_shortname": "workflows" } -} +} \ No newline at end of file diff --git a/AnalyticsAdmin/.OwlBot.yaml b/AnalyticsAdmin/.OwlBot.yaml index b82ca65c703f..3ece563f0ac8 100644 --- a/AnalyticsAdmin/.OwlBot.yaml +++ b/AnalyticsAdmin/.OwlBot.yaml @@ -1,4 +1,4 @@ deep-copy-regex: - - source: /google/analytics/admin/(v1alpha|v1beta)/.*-php/(.*) + - source: /google/analytics/admin/(v1beta|v1alpha)/.*-php/(.*) dest: /owl-bot-staging/AnalyticsAdmin/$1/$2 api-name: AnalyticsAdmin diff --git a/AnalyticsAdmin/README.md b/AnalyticsAdmin/README.md index 0715aaca04b1..0638984ae158 100644 --- a/AnalyticsAdmin/README.md +++ b/AnalyticsAdmin/README.md @@ -51,9 +51,8 @@ for more information about the debugging tools. ### Version -This component is considered beta. As such, it should be expected to be mostly -stable and we're working towards a release candidate. We will address issues -and requests with a higher priority. +This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in +any minor or patch releases. We will address issues and requests with the highest priority. ### Next Steps diff --git a/AnalyticsAdmin/owlbot.py b/AnalyticsAdmin/owlbot.py index 1e62d859ebe5..2d9e0f0167c8 100644 --- a/AnalyticsAdmin/owlbot.py +++ b/AnalyticsAdmin/owlbot.py @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,43 +30,27 @@ # Added so that we can pass copy_excludes in the owlbot_main() call _tracked_paths.add(src) -php.owlbot_main( - src=src, - dest=dest, - copy_excludes=[ - src / "**/V1beta/[A-Z]*_*.php", - src / "**/V1beta/*GrpcClient.php", - ] -) +php.owlbot_main(src=src, dest=dest) -# Change the wording for the deprecation warning. +# remove class_alias code s.replace( - 'src/*/*_*.php', - r'will be removed in the next major release', - 'will be removed in a future release') - -### [START] protoc backwards compatibility fixes - -# roll back to private properties. -s.replace( - "src/**/V*/**/*.php", - r"Generated from protobuf field ([^\n]{0,})\n\s{5}\*/\n\s{4}protected \$", - r"""Generated from protobuf field \1 - */ - private $""") - -# Replace "Unwrapped" with "Value" for method names. -s.replace( - "src/**/V*/**/*.php", - r"public function ([s|g]\w{3,})Unwrapped", - r"public function \1Value" -) - -### [END] protoc backwards compatibility fixes - -# fix relative cloud.google.com links -s.replace( - "src/**/V*/**/*.php", - r"(.{0,})\]\((/.{0,})\)", - r"\1](https://cloud.google.com\2)" -) + "src/V*/**/*.php", + r"^// Adding a class alias for backwards compatibility with the previous class name.$" + + "\n" + + r"^class_alias\(.*\);$" + + "\n", + '') + +# format generated clients +subprocess.run([ + 'npm', + 'exec', + '--yes', + '--package=@prettier/plugin-php@^0.16', + '--', + 'prettier', + '**/Client/*', + '--write', + '--parser=php', + '--single-quote', + '--print-width=120']) diff --git a/AnalyticsAdmin/src/V1alpha/AccessBetweenFilter.php b/AnalyticsAdmin/src/V1alpha/AccessBetweenFilter.php index 28d8548248f5..f3eeb73ab73f 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessBetweenFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AccessBetweenFilter.php @@ -20,13 +20,13 @@ class AccessBetweenFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.NumericValue from_value = 1; */ - private $from_value = null; + protected $from_value = null; /** * Ends with this number. * * Generated from protobuf field .google.analytics.admin.v1alpha.NumericValue to_value = 2; */ - private $to_value = null; + protected $to_value = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessBinding.php b/AnalyticsAdmin/src/V1alpha/AccessBinding.php index 3f3e8c84670c..bd42946d1eaf 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessBinding.php +++ b/AnalyticsAdmin/src/V1alpha/AccessBinding.php @@ -24,7 +24,7 @@ class AccessBinding extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * A list of roles for to grant to the parent resource. * Valid values: diff --git a/AnalyticsAdmin/src/V1alpha/AccessDateRange.php b/AnalyticsAdmin/src/V1alpha/AccessDateRange.php index 3e79827ad353..d0e653ce6bc2 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessDateRange.php +++ b/AnalyticsAdmin/src/V1alpha/AccessDateRange.php @@ -23,7 +23,7 @@ class AccessDateRange extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string start_date = 1; */ - private $start_date = ''; + protected $start_date = ''; /** * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot * be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is @@ -32,7 +32,7 @@ class AccessDateRange extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string end_date = 2; */ - private $end_date = ''; + protected $end_date = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessDimension.php b/AnalyticsAdmin/src/V1alpha/AccessDimension.php index 4723368c8d57..44449e85e67d 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessDimension.php +++ b/AnalyticsAdmin/src/V1alpha/AccessDimension.php @@ -25,7 +25,7 @@ class AccessDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string dimension_name = 1; */ - private $dimension_name = ''; + protected $dimension_name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessDimensionHeader.php b/AnalyticsAdmin/src/V1alpha/AccessDimensionHeader.php index 3f872500a3d8..be9a5f3aee35 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessDimensionHeader.php +++ b/AnalyticsAdmin/src/V1alpha/AccessDimensionHeader.php @@ -23,7 +23,7 @@ class AccessDimensionHeader extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string dimension_name = 1; */ - private $dimension_name = ''; + protected $dimension_name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessDimensionValue.php b/AnalyticsAdmin/src/V1alpha/AccessDimensionValue.php index 1046e446920d..d68f8597b18e 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessDimensionValue.php +++ b/AnalyticsAdmin/src/V1alpha/AccessDimensionValue.php @@ -21,7 +21,7 @@ class AccessDimensionValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string value = 1; */ - private $value = ''; + protected $value = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessFilter.php b/AnalyticsAdmin/src/V1alpha/AccessFilter.php index f4d621063f8e..82da5e23d402 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AccessFilter.php @@ -20,7 +20,7 @@ class AccessFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string field_name = 1; */ - private $field_name = ''; + protected $field_name = ''; protected $one_filter; /** diff --git a/AnalyticsAdmin/src/V1alpha/AccessInListFilter.php b/AnalyticsAdmin/src/V1alpha/AccessInListFilter.php index 211badabdacd..dee5bd8ea6dd 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessInListFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AccessInListFilter.php @@ -26,7 +26,7 @@ class AccessInListFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool case_sensitive = 2; */ - private $case_sensitive = false; + protected $case_sensitive = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessMetric.php b/AnalyticsAdmin/src/V1alpha/AccessMetric.php index 05aa158874b2..190ee537d233 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessMetric.php +++ b/AnalyticsAdmin/src/V1alpha/AccessMetric.php @@ -24,7 +24,7 @@ class AccessMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string metric_name = 1; */ - private $metric_name = ''; + protected $metric_name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessMetricHeader.php b/AnalyticsAdmin/src/V1alpha/AccessMetricHeader.php index d0a817efd265..e05c29ae718d 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessMetricHeader.php +++ b/AnalyticsAdmin/src/V1alpha/AccessMetricHeader.php @@ -23,7 +23,7 @@ class AccessMetricHeader extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string metric_name = 1; */ - private $metric_name = ''; + protected $metric_name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessMetricValue.php b/AnalyticsAdmin/src/V1alpha/AccessMetricValue.php index 6e986d485047..abb0fb9e2ec1 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessMetricValue.php +++ b/AnalyticsAdmin/src/V1alpha/AccessMetricValue.php @@ -20,7 +20,7 @@ class AccessMetricValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string value = 1; */ - private $value = ''; + protected $value = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessNumericFilter.php b/AnalyticsAdmin/src/V1alpha/AccessNumericFilter.php index 988b7d7f560d..9187c504683a 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessNumericFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AccessNumericFilter.php @@ -20,13 +20,13 @@ class AccessNumericFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessNumericFilter.Operation operation = 1; */ - private $operation = 0; + protected $operation = 0; /** * A numeric value or a date value. * * Generated from protobuf field .google.analytics.admin.v1alpha.NumericValue value = 2; */ - private $value = null; + protected $value = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessNumericFilter/Operation.php b/AnalyticsAdmin/src/V1alpha/AccessNumericFilter/Operation.php index c6d1fa905dea..0efdd9fe8be6 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessNumericFilter/Operation.php +++ b/AnalyticsAdmin/src/V1alpha/AccessNumericFilter/Operation.php @@ -80,6 +80,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Operation::class, \Google\Analytics\Admin\V1alpha\AccessNumericFilter_Operation::class); diff --git a/AnalyticsAdmin/src/V1alpha/AccessNumericFilter_Operation.php b/AnalyticsAdmin/src/V1alpha/AccessNumericFilter_Operation.php deleted file mode 100644 index 13baea2744ca..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AccessNumericFilter_Operation.php +++ /dev/null @@ -1,16 +0,0 @@ -bool desc = 3; */ - private $desc = false; + protected $desc = false; protected $one_order_by; /** diff --git a/AnalyticsAdmin/src/V1alpha/AccessOrderBy/DimensionOrderBy.php b/AnalyticsAdmin/src/V1alpha/AccessOrderBy/DimensionOrderBy.php index b3c8dd097b2a..f99a53249e7a 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessOrderBy/DimensionOrderBy.php +++ b/AnalyticsAdmin/src/V1alpha/AccessOrderBy/DimensionOrderBy.php @@ -20,13 +20,13 @@ class DimensionOrderBy extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string dimension_name = 1; */ - private $dimension_name = ''; + protected $dimension_name = ''; /** * Controls the rule for dimension value ordering. * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType order_type = 2; */ - private $order_type = 0; + protected $order_type = 0; /** * Constructor. @@ -99,6 +99,4 @@ public function setOrderType($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DimensionOrderBy::class, \Google\Analytics\Admin\V1alpha\AccessOrderBy_DimensionOrderBy::class); diff --git a/AnalyticsAdmin/src/V1alpha/AccessOrderBy/DimensionOrderBy/OrderType.php b/AnalyticsAdmin/src/V1alpha/AccessOrderBy/DimensionOrderBy/OrderType.php index 40d8927a3f97..1d2f7e877622 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessOrderBy/DimensionOrderBy/OrderType.php +++ b/AnalyticsAdmin/src/V1alpha/AccessOrderBy/DimensionOrderBy/OrderType.php @@ -71,6 +71,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OrderType::class, \Google\Analytics\Admin\V1alpha\AccessOrderBy_DimensionOrderBy_OrderType::class); diff --git a/AnalyticsAdmin/src/V1alpha/AccessOrderBy/MetricOrderBy.php b/AnalyticsAdmin/src/V1alpha/AccessOrderBy/MetricOrderBy.php index d7705f39f9f5..18ad670af304 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessOrderBy/MetricOrderBy.php +++ b/AnalyticsAdmin/src/V1alpha/AccessOrderBy/MetricOrderBy.php @@ -20,7 +20,7 @@ class MetricOrderBy extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string metric_name = 1; */ - private $metric_name = ''; + protected $metric_name = ''; /** * Constructor. @@ -65,6 +65,4 @@ public function setMetricName($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetricOrderBy::class, \Google\Analytics\Admin\V1alpha\AccessOrderBy_MetricOrderBy::class); diff --git a/AnalyticsAdmin/src/V1alpha/AccessOrderBy_DimensionOrderBy.php b/AnalyticsAdmin/src/V1alpha/AccessOrderBy_DimensionOrderBy.php deleted file mode 100644 index 6da2fdee6033..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AccessOrderBy_DimensionOrderBy.php +++ /dev/null @@ -1,16 +0,0 @@ -.google.analytics.admin.v1alpha.AccessQuotaStatus tokens_per_day = 1; */ - private $tokens_per_day = null; + protected $tokens_per_day = null; /** * Properties can use 50,000 tokens per hour. An API request consumes a single * number of tokens, and that number is deducted from all of the hourly, @@ -31,20 +31,20 @@ class AccessQuota extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessQuotaStatus tokens_per_hour = 2; */ - private $tokens_per_hour = null; + protected $tokens_per_hour = null; /** * Properties can use up to 50 concurrent requests. * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessQuotaStatus concurrent_requests = 3; */ - private $concurrent_requests = null; + protected $concurrent_requests = null; /** * Properties and cloud project pairs can have up to 50 server errors per * hour. * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessQuotaStatus server_errors_per_project_per_hour = 4; */ - private $server_errors_per_project_per_hour = null; + protected $server_errors_per_project_per_hour = null; /** * Properties can use up to 25% of their tokens per project per hour. This * amounts to Analytics 360 Properties can use 12,500 tokens per project per @@ -53,7 +53,7 @@ class AccessQuota extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessQuotaStatus tokens_per_project_per_hour = 5; */ - private $tokens_per_project_per_hour = null; + protected $tokens_per_project_per_hour = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessQuotaStatus.php b/AnalyticsAdmin/src/V1alpha/AccessQuotaStatus.php index 28f06209c418..ee0694f48b7e 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessQuotaStatus.php +++ b/AnalyticsAdmin/src/V1alpha/AccessQuotaStatus.php @@ -20,13 +20,13 @@ class AccessQuotaStatus extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 consumed = 1; */ - private $consumed = 0; + protected $consumed = 0; /** * Quota remaining after this request. * * Generated from protobuf field int32 remaining = 2; */ - private $remaining = 0; + protected $remaining = 0; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessStringFilter.php b/AnalyticsAdmin/src/V1alpha/AccessStringFilter.php index c1c9b8c015d6..511a01168a39 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessStringFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AccessStringFilter.php @@ -20,19 +20,19 @@ class AccessStringFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessStringFilter.MatchType match_type = 1; */ - private $match_type = 0; + protected $match_type = 0; /** * The string value used for the matching. * * Generated from protobuf field string value = 2; */ - private $value = ''; + protected $value = ''; /** * If true, the string value is case sensitive. * * Generated from protobuf field bool case_sensitive = 3; */ - private $case_sensitive = false; + protected $case_sensitive = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccessStringFilter/MatchType.php b/AnalyticsAdmin/src/V1alpha/AccessStringFilter/MatchType.php index 69c13e765d72..2fc7c7964341 100644 --- a/AnalyticsAdmin/src/V1alpha/AccessStringFilter/MatchType.php +++ b/AnalyticsAdmin/src/V1alpha/AccessStringFilter/MatchType.php @@ -87,6 +87,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MatchType::class, \Google\Analytics\Admin\V1alpha\AccessStringFilter_MatchType::class); diff --git a/AnalyticsAdmin/src/V1alpha/AccessStringFilter_MatchType.php b/AnalyticsAdmin/src/V1alpha/AccessStringFilter_MatchType.php deleted file mode 100644 index 682a31f84785..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AccessStringFilter_MatchType.php +++ /dev/null @@ -1,16 +0,0 @@ -string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Output only. Time when this account was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. Time when account payload fields were last updated. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $update_time = null; + protected $update_time = null; /** * Required. Human-readable display name for this account. * * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Country of business. Must be a Unicode CLDR region code. * * Generated from protobuf field string region_code = 5; */ - private $region_code = ''; + protected $region_code = ''; /** * Output only. Indicates whether this Account is soft-deleted or not. Deleted * accounts are excluded from List results unless specifically requested. * * Generated from protobuf field bool deleted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $deleted = false; + protected $deleted = false; /** * Output only. The URI for a Google Marketing Platform organization resource. * Only set when this account is connected to a GMP organization. @@ -61,7 +61,7 @@ class Account extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string gmp_organization = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { */ - private $gmp_organization = ''; + protected $gmp_organization = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AccountSummary.php b/AnalyticsAdmin/src/V1alpha/AccountSummary.php index c491fe6aca46..9b8c7fc6efc8 100644 --- a/AnalyticsAdmin/src/V1alpha/AccountSummary.php +++ b/AnalyticsAdmin/src/V1alpha/AccountSummary.php @@ -23,7 +23,7 @@ class AccountSummary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - private $name = ''; + protected $name = ''; /** * Resource name of account referred to by this account summary * Format: accounts/{account_id} @@ -31,13 +31,13 @@ class AccountSummary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string account = 2 [(.google.api.resource_reference) = { */ - private $account = ''; + protected $account = ''; /** * Display name for the account referred to in this account summary. * * Generated from protobuf field string display_name = 3; */ - private $display_name = ''; + protected $display_name = ''; /** * List of summaries for child accounts of this account. * diff --git a/AnalyticsAdmin/src/V1alpha/AcknowledgeUserDataCollectionRequest.php b/AnalyticsAdmin/src/V1alpha/AcknowledgeUserDataCollectionRequest.php index 370f369dce10..98b1ece2a495 100644 --- a/AnalyticsAdmin/src/V1alpha/AcknowledgeUserDataCollectionRequest.php +++ b/AnalyticsAdmin/src/V1alpha/AcknowledgeUserDataCollectionRequest.php @@ -20,7 +20,7 @@ class AcknowledgeUserDataCollectionRequest extends \Google\Protobuf\Internal\Mes * * Generated from protobuf field string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $property = ''; + protected $property = ''; /** * Required. An acknowledgement that the caller of this method understands the * terms of user data collection. @@ -32,7 +32,7 @@ class AcknowledgeUserDataCollectionRequest extends \Google\Protobuf\Internal\Mes * * Generated from protobuf field string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $acknowledgement = ''; + protected $acknowledgement = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AdSenseLink.php b/AnalyticsAdmin/src/V1alpha/AdSenseLink.php index 5dfc1ead76ce..d761b682fb8d 100644 --- a/AnalyticsAdmin/src/V1alpha/AdSenseLink.php +++ b/AnalyticsAdmin/src/V1alpha/AdSenseLink.php @@ -22,14 +22,14 @@ class AdSenseLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The AdSense ad client code that the GA4 property is linked to. * Example format: "ca-pub-1234567890" * * Generated from protobuf field string ad_client_code = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $ad_client_code = ''; + protected $ad_client_code = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AnalyticsAdminServiceClient.php b/AnalyticsAdmin/src/V1alpha/AnalyticsAdminServiceClient.php deleted file mode 100644 index d7aae7efc68a..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AnalyticsAdminServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ -_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAccount', - $argument, - ['\Google\Analytics\Admin\V1alpha\Account', 'decode'], - $metadata, $options); - } - - /** - * 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. - * @param \Google\Analytics\Admin\V1alpha\ListAccountsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListAccounts(\Google\Analytics\Admin\V1alpha\ListAccountsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccounts', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListAccountsResponse', 'decode'], - $metadata, $options); - } - - /** - * 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. - * @param \Google\Analytics\Admin\V1alpha\DeleteAccountRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteAccount(\Google\Analytics\Admin\V1alpha\DeleteAccountRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAccount', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates an account. - * @param \Google\Analytics\Admin\V1alpha\UpdateAccountRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateAccount(\Google\Analytics\Admin\V1alpha\UpdateAccountRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAccount', - $argument, - ['\Google\Analytics\Admin\V1alpha\Account', 'decode'], - $metadata, $options); - } - - /** - * Requests a ticket for creating an account. - * @param \Google\Analytics\Admin\V1alpha\ProvisionAccountTicketRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ProvisionAccountTicket(\Google\Analytics\Admin\V1alpha\ProvisionAccountTicketRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ProvisionAccountTicket', - $argument, - ['\Google\Analytics\Admin\V1alpha\ProvisionAccountTicketResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns summaries of all accounts accessible by the caller. - * @param \Google\Analytics\Admin\V1alpha\ListAccountSummariesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListAccountSummaries(\Google\Analytics\Admin\V1alpha\ListAccountSummariesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccountSummaries', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListAccountSummariesResponse', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single "GA4" Property. - * @param \Google\Analytics\Admin\V1alpha\GetPropertyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetProperty(\Google\Analytics\Admin\V1alpha\GetPropertyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetProperty', - $argument, - ['\Google\Analytics\Admin\V1alpha\Property', 'decode'], - $metadata, $options); - } - - /** - * 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. - * @param \Google\Analytics\Admin\V1alpha\ListPropertiesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListProperties(\Google\Analytics\Admin\V1alpha\ListPropertiesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListProperties', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListPropertiesResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates an "GA4" property with the specified location and attributes. - * @param \Google\Analytics\Admin\V1alpha\CreatePropertyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateProperty(\Google\Analytics\Admin\V1alpha\CreatePropertyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateProperty', - $argument, - ['\Google\Analytics\Admin\V1alpha\Property', 'decode'], - $metadata, $options); - } - - /** - * 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 a GA4 Property. - * @param \Google\Analytics\Admin\V1alpha\DeletePropertyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteProperty(\Google\Analytics\Admin\V1alpha\DeletePropertyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteProperty', - $argument, - ['\Google\Analytics\Admin\V1alpha\Property', 'decode'], - $metadata, $options); - } - - /** - * Updates a property. - * @param \Google\Analytics\Admin\V1alpha\UpdatePropertyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateProperty(\Google\Analytics\Admin\V1alpha\UpdatePropertyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateProperty', - $argument, - ['\Google\Analytics\Admin\V1alpha\Property', 'decode'], - $metadata, $options); - } - - /** - * Gets information about a user's link to an account or property. - * @param \Google\Analytics\Admin\V1alpha\GetUserLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetUserLink(\Google\Analytics\Admin\V1alpha\GetUserLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetUserLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\UserLink', 'decode'], - $metadata, $options); - } - - /** - * Gets information about multiple users' links to an account or property. - * @param \Google\Analytics\Admin\V1alpha\BatchGetUserLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchGetUserLinks(\Google\Analytics\Admin\V1alpha\BatchGetUserLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetUserLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\BatchGetUserLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists all user links on an account or property. - * @param \Google\Analytics\Admin\V1alpha\ListUserLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListUserLinks(\Google\Analytics\Admin\V1alpha\ListUserLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListUserLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListUserLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists all user links on an account or property, including implicit ones - * that come from effective permissions granted by groups or organization - * admin roles. - * - * If a returned user link does not have direct permissions, they cannot - * be removed from the account or property directly with the DeleteUserLink - * command. They have to be removed from the group/etc that gives them - * permissions, which is currently only usable/discoverable in the GA or GMP - * UIs. - * @param \Google\Analytics\Admin\V1alpha\AuditUserLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AuditUserLinks(\Google\Analytics\Admin\V1alpha\AuditUserLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/AuditUserLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\AuditUserLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a user link on an account or property. - * - * If the user with the specified email already has permissions on the - * account or property, then the user's existing permissions will be unioned - * with the permissions specified in the new UserLink. - * @param \Google\Analytics\Admin\V1alpha\CreateUserLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateUserLink(\Google\Analytics\Admin\V1alpha\CreateUserLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateUserLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\UserLink', 'decode'], - $metadata, $options); - } - - /** - * Creates information about multiple users' links to an account or property. - * - * This method is transactional. If any UserLink cannot be created, none of - * the UserLinks will be created. - * @param \Google\Analytics\Admin\V1alpha\BatchCreateUserLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchCreateUserLinks(\Google\Analytics\Admin\V1alpha\BatchCreateUserLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateUserLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\BatchCreateUserLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates a user link on an account or property. - * @param \Google\Analytics\Admin\V1alpha\UpdateUserLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateUserLink(\Google\Analytics\Admin\V1alpha\UpdateUserLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateUserLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\UserLink', 'decode'], - $metadata, $options); - } - - /** - * Updates information about multiple users' links to an account or property. - * @param \Google\Analytics\Admin\V1alpha\BatchUpdateUserLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchUpdateUserLinks(\Google\Analytics\Admin\V1alpha\BatchUpdateUserLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateUserLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\BatchUpdateUserLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes a user link on an account or property. - * @param \Google\Analytics\Admin\V1alpha\DeleteUserLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteUserLink(\Google\Analytics\Admin\V1alpha\DeleteUserLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteUserLink', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Deletes information about multiple users' links to an account or property. - * @param \Google\Analytics\Admin\V1alpha\BatchDeleteUserLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchDeleteUserLinks(\Google\Analytics\Admin\V1alpha\BatchDeleteUserLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteUserLinks', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Creates a FirebaseLink. - * - * Properties can have at most one FirebaseLink. - * @param \Google\Analytics\Admin\V1alpha\CreateFirebaseLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateFirebaseLink(\Google\Analytics\Admin\V1alpha\CreateFirebaseLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateFirebaseLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\FirebaseLink', 'decode'], - $metadata, $options); - } - - /** - * Deletes a FirebaseLink on a property - * @param \Google\Analytics\Admin\V1alpha\DeleteFirebaseLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteFirebaseLink(\Google\Analytics\Admin\V1alpha\DeleteFirebaseLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteFirebaseLink', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lists FirebaseLinks on a property. - * Properties can have at most one FirebaseLink. - * @param \Google\Analytics\Admin\V1alpha\ListFirebaseLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListFirebaseLinks(\Google\Analytics\Admin\V1alpha\ListFirebaseLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListFirebaseLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListFirebaseLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the Site Tag for the specified web stream. - * Site Tags are immutable singletons. - * @param \Google\Analytics\Admin\V1alpha\GetGlobalSiteTagRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetGlobalSiteTag(\Google\Analytics\Admin\V1alpha\GetGlobalSiteTagRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGlobalSiteTag', - $argument, - ['\Google\Analytics\Admin\V1alpha\GlobalSiteTag', 'decode'], - $metadata, $options); - } - - /** - * Creates a GoogleAdsLink. - * @param \Google\Analytics\Admin\V1alpha\CreateGoogleAdsLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateGoogleAdsLink(\Google\Analytics\Admin\V1alpha\CreateGoogleAdsLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateGoogleAdsLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\GoogleAdsLink', 'decode'], - $metadata, $options); - } - - /** - * Updates a GoogleAdsLink on a property - * @param \Google\Analytics\Admin\V1alpha\UpdateGoogleAdsLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateGoogleAdsLink(\Google\Analytics\Admin\V1alpha\UpdateGoogleAdsLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleAdsLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\GoogleAdsLink', 'decode'], - $metadata, $options); - } - - /** - * Deletes a GoogleAdsLink on a property - * @param \Google\Analytics\Admin\V1alpha\DeleteGoogleAdsLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteGoogleAdsLink(\Google\Analytics\Admin\V1alpha\DeleteGoogleAdsLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteGoogleAdsLink', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lists GoogleAdsLinks on a property. - * @param \Google\Analytics\Admin\V1alpha\ListGoogleAdsLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListGoogleAdsLinks(\Google\Analytics\Admin\V1alpha\ListGoogleAdsLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListGoogleAdsLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListGoogleAdsLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Get data sharing settings on an account. - * Data sharing settings are singletons. - * @param \Google\Analytics\Admin\V1alpha\GetDataSharingSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDataSharingSettings(\Google\Analytics\Admin\V1alpha\GetDataSharingSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataSharingSettings', - $argument, - ['\Google\Analytics\Admin\V1alpha\DataSharingSettings', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single "GA4" MeasurementProtocolSecret. - * @param \Google\Analytics\Admin\V1alpha\GetMeasurementProtocolSecretRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetMeasurementProtocolSecret(\Google\Analytics\Admin\V1alpha\GetMeasurementProtocolSecretRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetMeasurementProtocolSecret', - $argument, - ['\Google\Analytics\Admin\V1alpha\MeasurementProtocolSecret', 'decode'], - $metadata, $options); - } - - /** - * Returns child MeasurementProtocolSecrets under the specified parent - * Property. - * @param \Google\Analytics\Admin\V1alpha\ListMeasurementProtocolSecretsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListMeasurementProtocolSecrets(\Google\Analytics\Admin\V1alpha\ListMeasurementProtocolSecretsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListMeasurementProtocolSecrets', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListMeasurementProtocolSecretsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a measurement protocol secret. - * @param \Google\Analytics\Admin\V1alpha\CreateMeasurementProtocolSecretRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateMeasurementProtocolSecret(\Google\Analytics\Admin\V1alpha\CreateMeasurementProtocolSecretRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateMeasurementProtocolSecret', - $argument, - ['\Google\Analytics\Admin\V1alpha\MeasurementProtocolSecret', 'decode'], - $metadata, $options); - } - - /** - * Deletes target MeasurementProtocolSecret. - * @param \Google\Analytics\Admin\V1alpha\DeleteMeasurementProtocolSecretRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteMeasurementProtocolSecret(\Google\Analytics\Admin\V1alpha\DeleteMeasurementProtocolSecretRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteMeasurementProtocolSecret', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates a measurement protocol secret. - * @param \Google\Analytics\Admin\V1alpha\UpdateMeasurementProtocolSecretRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateMeasurementProtocolSecret(\Google\Analytics\Admin\V1alpha\UpdateMeasurementProtocolSecretRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateMeasurementProtocolSecret', - $argument, - ['\Google\Analytics\Admin\V1alpha\MeasurementProtocolSecret', 'decode'], - $metadata, $options); - } - - /** - * Acknowledges the terms of user data collection for the specified property. - * - * This acknowledgement must be completed (either in the Google Analytics UI - * or through this API) before MeasurementProtocolSecret resources may be - * created. - * @param \Google\Analytics\Admin\V1alpha\AcknowledgeUserDataCollectionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AcknowledgeUserDataCollection(\Google\Analytics\Admin\V1alpha\AcknowledgeUserDataCollectionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection', - $argument, - ['\Google\Analytics\Admin\V1alpha\AcknowledgeUserDataCollectionResponse', 'decode'], - $metadata, $options); - } - - /** - * Searches through all changes to an account or its children given the - * specified set of filters. - * @param \Google\Analytics\Admin\V1alpha\SearchChangeHistoryEventsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SearchChangeHistoryEvents(\Google\Analytics\Admin\V1alpha\SearchChangeHistoryEventsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/SearchChangeHistoryEvents', - $argument, - ['\Google\Analytics\Admin\V1alpha\SearchChangeHistoryEventsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lookup for Google Signals settings for a property. - * @param \Google\Analytics\Admin\V1alpha\GetGoogleSignalsSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetGoogleSignalsSettings(\Google\Analytics\Admin\V1alpha\GetGoogleSignalsSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGoogleSignalsSettings', - $argument, - ['\Google\Analytics\Admin\V1alpha\GoogleSignalsSettings', 'decode'], - $metadata, $options); - } - - /** - * Updates Google Signals settings for a property. - * @param \Google\Analytics\Admin\V1alpha\UpdateGoogleSignalsSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateGoogleSignalsSettings(\Google\Analytics\Admin\V1alpha\UpdateGoogleSignalsSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleSignalsSettings', - $argument, - ['\Google\Analytics\Admin\V1alpha\GoogleSignalsSettings', 'decode'], - $metadata, $options); - } - - /** - * Creates a conversion event with the specified attributes. - * @param \Google\Analytics\Admin\V1alpha\CreateConversionEventRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateConversionEvent(\Google\Analytics\Admin\V1alpha\CreateConversionEventRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConversionEvent', - $argument, - ['\Google\Analytics\Admin\V1alpha\ConversionEvent', 'decode'], - $metadata, $options); - } - - /** - * Retrieve a single conversion event. - * @param \Google\Analytics\Admin\V1alpha\GetConversionEventRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetConversionEvent(\Google\Analytics\Admin\V1alpha\GetConversionEventRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetConversionEvent', - $argument, - ['\Google\Analytics\Admin\V1alpha\ConversionEvent', 'decode'], - $metadata, $options); - } - - /** - * Deletes a conversion event in a property. - * @param \Google\Analytics\Admin\V1alpha\DeleteConversionEventRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteConversionEvent(\Google\Analytics\Admin\V1alpha\DeleteConversionEventRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConversionEvent', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Returns a list of conversion events in the specified parent property. - * - * Returns an empty list if no conversion events are found. - * @param \Google\Analytics\Admin\V1alpha\ListConversionEventsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListConversionEvents(\Google\Analytics\Admin\V1alpha\ListConversionEventsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConversionEvents', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListConversionEventsResponse', 'decode'], - $metadata, $options); - } - - /** - * Look up a single DisplayVideo360AdvertiserLink - * @param \Google\Analytics\Admin\V1alpha\GetDisplayVideo360AdvertiserLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDisplayVideo360AdvertiserLink(\Google\Analytics\Admin\V1alpha\GetDisplayVideo360AdvertiserLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLink', 'decode'], - $metadata, $options); - } - - /** - * Lists all DisplayVideo360AdvertiserLinks on a property. - * @param \Google\Analytics\Admin\V1alpha\ListDisplayVideo360AdvertiserLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDisplayVideo360AdvertiserLinks(\Google\Analytics\Admin\V1alpha\ListDisplayVideo360AdvertiserLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListDisplayVideo360AdvertiserLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a DisplayVideo360AdvertiserLink. - * This can only be utilized by users who have proper authorization both on - * the Google Analytics property and on the Display & Video 360 advertiser. - * Users who do not have access to the Display & Video 360 advertiser should - * instead seek to create a DisplayVideo360LinkProposal. - * @param \Google\Analytics\Admin\V1alpha\CreateDisplayVideo360AdvertiserLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateDisplayVideo360AdvertiserLink(\Google\Analytics\Admin\V1alpha\CreateDisplayVideo360AdvertiserLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLink', 'decode'], - $metadata, $options); - } - - /** - * Deletes a DisplayVideo360AdvertiserLink on a property. - * @param \Google\Analytics\Admin\V1alpha\DeleteDisplayVideo360AdvertiserLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteDisplayVideo360AdvertiserLink(\Google\Analytics\Admin\V1alpha\DeleteDisplayVideo360AdvertiserLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLink', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates a DisplayVideo360AdvertiserLink on a property. - * @param \Google\Analytics\Admin\V1alpha\UpdateDisplayVideo360AdvertiserLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateDisplayVideo360AdvertiserLink(\Google\Analytics\Admin\V1alpha\UpdateDisplayVideo360AdvertiserLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDisplayVideo360AdvertiserLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLink', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single DisplayVideo360AdvertiserLinkProposal. - * @param \Google\Analytics\Admin\V1alpha\GetDisplayVideo360AdvertiserLinkProposalRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDisplayVideo360AdvertiserLinkProposal(\Google\Analytics\Admin\V1alpha\GetDisplayVideo360AdvertiserLinkProposalRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLinkProposal', - $argument, - ['\Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLinkProposal', 'decode'], - $metadata, $options); - } - - /** - * Lists DisplayVideo360AdvertiserLinkProposals on a property. - * @param \Google\Analytics\Admin\V1alpha\ListDisplayVideo360AdvertiserLinkProposalsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDisplayVideo360AdvertiserLinkProposals(\Google\Analytics\Admin\V1alpha\ListDisplayVideo360AdvertiserLinkProposalsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinkProposals', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListDisplayVideo360AdvertiserLinkProposalsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a DisplayVideo360AdvertiserLinkProposal. - * @param \Google\Analytics\Admin\V1alpha\CreateDisplayVideo360AdvertiserLinkProposalRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateDisplayVideo360AdvertiserLinkProposal(\Google\Analytics\Admin\V1alpha\CreateDisplayVideo360AdvertiserLinkProposalRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLinkProposal', - $argument, - ['\Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLinkProposal', 'decode'], - $metadata, $options); - } - - /** - * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. - * This can only be used on cancelled proposals. - * @param \Google\Analytics\Admin\V1alpha\DeleteDisplayVideo360AdvertiserLinkProposalRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteDisplayVideo360AdvertiserLinkProposal(\Google\Analytics\Admin\V1alpha\DeleteDisplayVideo360AdvertiserLinkProposalRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLinkProposal', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Approves a DisplayVideo360AdvertiserLinkProposal. - * The DisplayVideo360AdvertiserLinkProposal will be deleted and a new - * DisplayVideo360AdvertiserLink will be created. - * @param \Google\Analytics\Admin\V1alpha\ApproveDisplayVideo360AdvertiserLinkProposalRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ApproveDisplayVideo360AdvertiserLinkProposal(\Google\Analytics\Admin\V1alpha\ApproveDisplayVideo360AdvertiserLinkProposalRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ApproveDisplayVideo360AdvertiserLinkProposal', - $argument, - ['\Google\Analytics\Admin\V1alpha\ApproveDisplayVideo360AdvertiserLinkProposalResponse', 'decode'], - $metadata, $options); - } - - /** - * Cancels a DisplayVideo360AdvertiserLinkProposal. - * Cancelling can mean either: - * - Declining a proposal initiated from Display & Video 360 - * - Withdrawing a proposal initiated from Google Analytics - * After being cancelled, a proposal will eventually be deleted automatically. - * @param \Google\Analytics\Admin\V1alpha\CancelDisplayVideo360AdvertiserLinkProposalRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CancelDisplayVideo360AdvertiserLinkProposal(\Google\Analytics\Admin\V1alpha\CancelDisplayVideo360AdvertiserLinkProposalRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CancelDisplayVideo360AdvertiserLinkProposal', - $argument, - ['\Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLinkProposal', 'decode'], - $metadata, $options); - } - - /** - * Creates a CustomDimension. - * @param \Google\Analytics\Admin\V1alpha\CreateCustomDimensionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateCustomDimension(\Google\Analytics\Admin\V1alpha\CreateCustomDimensionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomDimension', - $argument, - ['\Google\Analytics\Admin\V1alpha\CustomDimension', 'decode'], - $metadata, $options); - } - - /** - * Updates a CustomDimension on a property. - * @param \Google\Analytics\Admin\V1alpha\UpdateCustomDimensionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateCustomDimension(\Google\Analytics\Admin\V1alpha\UpdateCustomDimensionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomDimension', - $argument, - ['\Google\Analytics\Admin\V1alpha\CustomDimension', 'decode'], - $metadata, $options); - } - - /** - * Lists CustomDimensions on a property. - * @param \Google\Analytics\Admin\V1alpha\ListCustomDimensionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListCustomDimensions(\Google\Analytics\Admin\V1alpha\ListCustomDimensionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomDimensions', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListCustomDimensionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Archives a CustomDimension on a property. - * @param \Google\Analytics\Admin\V1alpha\ArchiveCustomDimensionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ArchiveCustomDimension(\Google\Analytics\Admin\V1alpha\ArchiveCustomDimensionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomDimension', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single CustomDimension. - * @param \Google\Analytics\Admin\V1alpha\GetCustomDimensionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetCustomDimension(\Google\Analytics\Admin\V1alpha\GetCustomDimensionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomDimension', - $argument, - ['\Google\Analytics\Admin\V1alpha\CustomDimension', 'decode'], - $metadata, $options); - } - - /** - * Creates a CustomMetric. - * @param \Google\Analytics\Admin\V1alpha\CreateCustomMetricRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateCustomMetric(\Google\Analytics\Admin\V1alpha\CreateCustomMetricRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomMetric', - $argument, - ['\Google\Analytics\Admin\V1alpha\CustomMetric', 'decode'], - $metadata, $options); - } - - /** - * Updates a CustomMetric on a property. - * @param \Google\Analytics\Admin\V1alpha\UpdateCustomMetricRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateCustomMetric(\Google\Analytics\Admin\V1alpha\UpdateCustomMetricRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomMetric', - $argument, - ['\Google\Analytics\Admin\V1alpha\CustomMetric', 'decode'], - $metadata, $options); - } - - /** - * Lists CustomMetrics on a property. - * @param \Google\Analytics\Admin\V1alpha\ListCustomMetricsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListCustomMetrics(\Google\Analytics\Admin\V1alpha\ListCustomMetricsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomMetrics', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListCustomMetricsResponse', 'decode'], - $metadata, $options); - } - - /** - * Archives a CustomMetric on a property. - * @param \Google\Analytics\Admin\V1alpha\ArchiveCustomMetricRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ArchiveCustomMetric(\Google\Analytics\Admin\V1alpha\ArchiveCustomMetricRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomMetric', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single CustomMetric. - * @param \Google\Analytics\Admin\V1alpha\GetCustomMetricRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetCustomMetric(\Google\Analytics\Admin\V1alpha\GetCustomMetricRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomMetric', - $argument, - ['\Google\Analytics\Admin\V1alpha\CustomMetric', 'decode'], - $metadata, $options); - } - - /** - * Returns the singleton data retention settings for this property. - * @param \Google\Analytics\Admin\V1alpha\GetDataRetentionSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDataRetentionSettings(\Google\Analytics\Admin\V1alpha\GetDataRetentionSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRetentionSettings', - $argument, - ['\Google\Analytics\Admin\V1alpha\DataRetentionSettings', 'decode'], - $metadata, $options); - } - - /** - * Updates the singleton data retention settings for this property. - * @param \Google\Analytics\Admin\V1alpha\UpdateDataRetentionSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateDataRetentionSettings(\Google\Analytics\Admin\V1alpha\UpdateDataRetentionSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRetentionSettings', - $argument, - ['\Google\Analytics\Admin\V1alpha\DataRetentionSettings', 'decode'], - $metadata, $options); - } - - /** - * Creates a DataStream. - * @param \Google\Analytics\Admin\V1alpha\CreateDataStreamRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateDataStream(\Google\Analytics\Admin\V1alpha\CreateDataStreamRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDataStream', - $argument, - ['\Google\Analytics\Admin\V1alpha\DataStream', 'decode'], - $metadata, $options); - } - - /** - * Deletes a DataStream on a property. - * @param \Google\Analytics\Admin\V1alpha\DeleteDataStreamRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteDataStream(\Google\Analytics\Admin\V1alpha\DeleteDataStreamRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDataStream', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates a DataStream on a property. - * @param \Google\Analytics\Admin\V1alpha\UpdateDataStreamRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateDataStream(\Google\Analytics\Admin\V1alpha\UpdateDataStreamRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataStream', - $argument, - ['\Google\Analytics\Admin\V1alpha\DataStream', 'decode'], - $metadata, $options); - } - - /** - * Lists DataStreams on a property. - * @param \Google\Analytics\Admin\V1alpha\ListDataStreamsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDataStreams(\Google\Analytics\Admin\V1alpha\ListDataStreamsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDataStreams', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListDataStreamsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single DataStream. - * @param \Google\Analytics\Admin\V1alpha\GetDataStreamRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDataStream(\Google\Analytics\Admin\V1alpha\GetDataStreamRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataStream', - $argument, - ['\Google\Analytics\Admin\V1alpha\DataStream', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single Audience. - * Audiences created before 2020 may not be supported. - * Default audiences will not show filter definitions. - * @param \Google\Analytics\Admin\V1alpha\GetAudienceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetAudience(\Google\Analytics\Admin\V1alpha\GetAudienceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAudience', - $argument, - ['\Google\Analytics\Admin\V1alpha\Audience', 'decode'], - $metadata, $options); - } - - /** - * Lists Audiences on a property. - * Audiences created before 2020 may not be supported. - * Default audiences will not show filter definitions. - * @param \Google\Analytics\Admin\V1alpha\ListAudiencesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListAudiences(\Google\Analytics\Admin\V1alpha\ListAudiencesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAudiences', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListAudiencesResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates an Audience. - * @param \Google\Analytics\Admin\V1alpha\CreateAudienceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateAudience(\Google\Analytics\Admin\V1alpha\CreateAudienceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAudience', - $argument, - ['\Google\Analytics\Admin\V1alpha\Audience', 'decode'], - $metadata, $options); - } - - /** - * Updates an Audience on a property. - * @param \Google\Analytics\Admin\V1alpha\UpdateAudienceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateAudience(\Google\Analytics\Admin\V1alpha\UpdateAudienceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAudience', - $argument, - ['\Google\Analytics\Admin\V1alpha\Audience', 'decode'], - $metadata, $options); - } - - /** - * Archives an Audience on a property. - * @param \Google\Analytics\Admin\V1alpha\ArchiveAudienceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ArchiveAudience(\Google\Analytics\Admin\V1alpha\ArchiveAudienceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveAudience', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Look up a single SearchAds360Link - * @param \Google\Analytics\Admin\V1alpha\GetSearchAds360LinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetSearchAds360Link(\Google\Analytics\Admin\V1alpha\GetSearchAds360LinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetSearchAds360Link', - $argument, - ['\Google\Analytics\Admin\V1alpha\SearchAds360Link', 'decode'], - $metadata, $options); - } - - /** - * Lists all SearchAds360Links on a property. - * @param \Google\Analytics\Admin\V1alpha\ListSearchAds360LinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListSearchAds360Links(\Google\Analytics\Admin\V1alpha\ListSearchAds360LinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSearchAds360Links', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListSearchAds360LinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a SearchAds360Link. - * @param \Google\Analytics\Admin\V1alpha\CreateSearchAds360LinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateSearchAds360Link(\Google\Analytics\Admin\V1alpha\CreateSearchAds360LinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSearchAds360Link', - $argument, - ['\Google\Analytics\Admin\V1alpha\SearchAds360Link', 'decode'], - $metadata, $options); - } - - /** - * Deletes a SearchAds360Link on a property. - * @param \Google\Analytics\Admin\V1alpha\DeleteSearchAds360LinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteSearchAds360Link(\Google\Analytics\Admin\V1alpha\DeleteSearchAds360LinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSearchAds360Link', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates a SearchAds360Link on a property. - * @param \Google\Analytics\Admin\V1alpha\UpdateSearchAds360LinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateSearchAds360Link(\Google\Analytics\Admin\V1alpha\UpdateSearchAds360LinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSearchAds360Link', - $argument, - ['\Google\Analytics\Admin\V1alpha\SearchAds360Link', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a AttributionSettings singleton. - * @param \Google\Analytics\Admin\V1alpha\GetAttributionSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetAttributionSettings(\Google\Analytics\Admin\V1alpha\GetAttributionSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAttributionSettings', - $argument, - ['\Google\Analytics\Admin\V1alpha\AttributionSettings', 'decode'], - $metadata, $options); - } - - /** - * Updates attribution settings on a property. - * @param \Google\Analytics\Admin\V1alpha\UpdateAttributionSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateAttributionSettings(\Google\Analytics\Admin\V1alpha\UpdateAttributionSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAttributionSettings', - $argument, - ['\Google\Analytics\Admin\V1alpha\AttributionSettings', 'decode'], - $metadata, $options); - } - - /** - * Returns a customized report of data access records. The report provides - * records of each time a user reads Google Analytics reporting data. Access - * records are retained for up to 2 years. - * - * Data Access Reports can be requested for a property. The property must be - * in Google Analytics 360. This method is only available to Administrators. - * - * These data access records include GA4 UI Reporting, GA4 UI Explorations, - * GA4 Data API, and other products like Firebase & Admob that can retrieve - * data from Google Analytics through a linkage. These records don't include - * property configuration changes like adding a stream or changing a - * property's time zone. For configuration change history, see - * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). - * @param \Google\Analytics\Admin\V1alpha\RunAccessReportRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RunAccessReport(\Google\Analytics\Admin\V1alpha\RunAccessReportRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/RunAccessReport', - $argument, - ['\Google\Analytics\Admin\V1alpha\RunAccessReportResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates an access binding on an account or property. - * @param \Google\Analytics\Admin\V1alpha\CreateAccessBindingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateAccessBinding(\Google\Analytics\Admin\V1alpha\CreateAccessBindingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAccessBinding', - $argument, - ['\Google\Analytics\Admin\V1alpha\AccessBinding', 'decode'], - $metadata, $options); - } - - /** - * Gets information about an access binding. - * @param \Google\Analytics\Admin\V1alpha\GetAccessBindingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetAccessBinding(\Google\Analytics\Admin\V1alpha\GetAccessBindingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAccessBinding', - $argument, - ['\Google\Analytics\Admin\V1alpha\AccessBinding', 'decode'], - $metadata, $options); - } - - /** - * Updates an access binding on an account or property. - * @param \Google\Analytics\Admin\V1alpha\UpdateAccessBindingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateAccessBinding(\Google\Analytics\Admin\V1alpha\UpdateAccessBindingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAccessBinding', - $argument, - ['\Google\Analytics\Admin\V1alpha\AccessBinding', 'decode'], - $metadata, $options); - } - - /** - * Deletes an access binding on an account or property. - * @param \Google\Analytics\Admin\V1alpha\DeleteAccessBindingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteAccessBinding(\Google\Analytics\Admin\V1alpha\DeleteAccessBindingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAccessBinding', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lists all access bindings on an account or property. - * @param \Google\Analytics\Admin\V1alpha\ListAccessBindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListAccessBindings(\Google\Analytics\Admin\V1alpha\ListAccessBindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccessBindings', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListAccessBindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates information about multiple access bindings to an account or - * property. - * - * This method is transactional. If any AccessBinding cannot be created, none - * of the AccessBindings will be created. - * @param \Google\Analytics\Admin\V1alpha\BatchCreateAccessBindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchCreateAccessBindings(\Google\Analytics\Admin\V1alpha\BatchCreateAccessBindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateAccessBindings', - $argument, - ['\Google\Analytics\Admin\V1alpha\BatchCreateAccessBindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets information about multiple access bindings to an account or property. - * @param \Google\Analytics\Admin\V1alpha\BatchGetAccessBindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchGetAccessBindings(\Google\Analytics\Admin\V1alpha\BatchGetAccessBindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetAccessBindings', - $argument, - ['\Google\Analytics\Admin\V1alpha\BatchGetAccessBindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates information about multiple access bindings to an account or - * property. - * @param \Google\Analytics\Admin\V1alpha\BatchUpdateAccessBindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchUpdateAccessBindings(\Google\Analytics\Admin\V1alpha\BatchUpdateAccessBindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateAccessBindings', - $argument, - ['\Google\Analytics\Admin\V1alpha\BatchUpdateAccessBindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes information about multiple users' links to an account or property. - * @param \Google\Analytics\Admin\V1alpha\BatchDeleteAccessBindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchDeleteAccessBindings(\Google\Analytics\Admin\V1alpha\BatchDeleteAccessBindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteAccessBindings', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single ExpandedDataSet. - * @param \Google\Analytics\Admin\V1alpha\GetExpandedDataSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetExpandedDataSet(\Google\Analytics\Admin\V1alpha\GetExpandedDataSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetExpandedDataSet', - $argument, - ['\Google\Analytics\Admin\V1alpha\ExpandedDataSet', 'decode'], - $metadata, $options); - } - - /** - * Lists ExpandedDataSets on a property. - * @param \Google\Analytics\Admin\V1alpha\ListExpandedDataSetsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListExpandedDataSets(\Google\Analytics\Admin\V1alpha\ListExpandedDataSetsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListExpandedDataSets', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListExpandedDataSetsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a ExpandedDataSet. - * @param \Google\Analytics\Admin\V1alpha\CreateExpandedDataSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateExpandedDataSet(\Google\Analytics\Admin\V1alpha\CreateExpandedDataSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateExpandedDataSet', - $argument, - ['\Google\Analytics\Admin\V1alpha\ExpandedDataSet', 'decode'], - $metadata, $options); - } - - /** - * Updates a ExpandedDataSet on a property. - * @param \Google\Analytics\Admin\V1alpha\UpdateExpandedDataSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateExpandedDataSet(\Google\Analytics\Admin\V1alpha\UpdateExpandedDataSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateExpandedDataSet', - $argument, - ['\Google\Analytics\Admin\V1alpha\ExpandedDataSet', 'decode'], - $metadata, $options); - } - - /** - * Deletes a ExpandedDataSet on a property. - * @param \Google\Analytics\Admin\V1alpha\DeleteExpandedDataSetRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteExpandedDataSet(\Google\Analytics\Admin\V1alpha\DeleteExpandedDataSetRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteExpandedDataSet', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single ChannelGroup. - * @param \Google\Analytics\Admin\V1alpha\GetChannelGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetChannelGroup(\Google\Analytics\Admin\V1alpha\GetChannelGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetChannelGroup', - $argument, - ['\Google\Analytics\Admin\V1alpha\ChannelGroup', 'decode'], - $metadata, $options); - } - - /** - * Lists ChannelGroups on a property. - * @param \Google\Analytics\Admin\V1alpha\ListChannelGroupsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListChannelGroups(\Google\Analytics\Admin\V1alpha\ListChannelGroupsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListChannelGroups', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListChannelGroupsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a ChannelGroup. - * @param \Google\Analytics\Admin\V1alpha\CreateChannelGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateChannelGroup(\Google\Analytics\Admin\V1alpha\CreateChannelGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateChannelGroup', - $argument, - ['\Google\Analytics\Admin\V1alpha\ChannelGroup', 'decode'], - $metadata, $options); - } - - /** - * Updates a ChannelGroup. - * @param \Google\Analytics\Admin\V1alpha\UpdateChannelGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateChannelGroup(\Google\Analytics\Admin\V1alpha\UpdateChannelGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateChannelGroup', - $argument, - ['\Google\Analytics\Admin\V1alpha\ChannelGroup', 'decode'], - $metadata, $options); - } - - /** - * Deletes a ChannelGroup on a property. - * @param \Google\Analytics\Admin\V1alpha\DeleteChannelGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteChannelGroup(\Google\Analytics\Admin\V1alpha\DeleteChannelGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteChannelGroup', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Sets the opt out status for the automated GA4 setup process for a UA - * property. - * Note: this has no effect on GA4 property. - * @param \Google\Analytics\Admin\V1alpha\SetAutomatedGa4ConfigurationOptOutRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetAutomatedGa4ConfigurationOptOut(\Google\Analytics\Admin\V1alpha\SetAutomatedGa4ConfigurationOptOutRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/SetAutomatedGa4ConfigurationOptOut', - $argument, - ['\Google\Analytics\Admin\V1alpha\SetAutomatedGa4ConfigurationOptOutResponse', 'decode'], - $metadata, $options); - } - - /** - * Fetches the opt out status for the automated GA4 setup process for a UA - * property. - * Note: this has no effect on GA4 property. - * @param \Google\Analytics\Admin\V1alpha\FetchAutomatedGa4ConfigurationOptOutRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function FetchAutomatedGa4ConfigurationOptOut(\Google\Analytics\Admin\V1alpha\FetchAutomatedGa4ConfigurationOptOutRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/FetchAutomatedGa4ConfigurationOptOut', - $argument, - ['\Google\Analytics\Admin\V1alpha\FetchAutomatedGa4ConfigurationOptOutResponse', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single BigQuery Link. - * @param \Google\Analytics\Admin\V1alpha\GetBigQueryLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetBigQueryLink(\Google\Analytics\Admin\V1alpha\GetBigQueryLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetBigQueryLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\BigQueryLink', 'decode'], - $metadata, $options); - } - - /** - * Lists BigQuery Links on a property. - * @param \Google\Analytics\Admin\V1alpha\ListBigQueryLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListBigQueryLinks(\Google\Analytics\Admin\V1alpha\ListBigQueryLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListBigQueryLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListBigQueryLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns the enhanced measurement settings for this data stream. - * Note that the stream must enable enhanced measurement for these settings to - * take effect. - * @param \Google\Analytics\Admin\V1alpha\GetEnhancedMeasurementSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetEnhancedMeasurementSettings(\Google\Analytics\Admin\V1alpha\GetEnhancedMeasurementSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetEnhancedMeasurementSettings', - $argument, - ['\Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings', 'decode'], - $metadata, $options); - } - - /** - * Updates the enhanced measurement settings for this data stream. - * Note that the stream must enable enhanced measurement for these settings to - * take effect. - * @param \Google\Analytics\Admin\V1alpha\UpdateEnhancedMeasurementSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateEnhancedMeasurementSettings(\Google\Analytics\Admin\V1alpha\UpdateEnhancedMeasurementSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEnhancedMeasurementSettings', - $argument, - ['\Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings', 'decode'], - $metadata, $options); - } - - /** - * Creates a connected site tag for a Universal Analytics property. You can - * create a maximum of 20 connected site tags per property. - * Note: This API cannot be used on GA4 properties. - * @param \Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateConnectedSiteTag(\Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConnectedSiteTag', - $argument, - ['\Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes a connected site tag for a Universal Analytics property. - * Note: this has no effect on GA4 properties. - * @param \Google\Analytics\Admin\V1alpha\DeleteConnectedSiteTagRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteConnectedSiteTag(\Google\Analytics\Admin\V1alpha\DeleteConnectedSiteTagRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConnectedSiteTag', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lists the connected site tags for a Universal Analytics property. A maximum - * of 20 connected site tags will be returned. Note: this has no effect on GA4 - * property. - * @param \Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListConnectedSiteTags(\Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConnectedSiteTags', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsResponse', 'decode'], - $metadata, $options); - } - - /** - * Given a specified UA property, looks up the GA4 property connected to it. - * Note: this cannot be used with GA4 properties. - * @param \Google\Analytics\Admin\V1alpha\FetchConnectedGa4PropertyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function FetchConnectedGa4Property(\Google\Analytics\Admin\V1alpha\FetchConnectedGa4PropertyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/FetchConnectedGa4Property', - $argument, - ['\Google\Analytics\Admin\V1alpha\FetchConnectedGa4PropertyResponse', 'decode'], - $metadata, $options); - } - - /** - * Looks up a single AdSenseLink. - * @param \Google\Analytics\Admin\V1alpha\GetAdSenseLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetAdSenseLink(\Google\Analytics\Admin\V1alpha\GetAdSenseLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAdSenseLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\AdSenseLink', 'decode'], - $metadata, $options); - } - - /** - * Creates an AdSenseLink. - * @param \Google\Analytics\Admin\V1alpha\CreateAdSenseLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateAdSenseLink(\Google\Analytics\Admin\V1alpha\CreateAdSenseLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAdSenseLink', - $argument, - ['\Google\Analytics\Admin\V1alpha\AdSenseLink', 'decode'], - $metadata, $options); - } - - /** - * Deletes an AdSenseLink. - * @param \Google\Analytics\Admin\V1alpha\DeleteAdSenseLinkRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteAdSenseLink(\Google\Analytics\Admin\V1alpha\DeleteAdSenseLinkRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAdSenseLink', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lists AdSenseLinks on a property. - * @param \Google\Analytics\Admin\V1alpha\ListAdSenseLinksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListAdSenseLinks(\Google\Analytics\Admin\V1alpha\ListAdSenseLinksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAdSenseLinks', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListAdSenseLinksResponse', 'decode'], - $metadata, $options); - } - - /** - * Lookup for a single EventCreateRule. - * @param \Google\Analytics\Admin\V1alpha\GetEventCreateRuleRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetEventCreateRule(\Google\Analytics\Admin\V1alpha\GetEventCreateRuleRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetEventCreateRule', - $argument, - ['\Google\Analytics\Admin\V1alpha\EventCreateRule', 'decode'], - $metadata, $options); - } - - /** - * Lists EventCreateRules on a web data stream. - * @param \Google\Analytics\Admin\V1alpha\ListEventCreateRulesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListEventCreateRules(\Google\Analytics\Admin\V1alpha\ListEventCreateRulesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListEventCreateRules', - $argument, - ['\Google\Analytics\Admin\V1alpha\ListEventCreateRulesResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates an EventCreateRule. - * @param \Google\Analytics\Admin\V1alpha\CreateEventCreateRuleRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateEventCreateRule(\Google\Analytics\Admin\V1alpha\CreateEventCreateRuleRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateEventCreateRule', - $argument, - ['\Google\Analytics\Admin\V1alpha\EventCreateRule', 'decode'], - $metadata, $options); - } - - /** - * Updates an EventCreateRule. - * @param \Google\Analytics\Admin\V1alpha\UpdateEventCreateRuleRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateEventCreateRule(\Google\Analytics\Admin\V1alpha\UpdateEventCreateRuleRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEventCreateRule', - $argument, - ['\Google\Analytics\Admin\V1alpha\EventCreateRule', 'decode'], - $metadata, $options); - } - - /** - * Deletes an EventCreateRule. - * @param \Google\Analytics\Admin\V1alpha\DeleteEventCreateRuleRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteEventCreateRule(\Google\Analytics\Admin\V1alpha\DeleteEventCreateRuleRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteEventCreateRule', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - -} diff --git a/AnalyticsAdmin/src/V1alpha/AndroidAppDataStream.php b/AnalyticsAdmin/src/V1alpha/AndroidAppDataStream.php deleted file mode 100644 index c4c053730468..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AndroidAppDataStream.php +++ /dev/null @@ -1,277 +0,0 @@ -google.analytics.admin.v1alpha.AndroidAppDataStream - */ -class AndroidAppDataStream extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/1000/androidAppDataStreams/2000" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $name = ''; - /** - * Output only. ID of the corresponding Android app in Firebase, if any. - * This ID can change if the Android app is deleted and recreated. - * - * Generated from protobuf field string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $firebase_app_id = ''; - /** - * Output only. Time when this stream was originally created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $create_time = null; - /** - * Output only. Time when stream payload fields were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $update_time = null; - /** - * Immutable. The package name for the app being measured. - * Example: "com.example.myandroidapp" - * - * Generated from protobuf field string package_name = 5 [(.google.api.field_behavior) = IMMUTABLE]; - */ - private $package_name = ''; - /** - * Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * - * Generated from protobuf field string display_name = 6; - */ - private $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/1000/androidAppDataStreams/2000" - * @type string $firebase_app_id - * Output only. ID of the corresponding Android app in Firebase, if any. - * This ID can change if the Android app is deleted and recreated. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when this stream was originally created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time when stream payload fields were last updated. - * @type string $package_name - * Immutable. The package name for the app being measured. - * Example: "com.example.myandroidapp" - * @type string $display_name - * Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/1000/androidAppDataStreams/2000" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/1000/androidAppDataStreams/2000" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - 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. - * - * Generated from protobuf field string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFirebaseAppId() - { - return $this->firebase_app_id; - } - - /** - * Output only. ID of the corresponding Android app in Firebase, if any. - * This ID can change if the Android app is deleted and recreated. - * - * Generated from protobuf field string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFirebaseAppId($var) - { - GPBUtil::checkString($var, True); - $this->firebase_app_id = $var; - - return $this; - } - - /** - * Output only. Time when this stream was originally created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time when this stream was originally created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time when stream payload fields were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Time when stream payload fields were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Immutable. The package name for the app being measured. - * Example: "com.example.myandroidapp" - * - * Generated from protobuf field string package_name = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getPackageName() - { - return $this->package_name; - } - - /** - * Immutable. The package name for the app being measured. - * Example: "com.example.myandroidapp" - * - * Generated from protobuf field string package_name = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setPackageName($var) - { - GPBUtil::checkString($var, True); - $this->package_name = $var; - - return $this; - } - - /** - * Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * - * Generated from protobuf field string display_name = 6; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * - * Generated from protobuf field string display_name = 6; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/ApproveDisplayVideo360AdvertiserLinkProposalRequest.php b/AnalyticsAdmin/src/V1alpha/ApproveDisplayVideo360AdvertiserLinkProposalRequest.php index 789cc358b3f1..a52787771996 100644 --- a/AnalyticsAdmin/src/V1alpha/ApproveDisplayVideo360AdvertiserLinkProposalRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ApproveDisplayVideo360AdvertiserLinkProposalRequest.php @@ -21,7 +21,7 @@ class ApproveDisplayVideo360AdvertiserLinkProposalRequest extends \Google\Protob * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ApproveDisplayVideo360AdvertiserLinkProposalResponse.php b/AnalyticsAdmin/src/V1alpha/ApproveDisplayVideo360AdvertiserLinkProposalResponse.php index 28d115857505..43bf9175e1d0 100644 --- a/AnalyticsAdmin/src/V1alpha/ApproveDisplayVideo360AdvertiserLinkProposalResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ApproveDisplayVideo360AdvertiserLinkProposalResponse.php @@ -21,7 +21,7 @@ class ApproveDisplayVideo360AdvertiserLinkProposalResponse extends \Google\Proto * * Generated from protobuf field .google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink display_video_360_advertiser_link = 1; */ - private $display_video_360_advertiser_link = null; + protected $display_video_360_advertiser_link = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ArchiveAudienceRequest.php b/AnalyticsAdmin/src/V1alpha/ArchiveAudienceRequest.php index b621bb55703c..e87bb551c107 100644 --- a/AnalyticsAdmin/src/V1alpha/ArchiveAudienceRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ArchiveAudienceRequest.php @@ -20,7 +20,7 @@ class ArchiveAudienceRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ArchiveCustomDimensionRequest.php b/AnalyticsAdmin/src/V1alpha/ArchiveCustomDimensionRequest.php index 73a4099e08b7..0edd74fe7bb8 100644 --- a/AnalyticsAdmin/src/V1alpha/ArchiveCustomDimensionRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ArchiveCustomDimensionRequest.php @@ -21,7 +21,7 @@ class ArchiveCustomDimensionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CustomDimension to archive. diff --git a/AnalyticsAdmin/src/V1alpha/ArchiveCustomMetricRequest.php b/AnalyticsAdmin/src/V1alpha/ArchiveCustomMetricRequest.php index bcf59dfa77c0..997f8e3cb748 100644 --- a/AnalyticsAdmin/src/V1alpha/ArchiveCustomMetricRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ArchiveCustomMetricRequest.php @@ -21,7 +21,7 @@ class ArchiveCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CustomMetric to archive. diff --git a/AnalyticsAdmin/src/V1alpha/AttributionSettings.php b/AnalyticsAdmin/src/V1alpha/AttributionSettings.php index 07bf21cd6c3d..f166baedc5d9 100644 --- a/AnalyticsAdmin/src/V1alpha/AttributionSettings.php +++ b/AnalyticsAdmin/src/V1alpha/AttributionSettings.php @@ -23,21 +23,21 @@ class AttributionSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. The lookback window configuration for acquisition conversion * events. The default window size is 30 days. * * Generated from protobuf field .google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow acquisition_conversion_event_lookback_window = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $acquisition_conversion_event_lookback_window = 0; + protected $acquisition_conversion_event_lookback_window = 0; /** * Required. The lookback window for all other, non-acquisition conversion * events. The default window size is 90 days. * * Generated from protobuf field .google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow other_conversion_event_lookback_window = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $other_conversion_event_lookback_window = 0; + protected $other_conversion_event_lookback_window = 0; /** * Required. The reporting attribution model used to calculate conversion * credit in this property's reports. @@ -47,14 +47,14 @@ class AttributionSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel reporting_attribution_model = 4 [(.google.api.field_behavior) = REQUIRED]; */ - private $reporting_attribution_model = 0; + protected $reporting_attribution_model = 0; /** * Required. The Conversion Export Scope for data exported to linked Ads * Accounts. * * Generated from protobuf field .google.analytics.admin.v1alpha.AttributionSettings.AdsWebConversionDataExportScope ads_web_conversion_data_export_scope = 5 [(.google.api.field_behavior) = REQUIRED]; */ - private $ads_web_conversion_data_export_scope = 0; + protected $ads_web_conversion_data_export_scope = 0; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AttributionSettings/AcquisitionConversionEventLookbackWindow.php b/AnalyticsAdmin/src/V1alpha/AttributionSettings/AcquisitionConversionEventLookbackWindow.php index 27addf5b305e..04adba684673 100644 --- a/AnalyticsAdmin/src/V1alpha/AttributionSettings/AcquisitionConversionEventLookbackWindow.php +++ b/AnalyticsAdmin/src/V1alpha/AttributionSettings/AcquisitionConversionEventLookbackWindow.php @@ -61,6 +61,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AcquisitionConversionEventLookbackWindow::class, \Google\Analytics\Admin\V1alpha\AttributionSettings_AcquisitionConversionEventLookbackWindow::class); diff --git a/AnalyticsAdmin/src/V1alpha/AttributionSettings/AdsWebConversionDataExportScope.php b/AnalyticsAdmin/src/V1alpha/AttributionSettings/AdsWebConversionDataExportScope.php index 71ce27a0c6dc..4f5a8a505e35 100644 --- a/AnalyticsAdmin/src/V1alpha/AttributionSettings/AdsWebConversionDataExportScope.php +++ b/AnalyticsAdmin/src/V1alpha/AttributionSettings/AdsWebConversionDataExportScope.php @@ -72,6 +72,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AdsWebConversionDataExportScope::class, \Google\Analytics\Admin\V1alpha\AttributionSettings_AdsWebConversionDataExportScope::class); diff --git a/AnalyticsAdmin/src/V1alpha/AttributionSettings/OtherConversionEventLookbackWindow.php b/AnalyticsAdmin/src/V1alpha/AttributionSettings/OtherConversionEventLookbackWindow.php index 9524df564097..75617efff190 100644 --- a/AnalyticsAdmin/src/V1alpha/AttributionSettings/OtherConversionEventLookbackWindow.php +++ b/AnalyticsAdmin/src/V1alpha/AttributionSettings/OtherConversionEventLookbackWindow.php @@ -68,6 +68,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OtherConversionEventLookbackWindow::class, \Google\Analytics\Admin\V1alpha\AttributionSettings_OtherConversionEventLookbackWindow::class); diff --git a/AnalyticsAdmin/src/V1alpha/AttributionSettings/ReportingAttributionModel.php b/AnalyticsAdmin/src/V1alpha/AttributionSettings/ReportingAttributionModel.php index e803a4d1e47e..560cd054ea4b 100644 --- a/AnalyticsAdmin/src/V1alpha/AttributionSettings/ReportingAttributionModel.php +++ b/AnalyticsAdmin/src/V1alpha/AttributionSettings/ReportingAttributionModel.php @@ -75,6 +75,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReportingAttributionModel::class, \Google\Analytics\Admin\V1alpha\AttributionSettings_ReportingAttributionModel::class); diff --git a/AnalyticsAdmin/src/V1alpha/AttributionSettings_AcquisitionConversionEventLookbackWindow.php b/AnalyticsAdmin/src/V1alpha/AttributionSettings_AcquisitionConversionEventLookbackWindow.php deleted file mode 100644 index 3b43dcb4d765..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AttributionSettings_AcquisitionConversionEventLookbackWindow.php +++ /dev/null @@ -1,16 +0,0 @@ -string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. The display name of the Audience. * * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Required. The description of the Audience. * * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $description = ''; + protected $description = ''; /** * Required. Immutable. The duration a user should stay in an Audience. It * cannot be set to more than 540 days. * * Generated from protobuf field int32 membership_duration_days = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $membership_duration_days = 0; + protected $membership_duration_days = 0; /** * Output only. It is automatically set by GA to false if this is an NPA * Audience and is excluded from ads personalization. * * Generated from protobuf field bool ads_personalization_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $ads_personalization_enabled = false; + protected $ads_personalization_enabled = false; /** * Optional. Specifies an event to log when a user joins the Audience. If not * set, no event is logged when a user joins the Audience. * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceEventTrigger event_trigger = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private $event_trigger = null; + protected $event_trigger = null; /** * Immutable. Specifies how long an exclusion lasts for users that meet the * exclusion filter. It is applied to all EXCLUDE filter clauses and is @@ -62,7 +62,7 @@ class Audience extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode exclusion_duration_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $exclusion_duration_mode = 0; + protected $exclusion_duration_mode = 0; /** * Required. Immutable. Unordered list. Filter clauses that define the * Audience. All clauses will be AND’ed together. @@ -75,7 +75,7 @@ class Audience extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/Audience/AudienceExclusionDurationMode.php b/AnalyticsAdmin/src/V1alpha/Audience/AudienceExclusionDurationMode.php index 21f2bcb25177..c646e43ea8fb 100644 --- a/AnalyticsAdmin/src/V1alpha/Audience/AudienceExclusionDurationMode.php +++ b/AnalyticsAdmin/src/V1alpha/Audience/AudienceExclusionDurationMode.php @@ -61,6 +61,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AudienceExclusionDurationMode::class, \Google\Analytics\Admin\V1alpha\Audience_AudienceExclusionDurationMode::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter.php b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter.php index c4b6cfa6f48c..40a3b3c74607 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter.php @@ -25,7 +25,7 @@ class AudienceDimensionOrMetricFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $field_name = ''; + protected $field_name = ''; /** * Optional. Indicates whether this filter needs dynamic evaluation or not. If * set to true, users join the Audience if they ever met the condition (static @@ -36,7 +36,7 @@ class AudienceDimensionOrMetricFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool at_any_point_in_time = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private $at_any_point_in_time = false; + protected $at_any_point_in_time = false; /** * Optional. If set, specifies the time window for which to evaluate data in * number of days. If not set, then audience data is evaluated against @@ -49,7 +49,7 @@ class AudienceDimensionOrMetricFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 in_any_n_day_period = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - private $in_any_n_day_period = 0; + protected $in_any_n_day_period = 0; protected $one_filter; /** diff --git a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/BetweenFilter.php b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/BetweenFilter.php index 61a078c45a8a..6b8bbcc85b48 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/BetweenFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/BetweenFilter.php @@ -21,13 +21,13 @@ class BetweenFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue from_value = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $from_value = null; + protected $from_value = null; /** * Required. Ends with this number, inclusive. * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue to_value = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $to_value = null; + protected $to_value = null; /** * Constructor. @@ -120,6 +120,4 @@ public function setToValue($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BetweenFilter::class, \Google\Analytics\Admin\V1alpha\AudienceDimensionOrMetricFilter_BetweenFilter::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/InListFilter.php b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/InListFilter.php index 7c1e75a9f72b..6dff96ecb137 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/InListFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/InListFilter.php @@ -28,7 +28,7 @@ class InListFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool case_sensitive = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $case_sensitive = false; + protected $case_sensitive = false; /** * Constructor. @@ -107,6 +107,4 @@ public function setCaseSensitive($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InListFilter::class, \Google\Analytics\Admin\V1alpha\AudienceDimensionOrMetricFilter_InListFilter::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericFilter.php b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericFilter.php index cae2b9129358..577df746b305 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericFilter.php @@ -20,13 +20,13 @@ class NumericFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation operation = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $operation = 0; + protected $operation = 0; /** * Required. The numeric or date value to match against. * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue value = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $value = null; + protected $value = null; /** * Constructor. @@ -109,6 +109,4 @@ public function setValue($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NumericFilter::class, \Google\Analytics\Admin\V1alpha\AudienceDimensionOrMetricFilter_NumericFilter::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericFilter/Operation.php b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericFilter/Operation.php index b2b52d8a9dfb..5efee3b52b20 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericFilter/Operation.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericFilter/Operation.php @@ -66,6 +66,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Operation::class, \Google\Analytics\Admin\V1alpha\AudienceDimensionOrMetricFilter_NumericFilter_Operation::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericValue.php b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericValue.php index d65da128ca78..2303182f1f07 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericValue.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/NumericValue.php @@ -106,6 +106,4 @@ public function getOneValue() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NumericValue::class, \Google\Analytics\Admin\V1alpha\AudienceDimensionOrMetricFilter_NumericValue::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/StringFilter.php b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/StringFilter.php index 39db0685c77b..1cf51315dff6 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/StringFilter.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/StringFilter.php @@ -20,20 +20,20 @@ class StringFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $match_type = 0; + protected $match_type = 0; /** * Required. The string value to be matched against. * * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $value = ''; + protected $value = ''; /** * Optional. If true, the match is case-sensitive. If false, the match is * case-insensitive. * * Generated from protobuf field bool case_sensitive = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $case_sensitive = false; + protected $case_sensitive = false; /** * Constructor. @@ -137,6 +137,4 @@ public function setCaseSensitive($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StringFilter::class, \Google\Analytics\Admin\V1alpha\AudienceDimensionOrMetricFilter_StringFilter::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/StringFilter/MatchType.php b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/StringFilter/MatchType.php index 105fe57e2707..85f8931cef72 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/StringFilter/MatchType.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter/StringFilter/MatchType.php @@ -80,6 +80,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MatchType::class, \Google\Analytics\Admin\V1alpha\AudienceDimensionOrMetricFilter_StringFilter_MatchType::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_BetweenFilter.php b/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_BetweenFilter.php deleted file mode 100644 index fb396b1f462a..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AudienceDimensionOrMetricFilter_BetweenFilter.php +++ /dev/null @@ -1,16 +0,0 @@ -string event_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $event_name = ''; + protected $event_name = ''; /** * Optional. If specified, this filter matches events that match both the * single event name and the parameter filter expressions. AudienceEventFilter @@ -34,7 +34,7 @@ class AudienceEventFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceFilterExpression event_parameter_filter_expression = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $event_parameter_filter_expression = null; + protected $event_parameter_filter_expression = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger.php b/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger.php index cbed10a73d1f..59c9d32c6bbc 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger.php @@ -20,13 +20,13 @@ class AudienceEventTrigger extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string event_name = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $event_name = ''; + protected $event_name = ''; /** * Required. When to log the event. * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition log_condition = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $log_condition = 0; + protected $log_condition = 0; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger/LogCondition.php b/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger/LogCondition.php index 601573c7be47..ede827c4edd1 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger/LogCondition.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger/LogCondition.php @@ -60,6 +60,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LogCondition::class, \Google\Analytics\Admin\V1alpha\AudienceEventTrigger_LogCondition::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger_LogCondition.php b/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger_LogCondition.php deleted file mode 100644 index d085adcccab3..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AudienceEventTrigger_LogCondition.php +++ /dev/null @@ -1,16 +0,0 @@ -.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $clause_type = 0; + protected $clause_type = 0; protected $filter; /** diff --git a/AnalyticsAdmin/src/V1alpha/AudienceFilterClause/AudienceClauseType.php b/AnalyticsAdmin/src/V1alpha/AudienceFilterClause/AudienceClauseType.php index a15a7e9cb3b7..3bf6d0d40b4d 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceFilterClause/AudienceClauseType.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceFilterClause/AudienceClauseType.php @@ -63,6 +63,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AudienceClauseType::class, \Google\Analytics\Admin\V1alpha\AudienceFilterClause_AudienceClauseType::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceFilterClause_AudienceClauseType.php b/AnalyticsAdmin/src/V1alpha/AudienceFilterClause_AudienceClauseType.php deleted file mode 100644 index f2767fabf30f..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AudienceFilterClause_AudienceClauseType.php +++ /dev/null @@ -1,16 +0,0 @@ -.google.analytics.admin.v1alpha.AudienceFilterScope scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $scope = 0; + protected $scope = 0; /** * Optional. Defines the time period in which the whole sequence must occur. * * Generated from protobuf field .google.protobuf.Duration sequence_maximum_duration = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $sequence_maximum_duration = null; + protected $sequence_maximum_duration = null; /** * Required. An ordered sequence of steps. A user must complete each step in * order to join the sequence filter. diff --git a/AnalyticsAdmin/src/V1alpha/AudienceSequenceFilter/AudienceSequenceStep.php b/AnalyticsAdmin/src/V1alpha/AudienceSequenceFilter/AudienceSequenceStep.php index ae8362de6e25..97ea49a04cce 100644 --- a/AnalyticsAdmin/src/V1alpha/AudienceSequenceFilter/AudienceSequenceStep.php +++ b/AnalyticsAdmin/src/V1alpha/AudienceSequenceFilter/AudienceSequenceStep.php @@ -21,7 +21,7 @@ class AudienceSequenceStep extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceFilterScope scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $scope = 0; + protected $scope = 0; /** * Optional. If true, the event satisfying this step must be the very next * event after the event satisfying the last step. If unset or false, this @@ -31,7 +31,7 @@ class AudienceSequenceStep extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool immediately_follows = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $immediately_follows = false; + protected $immediately_follows = false; /** * Optional. When set, this step must be satisfied within the * constraint_duration of the previous step (For example, t[i] - t[i-1] <= @@ -40,14 +40,14 @@ class AudienceSequenceStep extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.Duration constraint_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $constraint_duration = null; + protected $constraint_duration = null; /** * Required. Immutable. A logical expression of Audience dimension, metric, * or event filters in each step. * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceFilterExpression filter_expression = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $filter_expression = null; + protected $filter_expression = null; /** * Constructor. @@ -220,6 +220,4 @@ public function setFilterExpression($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AudienceSequenceStep::class, \Google\Analytics\Admin\V1alpha\AudienceSequenceFilter_AudienceSequenceStep::class); diff --git a/AnalyticsAdmin/src/V1alpha/AudienceSequenceFilter_AudienceSequenceStep.php b/AnalyticsAdmin/src/V1alpha/AudienceSequenceFilter_AudienceSequenceStep.php deleted file mode 100644 index 765121a3fc2f..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AudienceSequenceFilter_AudienceSequenceStep.php +++ /dev/null @@ -1,16 +0,0 @@ -.google.analytics.admin.v1alpha.AudienceFilterScope scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $scope = 0; + protected $scope = 0; /** * Required. Immutable. A logical expression of Audience dimension, metric, or * event filters. * * Generated from protobuf field .google.analytics.admin.v1alpha.AudienceFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $filter_expression = null; + protected $filter_expression = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/Audience_AudienceExclusionDurationMode.php b/AnalyticsAdmin/src/V1alpha/Audience_AudienceExclusionDurationMode.php deleted file mode 100644 index 000f73240e7c..000000000000 --- a/AnalyticsAdmin/src/V1alpha/Audience_AudienceExclusionDurationMode.php +++ /dev/null @@ -1,16 +0,0 @@ -google.analytics.admin.v1alpha.AuditUserLink - */ -class AuditUserLink extends \Google\Protobuf\Internal\Message -{ - /** - * Example format: properties/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1; - */ - private $name = ''; - /** - * Email address of the linked user - * - * Generated from protobuf field string email_address = 2; - */ - private $email_address = ''; - /** - * Roles directly assigned to this user for this entity. - * Format: predefinedRoles/viewer - * Excludes roles that are inherited from an account (if this is for a - * property), group, or organization admin role. - * - * Generated from protobuf field repeated string direct_roles = 3; - */ - private $direct_roles; - /** - * Union of all permissions a user has at this account or property (includes - * direct permissions, group-inherited permissions, etc.). - * Format: predefinedRoles/viewer - * - * Generated from protobuf field repeated string effective_roles = 4; - */ - private $effective_roles; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Example format: properties/1234/userLinks/5678 - * @type string $email_address - * Email address of the linked user - * @type array|\Google\Protobuf\Internal\RepeatedField $direct_roles - * Roles directly assigned to this user for this entity. - * Format: predefinedRoles/viewer - * Excludes roles that are inherited from an account (if this is for a - * property), group, or organization admin role. - * @type array|\Google\Protobuf\Internal\RepeatedField $effective_roles - * Union of all permissions a user has at this account or property (includes - * direct permissions, group-inherited permissions, etc.). - * Format: predefinedRoles/viewer - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Example format: properties/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Example format: properties/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Email address of the linked user - * - * Generated from protobuf field string email_address = 2; - * @return string - */ - public function getEmailAddress() - { - return $this->email_address; - } - - /** - * Email address of the linked user - * - * Generated from protobuf field string email_address = 2; - * @param string $var - * @return $this - */ - public function setEmailAddress($var) - { - GPBUtil::checkString($var, True); - $this->email_address = $var; - - return $this; - } - - /** - * Roles directly assigned to this user for this entity. - * Format: predefinedRoles/viewer - * Excludes roles that are inherited from an account (if this is for a - * property), group, or organization admin role. - * - * Generated from protobuf field repeated string direct_roles = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDirectRoles() - { - return $this->direct_roles; - } - - /** - * Roles directly assigned to this user for this entity. - * Format: predefinedRoles/viewer - * Excludes roles that are inherited from an account (if this is for a - * property), group, or organization admin role. - * - * Generated from protobuf field repeated string direct_roles = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDirectRoles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->direct_roles = $arr; - - return $this; - } - - /** - * Union of all permissions a user has at this account or property (includes - * direct permissions, group-inherited permissions, etc.). - * Format: predefinedRoles/viewer - * - * Generated from protobuf field repeated string effective_roles = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEffectiveRoles() - { - return $this->effective_roles; - } - - /** - * Union of all permissions a user has at this account or property (includes - * direct permissions, group-inherited permissions, etc.). - * Format: predefinedRoles/viewer - * - * Generated from protobuf field repeated string effective_roles = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEffectiveRoles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->effective_roles = $arr; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/AuditUserLinksRequest.php b/AnalyticsAdmin/src/V1alpha/AuditUserLinksRequest.php deleted file mode 100644 index 8906034f4cde..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AuditUserLinksRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.analytics.admin.v1alpha.AuditUserLinksRequest - */ -class AuditUserLinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. - * - * Generated from protobuf field int32 page_size = 2; - */ - private $page_size = 0; - /** - * A page token, received from a previous `AuditUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - private $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Example format: accounts/1234 - * @type int $page_size - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. - * @type string $page_token - * A page token, received from a previous `AuditUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `AuditUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `AuditUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/AuditUserLinksResponse.php b/AnalyticsAdmin/src/V1alpha/AuditUserLinksResponse.php deleted file mode 100644 index 6cfc964e8ee2..000000000000 --- a/AnalyticsAdmin/src/V1alpha/AuditUserLinksResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.analytics.admin.v1alpha.AuditUserLinksResponse - */ -class AuditUserLinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of AuditUserLinks. These will be ordered stably, but in an arbitrary - * order. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; - */ - private $user_links; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - private $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Analytics\Admin\V1alpha\AuditUserLink>|\Google\Protobuf\Internal\RepeatedField $user_links - * List of AuditUserLinks. These will be ordered stably, but in an arbitrary - * order. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of AuditUserLinks. These will be ordered stably, but in an arbitrary - * order. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserLinks() - { - return $this->user_links; - } - - /** - * List of AuditUserLinks. These will be ordered stably, but in an arbitrary - * order. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; - * @param array<\Google\Analytics\Admin\V1alpha\AuditUserLink>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\AuditUserLink::class); - $this->user_links = $arr; - - 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. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/BatchCreateAccessBindingsRequest.php b/AnalyticsAdmin/src/V1alpha/BatchCreateAccessBindingsRequest.php index 6925bbc93a38..537b7dbd330a 100644 --- a/AnalyticsAdmin/src/V1alpha/BatchCreateAccessBindingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/BatchCreateAccessBindingsRequest.php @@ -24,7 +24,7 @@ class BatchCreateAccessBindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The requests specifying the access bindings to create. * A maximum of 1000 access bindings can be created in a batch. diff --git a/AnalyticsAdmin/src/V1alpha/BatchCreateUserLinksRequest.php b/AnalyticsAdmin/src/V1alpha/BatchCreateUserLinksRequest.php deleted file mode 100644 index 1d37d649b018..000000000000 --- a/AnalyticsAdmin/src/V1alpha/BatchCreateUserLinksRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.analytics.admin.v1alpha.BatchCreateUserLinksRequest - */ -class BatchCreateUserLinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The account or property that all user links in the request are - * for. This field is required. The parent field in the CreateUserLinkRequest - * messages must either be empty or match this field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * Optional. If set, then email the new users notifying them that they've been - * granted permissions to the resource. Regardless of whether this is set or - * not, notify_new_user field inside each individual request is ignored. - * - * Generated from protobuf field bool notify_new_users = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $notify_new_users = false; - /** - * Required. The requests specifying the user links to create. - * A maximum of 1000 user links can be created in a batch. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The account or property that all user links in the request are - * for. This field is required. The parent field in the CreateUserLinkRequest - * messages must either be empty or match this field. - * Example format: accounts/1234 - * @type bool $notify_new_users - * Optional. If set, then email the new users notifying them that they've been - * granted permissions to the resource. Regardless of whether this is set or - * not, notify_new_user field inside each individual request is ignored. - * @type array<\Google\Analytics\Admin\V1alpha\CreateUserLinkRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. The requests specifying the user links to create. - * A maximum of 1000 user links can be created in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The account or property that all user links in the request are - * for. This field is required. The parent field in the CreateUserLinkRequest - * messages must either be empty or match this field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The account or property that all user links in the request are - * for. This field is required. The parent field in the CreateUserLinkRequest - * messages must either be empty or match this field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. If set, then email the new users notifying them that they've been - * granted permissions to the resource. Regardless of whether this is set or - * not, notify_new_user field inside each individual request is ignored. - * - * Generated from protobuf field bool notify_new_users = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getNotifyNewUsers() - { - return $this->notify_new_users; - } - - /** - * Optional. If set, then email the new users notifying them that they've been - * granted permissions to the resource. Regardless of whether this is set or - * not, notify_new_user field inside each individual request is ignored. - * - * Generated from protobuf field bool notify_new_users = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setNotifyNewUsers($var) - { - GPBUtil::checkBool($var); - $this->notify_new_users = $var; - - return $this; - } - - /** - * Required. The requests specifying the user links to create. - * A maximum of 1000 user links can be created in a batch. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The requests specifying the user links to create. - * A maximum of 1000 user links can be created in a batch. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Analytics\Admin\V1alpha\CreateUserLinkRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\CreateUserLinkRequest::class); - $this->requests = $arr; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/BatchCreateUserLinksResponse.php b/AnalyticsAdmin/src/V1alpha/BatchCreateUserLinksResponse.php deleted file mode 100644 index a17b5cc43eeb..000000000000 --- a/AnalyticsAdmin/src/V1alpha/BatchCreateUserLinksResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.analytics.admin.v1alpha.BatchCreateUserLinksResponse - */ -class BatchCreateUserLinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The user links created. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - private $user_links; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Analytics\Admin\V1alpha\UserLink>|\Google\Protobuf\Internal\RepeatedField $user_links - * The user links created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The user links created. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserLinks() - { - return $this->user_links; - } - - /** - * The user links created. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - * @param array<\Google\Analytics\Admin\V1alpha\UserLink>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\UserLink::class); - $this->user_links = $arr; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/BatchDeleteAccessBindingsRequest.php b/AnalyticsAdmin/src/V1alpha/BatchDeleteAccessBindingsRequest.php index a7dfe0bdd48b..4aae0f4947b9 100644 --- a/AnalyticsAdmin/src/V1alpha/BatchDeleteAccessBindingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/BatchDeleteAccessBindingsRequest.php @@ -24,7 +24,7 @@ class BatchDeleteAccessBindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The requests specifying the access bindings to delete. * A maximum of 1000 access bindings can be deleted in a batch. diff --git a/AnalyticsAdmin/src/V1alpha/BatchDeleteUserLinksRequest.php b/AnalyticsAdmin/src/V1alpha/BatchDeleteUserLinksRequest.php deleted file mode 100644 index 21e1ec9e321c..000000000000 --- a/AnalyticsAdmin/src/V1alpha/BatchDeleteUserLinksRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest - */ -class BatchDeleteUserLinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The account or property that all user links in the request are - * for. The parent of all values for user link names to delete must match this - * field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * Required. The requests specifying the user links to update. - * A maximum of 1000 user links can be updated in a batch. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The account or property that all user links in the request are - * for. The parent of all values for user link names to delete must match this - * field. - * Example format: accounts/1234 - * @type array<\Google\Analytics\Admin\V1alpha\DeleteUserLinkRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. The requests specifying the user links to update. - * A maximum of 1000 user links can be updated in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The account or property that all user links in the request are - * for. The parent of all values for user link names to delete must match this - * field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The account or property that all user links in the request are - * for. The parent of all values for user link names to delete must match this - * field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The requests specifying the user links to update. - * A maximum of 1000 user links can be updated in a batch. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The requests specifying the user links to update. - * A maximum of 1000 user links can be updated in a batch. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Analytics\Admin\V1alpha\DeleteUserLinkRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\DeleteUserLinkRequest::class); - $this->requests = $arr; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/BatchGetAccessBindingsRequest.php b/AnalyticsAdmin/src/V1alpha/BatchGetAccessBindingsRequest.php index 1a662df406aa..b1880eb346b5 100644 --- a/AnalyticsAdmin/src/V1alpha/BatchGetAccessBindingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/BatchGetAccessBindingsRequest.php @@ -24,7 +24,7 @@ class BatchGetAccessBindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The names of the access bindings to retrieve. * A maximum of 1000 access bindings can be retrieved in a batch. diff --git a/AnalyticsAdmin/src/V1alpha/BatchGetUserLinksRequest.php b/AnalyticsAdmin/src/V1alpha/BatchGetUserLinksRequest.php deleted file mode 100644 index 4251ee1c1dd4..000000000000 --- a/AnalyticsAdmin/src/V1alpha/BatchGetUserLinksRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.analytics.admin.v1alpha.BatchGetUserLinksRequest - */ -class BatchGetUserLinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The account or property that all user links in the request are - * for. The parent of all provided values for the 'names' field must match - * this field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * Required. The names of the user links to retrieve. - * A maximum of 1000 user links can be retrieved in a batch. - * Format: accounts/{accountId}/userLinks/{userLinkId} - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The account or property that all user links in the request are - * for. The parent of all provided values for the 'names' field must match - * this field. - * Example format: accounts/1234 - * @type array|\Google\Protobuf\Internal\RepeatedField $names - * Required. The names of the user links to retrieve. - * A maximum of 1000 user links can be retrieved in a batch. - * Format: accounts/{accountId}/userLinks/{userLinkId} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The account or property that all user links in the request are - * for. The parent of all provided values for the 'names' field must match - * this field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The account or property that all user links in the request are - * for. The parent of all provided values for the 'names' field must match - * this field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The names of the user links to retrieve. - * A maximum of 1000 user links can be retrieved in a batch. - * Format: accounts/{accountId}/userLinks/{userLinkId} - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * Required. The names of the user links to retrieve. - * A maximum of 1000 user links can be retrieved in a batch. - * Format: accounts/{accountId}/userLinks/{userLinkId} - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->names = $arr; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/BatchGetUserLinksResponse.php b/AnalyticsAdmin/src/V1alpha/BatchGetUserLinksResponse.php deleted file mode 100644 index b1f450088463..000000000000 --- a/AnalyticsAdmin/src/V1alpha/BatchGetUserLinksResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.analytics.admin.v1alpha.BatchGetUserLinksResponse - */ -class BatchGetUserLinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested user links. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - private $user_links; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Analytics\Admin\V1alpha\UserLink>|\Google\Protobuf\Internal\RepeatedField $user_links - * The requested user links. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The requested user links. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserLinks() - { - return $this->user_links; - } - - /** - * The requested user links. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - * @param array<\Google\Analytics\Admin\V1alpha\UserLink>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\UserLink::class); - $this->user_links = $arr; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/BatchUpdateAccessBindingsRequest.php b/AnalyticsAdmin/src/V1alpha/BatchUpdateAccessBindingsRequest.php index d04a6bb25cc6..a79e2f38d164 100644 --- a/AnalyticsAdmin/src/V1alpha/BatchUpdateAccessBindingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/BatchUpdateAccessBindingsRequest.php @@ -25,7 +25,7 @@ class BatchUpdateAccessBindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The requests specifying the access bindings to update. * A maximum of 1000 access bindings can be updated in a batch. diff --git a/AnalyticsAdmin/src/V1alpha/BatchUpdateUserLinksRequest.php b/AnalyticsAdmin/src/V1alpha/BatchUpdateUserLinksRequest.php deleted file mode 100644 index e66a3b6ee2a2..000000000000 --- a/AnalyticsAdmin/src/V1alpha/BatchUpdateUserLinksRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest - */ -class BatchUpdateUserLinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The account or property that all user links in the request are - * for. The parent field in the UpdateUserLinkRequest messages must either be - * empty or match this field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * Required. The requests specifying the user links to update. - * A maximum of 1000 user links can be updated in a batch. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The account or property that all user links in the request are - * for. The parent field in the UpdateUserLinkRequest messages must either be - * empty or match this field. - * Example format: accounts/1234 - * @type array<\Google\Analytics\Admin\V1alpha\UpdateUserLinkRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. The requests specifying the user links to update. - * A maximum of 1000 user links can be updated in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The account or property that all user links in the request are - * for. The parent field in the UpdateUserLinkRequest messages must either be - * empty or match this field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The account or property that all user links in the request are - * for. The parent field in the UpdateUserLinkRequest messages must either be - * empty or match this field. - * Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The requests specifying the user links to update. - * A maximum of 1000 user links can be updated in a batch. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The requests specifying the user links to update. - * A maximum of 1000 user links can be updated in a batch. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Analytics\Admin\V1alpha\UpdateUserLinkRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\UpdateUserLinkRequest::class); - $this->requests = $arr; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/BatchUpdateUserLinksResponse.php b/AnalyticsAdmin/src/V1alpha/BatchUpdateUserLinksResponse.php deleted file mode 100644 index 01f62c64c584..000000000000 --- a/AnalyticsAdmin/src/V1alpha/BatchUpdateUserLinksResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse - */ -class BatchUpdateUserLinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The user links updated. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - private $user_links; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Analytics\Admin\V1alpha\UserLink>|\Google\Protobuf\Internal\RepeatedField $user_links - * The user links updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The user links updated. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserLinks() - { - return $this->user_links; - } - - /** - * The user links updated. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - * @param array<\Google\Analytics\Admin\V1alpha\UserLink>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\UserLink::class); - $this->user_links = $arr; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/BigQueryLink.php b/AnalyticsAdmin/src/V1alpha/BigQueryLink.php index 301cbf0ecbeb..2cd314d42a6e 100644 --- a/AnalyticsAdmin/src/V1alpha/BigQueryLink.php +++ b/AnalyticsAdmin/src/V1alpha/BigQueryLink.php @@ -22,7 +22,7 @@ class BigQueryLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The linked Google Cloud project. When creating a BigQueryLink, * you may provide this resource name using either a project number or project @@ -33,38 +33,38 @@ class BigQueryLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $project = ''; + protected $project = ''; /** * Output only. Time when the link was created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * If set true, enables daily data export to the linked Google Cloud project. * * Generated from protobuf field bool daily_export_enabled = 4; */ - private $daily_export_enabled = false; + protected $daily_export_enabled = false; /** * If set true, enables streaming export to the linked Google Cloud project. * * Generated from protobuf field bool streaming_export_enabled = 5; */ - private $streaming_export_enabled = false; + protected $streaming_export_enabled = false; /** * If set true, enables fresh daily export to the linked Google Cloud project. * * Generated from protobuf field bool fresh_daily_export_enabled = 9; */ - private $fresh_daily_export_enabled = false; + protected $fresh_daily_export_enabled = false; /** * If set true, exported data will include advertising identifiers for mobile * app streams. * * Generated from protobuf field bool include_advertising_id = 6; */ - private $include_advertising_id = false; + protected $include_advertising_id = false; /** * The list of streams under the parent property for which data will be * exported. @@ -87,7 +87,7 @@ class BigQueryLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string dataset_location = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; */ - private $dataset_location = ''; + protected $dataset_location = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/CalculatedMetric.php b/AnalyticsAdmin/src/V1alpha/CalculatedMetric.php index 10f0a1d84d8a..17ac5e25337d 100644 --- a/AnalyticsAdmin/src/V1alpha/CalculatedMetric.php +++ b/AnalyticsAdmin/src/V1alpha/CalculatedMetric.php @@ -21,21 +21,21 @@ class CalculatedMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Optional. Description for this calculated metric. * Max length of 4096 characters. * * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $description = ''; + protected $description = ''; /** * Required. Display name for this calculated metric as shown in the * Google Analytics UI. Max length 82 characters. * * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Output only. The ID to use for the calculated metric. In the UI, this is * referred to as the "API name." @@ -44,13 +44,13 @@ class CalculatedMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string calculated_metric_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $calculated_metric_id = ''; + protected $calculated_metric_id = ''; /** * Required. The type for the calculated metric's value. * * Generated from protobuf field .google.analytics.admin.v1alpha.CalculatedMetric.MetricUnit metric_unit = 5 [(.google.api.field_behavior) = REQUIRED]; */ - private $metric_unit = 0; + protected $metric_unit = 0; /** * Output only. Types of restricted data that this metric contains. * @@ -68,7 +68,7 @@ class CalculatedMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string formula = 7 [(.google.api.field_behavior) = REQUIRED]; */ - private $formula = ''; + protected $formula = ''; /** * Output only. If true, this calculated metric has a invalid metric * reference. Anything using a calculated metric with invalid_metric_reference @@ -76,7 +76,7 @@ class CalculatedMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool invalid_metric_reference = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $invalid_metric_reference = false; + protected $invalid_metric_reference = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/CalculatedMetric/MetricUnit.php b/AnalyticsAdmin/src/V1alpha/CalculatedMetric/MetricUnit.php index d250ca5fa645..d6800c5fc6e7 100644 --- a/AnalyticsAdmin/src/V1alpha/CalculatedMetric/MetricUnit.php +++ b/AnalyticsAdmin/src/V1alpha/CalculatedMetric/MetricUnit.php @@ -115,6 +115,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetricUnit::class, \Google\Analytics\Admin\V1alpha\CalculatedMetric_MetricUnit::class); diff --git a/AnalyticsAdmin/src/V1alpha/CalculatedMetric/RestrictedMetricType.php b/AnalyticsAdmin/src/V1alpha/CalculatedMetric/RestrictedMetricType.php index 3443ac49b443..b34d135b9633 100644 --- a/AnalyticsAdmin/src/V1alpha/CalculatedMetric/RestrictedMetricType.php +++ b/AnalyticsAdmin/src/V1alpha/CalculatedMetric/RestrictedMetricType.php @@ -60,6 +60,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RestrictedMetricType::class, \Google\Analytics\Admin\V1alpha\CalculatedMetric_RestrictedMetricType::class); diff --git a/AnalyticsAdmin/src/V1alpha/CancelDisplayVideo360AdvertiserLinkProposalRequest.php b/AnalyticsAdmin/src/V1alpha/CancelDisplayVideo360AdvertiserLinkProposalRequest.php index f5417363ae5f..ef65eb9e7af7 100644 --- a/AnalyticsAdmin/src/V1alpha/CancelDisplayVideo360AdvertiserLinkProposalRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CancelDisplayVideo360AdvertiserLinkProposalRequest.php @@ -21,7 +21,7 @@ class CancelDisplayVideo360AdvertiserLinkProposalRequest extends \Google\Protobu * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange.php b/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange.php index 32f2c2f153bc..a02c687dc6f1 100644 --- a/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange.php +++ b/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange.php @@ -20,27 +20,27 @@ class ChangeHistoryChange extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string resource = 1; */ - private $resource = ''; + protected $resource = ''; /** * The type of action that changed this resource. * * Generated from protobuf field .google.analytics.admin.v1alpha.ActionType action = 2; */ - private $action = 0; + protected $action = 0; /** * Resource contents from before the change was made. If this resource was * created in this change, this field will be missing. * * Generated from protobuf field .google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; */ - private $resource_before_change = null; + protected $resource_before_change = null; /** * Resource contents from after the change was made. If this resource was * deleted in this change, this field will be missing. * * Generated from protobuf field .google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; */ - private $resource_after_change = null; + protected $resource_after_change = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange/ChangeHistoryResource.php b/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange/ChangeHistoryResource.php index 28c4f33e6054..d017111d17cf 100644 --- a/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange/ChangeHistoryResource.php +++ b/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange/ChangeHistoryResource.php @@ -875,6 +875,4 @@ public function getResource() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ChangeHistoryResource::class, \Google\Analytics\Admin\V1alpha\ChangeHistoryChange_ChangeHistoryResource::class); diff --git a/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange_ChangeHistoryResource.php b/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange_ChangeHistoryResource.php deleted file mode 100644 index 58bd374f4f04..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange_ChangeHistoryResource.php +++ /dev/null @@ -1,16 +0,0 @@ -string id = 1; */ - private $id = ''; + protected $id = ''; /** * Time when change was made. * * Generated from protobuf field .google.protobuf.Timestamp change_time = 2; */ - private $change_time = null; + protected $change_time = null; /** * The type of actor that made this change. * * Generated from protobuf field .google.analytics.admin.v1alpha.ActorType actor_type = 3; */ - private $actor_type = 0; + protected $actor_type = 0; /** * 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. @@ -43,14 +43,14 @@ class ChangeHistoryEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string user_actor_email = 4; */ - private $user_actor_email = ''; + protected $user_actor_email = ''; /** * If true, then the list of changes returned was filtered, and does not * represent all changes that occurred in this event. * * Generated from protobuf field bool changes_filtered = 5; */ - private $changes_filtered = false; + protected $changes_filtered = false; /** * A list of changes made in this change history event that fit the filters * specified in SearchChangeHistoryEventsRequest. diff --git a/AnalyticsAdmin/src/V1alpha/ChannelGroup.php b/AnalyticsAdmin/src/V1alpha/ChannelGroup.php index 29f3468b28e5..2550c1fa1eea 100644 --- a/AnalyticsAdmin/src/V1alpha/ChannelGroup.php +++ b/AnalyticsAdmin/src/V1alpha/ChannelGroup.php @@ -21,20 +21,20 @@ class ChannelGroup extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. The display name of the Channel Group. Max length of 80 * characters. * * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * The description of the Channel Group. Max length of 256 characters. * * Generated from protobuf field string description = 3; */ - private $description = ''; + protected $description = ''; /** * Required. The grouping rules of channels. Maximum number of rules is 50. * @@ -48,7 +48,7 @@ class ChannelGroup extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool system_defined = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $system_defined = false; + protected $system_defined = false; /** * Optional. If true, this channel group will be used as the default channel * group for reports. Only one channel group can be set as `primary` at any @@ -58,7 +58,7 @@ class ChannelGroup extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool primary = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private $primary = false; + protected $primary = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter.php b/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter.php index 7c7868e02811..e655e6cf43f8 100644 --- a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter.php +++ b/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter.php @@ -20,7 +20,7 @@ class ChannelGroupFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $field_name = ''; + protected $field_name = ''; protected $value_filter; /** diff --git a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/InListFilter.php b/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/InListFilter.php index 7a06e006f7a9..159bbf3130a0 100644 --- a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/InListFilter.php +++ b/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/InListFilter.php @@ -70,6 +70,4 @@ public function setValues($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InListFilter::class, \Google\Analytics\Admin\V1alpha\ChannelGroupFilter_InListFilter::class); diff --git a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/StringFilter.php b/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/StringFilter.php index 85b5c5b71b65..8bcb9bdc2ccd 100644 --- a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/StringFilter.php +++ b/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/StringFilter.php @@ -20,13 +20,13 @@ class StringFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $match_type = 0; + protected $match_type = 0; /** * Required. The string value to be matched against. * * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $value = ''; + protected $value = ''; /** * Constructor. @@ -99,6 +99,4 @@ public function setValue($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StringFilter::class, \Google\Analytics\Admin\V1alpha\ChannelGroupFilter_StringFilter::class); diff --git a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/StringFilter/MatchType.php b/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/StringFilter/MatchType.php index e2be7673eb98..8cfede11f459 100644 --- a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/StringFilter/MatchType.php +++ b/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter/StringFilter/MatchType.php @@ -87,6 +87,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MatchType::class, \Google\Analytics\Admin\V1alpha\ChannelGroupFilter_StringFilter_MatchType::class); diff --git a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter_InListFilter.php b/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter_InListFilter.php deleted file mode 100644 index f4ff04da0582..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ChannelGroupFilter_InListFilter.php +++ /dev/null @@ -1,16 +0,0 @@ -render([ 'property' => $property, 'display_video_360_advertiser_link' => $displayVideo360AdvertiserLink, @@ -775,8 +776,10 @@ public static function displayVideo360AdvertiserLinkName(string $property, strin * * @experimental */ - public static function displayVideo360AdvertiserLinkProposalName(string $property, string $displayVideo360AdvertiserLinkProposal): string - { + public static function displayVideo360AdvertiserLinkProposalName( + string $property, + string $displayVideo360AdvertiserLinkProposal + ): string { return self::getPathTemplate('displayVideo360AdvertiserLinkProposal')->render([ 'property' => $property, 'display_video_360_advertiser_link_proposal' => $displayVideo360AdvertiserLinkProposal, @@ -968,8 +971,11 @@ public static function keyEventName(string $property, string $keyEvent): string * * @experimental */ - public static function measurementProtocolSecretName(string $property, string $dataStream, string $measurementProtocolSecret): string - { + public static function measurementProtocolSecretName( + string $property, + string $dataStream, + string $measurementProtocolSecret + ): string { return self::getPathTemplate('measurementProtocolSecret')->render([ 'property' => $property, 'data_stream' => $dataStream, @@ -1061,8 +1067,11 @@ public static function rollupPropertySourceLinkName(string $property, string $ro * * @experimental */ - public static function sKAdNetworkConversionValueSchemaName(string $property, string $dataStream, string $skadnetworkConversionValueSchema): string - { + public static function sKAdNetworkConversionValueSchemaName( + string $property, + string $dataStream, + string $skadnetworkConversionValueSchema + ): string { return self::getPathTemplate('sKAdNetworkConversionValueSchema')->render([ 'property' => $property, 'data_stream' => $dataStream, @@ -1154,8 +1163,8 @@ public static function subpropertyEventFilterName(string $property, string $subP * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * @@ -1163,7 +1172,7 @@ public static function subpropertyEventFilterName(string $property, string $subP * * @experimental */ - public static function parseName(string $formattedName, ?string $template = null): array + public static function parseName(string $formattedName, string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -1218,9 +1227,6 @@ public static function parseName(string $formattedName, ?string $template = null * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException @@ -1272,8 +1278,10 @@ public function __call($method, $args) * * @experimental */ - public function acknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest $request, array $callOptions = []): AcknowledgeUserDataCollectionResponse - { + public function acknowledgeUserDataCollection( + AcknowledgeUserDataCollectionRequest $request, + array $callOptions = [] + ): AcknowledgeUserDataCollectionResponse { return $this->startApiCall('AcknowledgeUserDataCollection', $request, $callOptions)->wait(); } @@ -1304,8 +1312,10 @@ public function acknowledgeUserDataCollection(AcknowledgeUserDataCollectionReque * * @experimental */ - public function approveDisplayVideo360AdvertiserLinkProposal(ApproveDisplayVideo360AdvertiserLinkProposalRequest $request, array $callOptions = []): ApproveDisplayVideo360AdvertiserLinkProposalResponse - { + public function approveDisplayVideo360AdvertiserLinkProposal( + ApproveDisplayVideo360AdvertiserLinkProposalRequest $request, + array $callOptions = [] + ): ApproveDisplayVideo360AdvertiserLinkProposalResponse { return $this->startApiCall('ApproveDisplayVideo360AdvertiserLinkProposal', $request, $callOptions)->wait(); } @@ -1418,8 +1428,10 @@ public function archiveCustomMetric(ArchiveCustomMetricRequest $request, array $ * * @experimental */ - public function batchCreateAccessBindings(BatchCreateAccessBindingsRequest $request, array $callOptions = []): BatchCreateAccessBindingsResponse - { + public function batchCreateAccessBindings( + BatchCreateAccessBindingsRequest $request, + array $callOptions = [] + ): BatchCreateAccessBindingsResponse { return $this->startApiCall('BatchCreateAccessBindings', $request, $callOptions)->wait(); } @@ -1474,8 +1486,10 @@ public function batchDeleteAccessBindings(BatchDeleteAccessBindingsRequest $requ * * @experimental */ - public function batchGetAccessBindings(BatchGetAccessBindingsRequest $request, array $callOptions = []): BatchGetAccessBindingsResponse - { + public function batchGetAccessBindings( + BatchGetAccessBindingsRequest $request, + array $callOptions = [] + ): BatchGetAccessBindingsResponse { return $this->startApiCall('BatchGetAccessBindings', $request, $callOptions)->wait(); } @@ -1504,8 +1518,10 @@ public function batchGetAccessBindings(BatchGetAccessBindingsRequest $request, a * * @experimental */ - public function batchUpdateAccessBindings(BatchUpdateAccessBindingsRequest $request, array $callOptions = []): BatchUpdateAccessBindingsResponse - { + public function batchUpdateAccessBindings( + BatchUpdateAccessBindingsRequest $request, + array $callOptions = [] + ): BatchUpdateAccessBindingsResponse { return $this->startApiCall('BatchUpdateAccessBindings', $request, $callOptions)->wait(); } @@ -1538,8 +1554,10 @@ public function batchUpdateAccessBindings(BatchUpdateAccessBindingsRequest $requ * * @experimental */ - public function cancelDisplayVideo360AdvertiserLinkProposal(CancelDisplayVideo360AdvertiserLinkProposalRequest $request, array $callOptions = []): DisplayVideo360AdvertiserLinkProposal - { + public function cancelDisplayVideo360AdvertiserLinkProposal( + CancelDisplayVideo360AdvertiserLinkProposalRequest $request, + array $callOptions = [] + ): DisplayVideo360AdvertiserLinkProposal { return $this->startApiCall('CancelDisplayVideo360AdvertiserLinkProposal', $request, $callOptions)->wait(); } @@ -1682,8 +1700,10 @@ public function createBigQueryLink(CreateBigQueryLinkRequest $request, array $ca * * @experimental */ - public function createCalculatedMetric(CreateCalculatedMetricRequest $request, array $callOptions = []): CalculatedMetric - { + public function createCalculatedMetric( + CreateCalculatedMetricRequest $request, + array $callOptions = [] + ): CalculatedMetric { return $this->startApiCall('CreateCalculatedMetric', $request, $callOptions)->wait(); } @@ -1742,8 +1762,10 @@ public function createChannelGroup(CreateChannelGroupRequest $request, array $ca * * @experimental */ - public function createConnectedSiteTag(CreateConnectedSiteTagRequest $request, array $callOptions = []): CreateConnectedSiteTagResponse - { + public function createConnectedSiteTag( + CreateConnectedSiteTagRequest $request, + array $callOptions = [] + ): CreateConnectedSiteTagResponse { return $this->startApiCall('CreateConnectedSiteTag', $request, $callOptions)->wait(); } @@ -1774,8 +1796,10 @@ public function createConnectedSiteTag(CreateConnectedSiteTagRequest $request, a * * @deprecated This method will be removed in the next major version update. */ - public function createConversionEvent(CreateConversionEventRequest $request, array $callOptions = []): ConversionEvent - { + public function createConversionEvent( + CreateConversionEventRequest $request, + array $callOptions = [] + ): ConversionEvent { return $this->startApiCall('CreateConversionEvent', $request, $callOptions)->wait(); } @@ -1803,8 +1827,10 @@ public function createConversionEvent(CreateConversionEventRequest $request, arr * * @experimental */ - public function createCustomDimension(CreateCustomDimensionRequest $request, array $callOptions = []): CustomDimension - { + public function createCustomDimension( + CreateCustomDimensionRequest $request, + array $callOptions = [] + ): CustomDimension { return $this->startApiCall('CreateCustomDimension', $request, $callOptions)->wait(); } @@ -1894,8 +1920,10 @@ public function createDataStream(CreateDataStreamRequest $request, array $callOp * * @experimental */ - public function createDisplayVideo360AdvertiserLink(CreateDisplayVideo360AdvertiserLinkRequest $request, array $callOptions = []): DisplayVideo360AdvertiserLink - { + public function createDisplayVideo360AdvertiserLink( + CreateDisplayVideo360AdvertiserLinkRequest $request, + array $callOptions = [] + ): DisplayVideo360AdvertiserLink { return $this->startApiCall('CreateDisplayVideo360AdvertiserLink', $request, $callOptions)->wait(); } @@ -1924,8 +1952,10 @@ public function createDisplayVideo360AdvertiserLink(CreateDisplayVideo360Adverti * * @experimental */ - public function createDisplayVideo360AdvertiserLinkProposal(CreateDisplayVideo360AdvertiserLinkProposalRequest $request, array $callOptions = []): DisplayVideo360AdvertiserLinkProposal - { + public function createDisplayVideo360AdvertiserLinkProposal( + CreateDisplayVideo360AdvertiserLinkProposalRequest $request, + array $callOptions = [] + ): DisplayVideo360AdvertiserLinkProposal { return $this->startApiCall('CreateDisplayVideo360AdvertiserLinkProposal', $request, $callOptions)->wait(); } @@ -1953,8 +1983,10 @@ public function createDisplayVideo360AdvertiserLinkProposal(CreateDisplayVideo36 * * @experimental */ - public function createEventCreateRule(CreateEventCreateRuleRequest $request, array $callOptions = []): EventCreateRule - { + public function createEventCreateRule( + CreateEventCreateRuleRequest $request, + array $callOptions = [] + ): EventCreateRule { return $this->startApiCall('CreateEventCreateRule', $request, $callOptions)->wait(); } @@ -2011,8 +2043,10 @@ public function createEventEditRule(CreateEventEditRuleRequest $request, array $ * * @experimental */ - public function createExpandedDataSet(CreateExpandedDataSetRequest $request, array $callOptions = []): ExpandedDataSet - { + public function createExpandedDataSet( + CreateExpandedDataSetRequest $request, + array $callOptions = [] + ): ExpandedDataSet { return $this->startApiCall('CreateExpandedDataSet', $request, $callOptions)->wait(); } @@ -2128,8 +2162,10 @@ public function createKeyEvent(CreateKeyEventRequest $request, array $callOption * * @experimental */ - public function createMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest $request, array $callOptions = []): MeasurementProtocolSecret - { + public function createMeasurementProtocolSecret( + CreateMeasurementProtocolSecretRequest $request, + array $callOptions = [] + ): MeasurementProtocolSecret { return $this->startApiCall('CreateMeasurementProtocolSecret', $request, $callOptions)->wait(); } @@ -2185,8 +2221,10 @@ public function createProperty(CreatePropertyRequest $request, array $callOption * * @experimental */ - public function createRollupProperty(CreateRollupPropertyRequest $request, array $callOptions = []): CreateRollupPropertyResponse - { + public function createRollupProperty( + CreateRollupPropertyRequest $request, + array $callOptions = [] + ): CreateRollupPropertyResponse { return $this->startApiCall('CreateRollupProperty', $request, $callOptions)->wait(); } @@ -2216,8 +2254,10 @@ public function createRollupProperty(CreateRollupPropertyRequest $request, array * * @experimental */ - public function createRollupPropertySourceLink(CreateRollupPropertySourceLinkRequest $request, array $callOptions = []): RollupPropertySourceLink - { + public function createRollupPropertySourceLink( + CreateRollupPropertySourceLinkRequest $request, + array $callOptions = [] + ): RollupPropertySourceLink { return $this->startApiCall('CreateRollupPropertySourceLink', $request, $callOptions)->wait(); } @@ -2246,8 +2286,10 @@ public function createRollupPropertySourceLink(CreateRollupPropertySourceLinkReq * * @experimental */ - public function createSKAdNetworkConversionValueSchema(CreateSKAdNetworkConversionValueSchemaRequest $request, array $callOptions = []): SKAdNetworkConversionValueSchema - { + public function createSKAdNetworkConversionValueSchema( + CreateSKAdNetworkConversionValueSchemaRequest $request, + array $callOptions = [] + ): SKAdNetworkConversionValueSchema { return $this->startApiCall('CreateSKAdNetworkConversionValueSchema', $request, $callOptions)->wait(); } @@ -2275,8 +2317,10 @@ public function createSKAdNetworkConversionValueSchema(CreateSKAdNetworkConversi * * @experimental */ - public function createSearchAds360Link(CreateSearchAds360LinkRequest $request, array $callOptions = []): SearchAds360Link - { + public function createSearchAds360Link( + CreateSearchAds360LinkRequest $request, + array $callOptions = [] + ): SearchAds360Link { return $this->startApiCall('CreateSearchAds360Link', $request, $callOptions)->wait(); } @@ -2304,8 +2348,10 @@ public function createSearchAds360Link(CreateSearchAds360LinkRequest $request, a * * @experimental */ - public function createSubpropertyEventFilter(CreateSubpropertyEventFilterRequest $request, array $callOptions = []): SubpropertyEventFilter - { + public function createSubpropertyEventFilter( + CreateSubpropertyEventFilterRequest $request, + array $callOptions = [] + ): SubpropertyEventFilter { return $this->startApiCall('CreateSubpropertyEventFilter', $request, $callOptions)->wait(); } @@ -2587,8 +2633,10 @@ public function deleteDataStream(DeleteDataStreamRequest $request, array $callOp * * @experimental */ - public function deleteDisplayVideo360AdvertiserLink(DeleteDisplayVideo360AdvertiserLinkRequest $request, array $callOptions = []): void - { + public function deleteDisplayVideo360AdvertiserLink( + DeleteDisplayVideo360AdvertiserLinkRequest $request, + array $callOptions = [] + ): void { $this->startApiCall('DeleteDisplayVideo360AdvertiserLink', $request, $callOptions)->wait(); } @@ -2616,8 +2664,10 @@ public function deleteDisplayVideo360AdvertiserLink(DeleteDisplayVideo360Adverti * * @experimental */ - public function deleteDisplayVideo360AdvertiserLinkProposal(DeleteDisplayVideo360AdvertiserLinkProposalRequest $request, array $callOptions = []): void - { + public function deleteDisplayVideo360AdvertiserLinkProposal( + DeleteDisplayVideo360AdvertiserLinkProposalRequest $request, + array $callOptions = [] + ): void { $this->startApiCall('DeleteDisplayVideo360AdvertiserLinkProposal', $request, $callOptions)->wait(); } @@ -2804,8 +2854,10 @@ public function deleteKeyEvent(DeleteKeyEventRequest $request, array $callOption * * @experimental */ - public function deleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest $request, array $callOptions = []): void - { + public function deleteMeasurementProtocolSecret( + DeleteMeasurementProtocolSecretRequest $request, + array $callOptions = [] + ): void { $this->startApiCall('DeleteMeasurementProtocolSecret', $request, $callOptions)->wait(); } @@ -2871,8 +2923,10 @@ public function deleteProperty(DeletePropertyRequest $request, array $callOption * * @experimental */ - public function deleteRollupPropertySourceLink(DeleteRollupPropertySourceLinkRequest $request, array $callOptions = []): void - { + public function deleteRollupPropertySourceLink( + DeleteRollupPropertySourceLinkRequest $request, + array $callOptions = [] + ): void { $this->startApiCall('DeleteRollupPropertySourceLink', $request, $callOptions)->wait(); } @@ -2899,8 +2953,10 @@ public function deleteRollupPropertySourceLink(DeleteRollupPropertySourceLinkReq * * @experimental */ - public function deleteSKAdNetworkConversionValueSchema(DeleteSKAdNetworkConversionValueSchemaRequest $request, array $callOptions = []): void - { + public function deleteSKAdNetworkConversionValueSchema( + DeleteSKAdNetworkConversionValueSchemaRequest $request, + array $callOptions = [] + ): void { $this->startApiCall('DeleteSKAdNetworkConversionValueSchema', $request, $callOptions)->wait(); } @@ -2953,8 +3009,10 @@ public function deleteSearchAds360Link(DeleteSearchAds360LinkRequest $request, a * * @experimental */ - public function deleteSubpropertyEventFilter(DeleteSubpropertyEventFilterRequest $request, array $callOptions = []): void - { + public function deleteSubpropertyEventFilter( + DeleteSubpropertyEventFilterRequest $request, + array $callOptions = [] + ): void { $this->startApiCall('DeleteSubpropertyEventFilter', $request, $callOptions)->wait(); } @@ -2985,8 +3043,10 @@ public function deleteSubpropertyEventFilter(DeleteSubpropertyEventFilterRequest * * @experimental */ - public function fetchAutomatedGa4ConfigurationOptOut(FetchAutomatedGa4ConfigurationOptOutRequest $request, array $callOptions = []): FetchAutomatedGa4ConfigurationOptOutResponse - { + public function fetchAutomatedGa4ConfigurationOptOut( + FetchAutomatedGa4ConfigurationOptOutRequest $request, + array $callOptions = [] + ): FetchAutomatedGa4ConfigurationOptOutResponse { return $this->startApiCall('FetchAutomatedGa4ConfigurationOptOut', $request, $callOptions)->wait(); } @@ -3015,8 +3075,10 @@ public function fetchAutomatedGa4ConfigurationOptOut(FetchAutomatedGa4Configurat * * @experimental */ - public function fetchConnectedGa4Property(FetchConnectedGa4PropertyRequest $request, array $callOptions = []): FetchConnectedGa4PropertyResponse - { + public function fetchConnectedGa4Property( + FetchConnectedGa4PropertyRequest $request, + array $callOptions = [] + ): FetchConnectedGa4PropertyResponse { return $this->startApiCall('FetchConnectedGa4Property', $request, $callOptions)->wait(); } @@ -3129,8 +3191,10 @@ public function getAdSenseLink(GetAdSenseLinkRequest $request, array $callOption * * @experimental */ - public function getAttributionSettings(GetAttributionSettingsRequest $request, array $callOptions = []): AttributionSettings - { + public function getAttributionSettings( + GetAttributionSettingsRequest $request, + array $callOptions = [] + ): AttributionSettings { return $this->startApiCall('GetAttributionSettings', $request, $callOptions)->wait(); } @@ -3365,8 +3429,10 @@ public function getCustomMetric(GetCustomMetricRequest $request, array $callOpti * * @experimental */ - public function getDataRedactionSettings(GetDataRedactionSettingsRequest $request, array $callOptions = []): DataRedactionSettings - { + public function getDataRedactionSettings( + GetDataRedactionSettingsRequest $request, + array $callOptions = [] + ): DataRedactionSettings { return $this->startApiCall('GetDataRedactionSettings', $request, $callOptions)->wait(); } @@ -3394,8 +3460,10 @@ public function getDataRedactionSettings(GetDataRedactionSettingsRequest $reques * * @experimental */ - public function getDataRetentionSettings(GetDataRetentionSettingsRequest $request, array $callOptions = []): DataRetentionSettings - { + public function getDataRetentionSettings( + GetDataRetentionSettingsRequest $request, + array $callOptions = [] + ): DataRetentionSettings { return $this->startApiCall('GetDataRetentionSettings', $request, $callOptions)->wait(); } @@ -3424,8 +3492,10 @@ public function getDataRetentionSettings(GetDataRetentionSettingsRequest $reques * * @experimental */ - public function getDataSharingSettings(GetDataSharingSettingsRequest $request, array $callOptions = []): DataSharingSettings - { + public function getDataSharingSettings( + GetDataSharingSettingsRequest $request, + array $callOptions = [] + ): DataSharingSettings { return $this->startApiCall('GetDataSharingSettings', $request, $callOptions)->wait(); } @@ -3481,8 +3551,10 @@ public function getDataStream(GetDataStreamRequest $request, array $callOptions * * @experimental */ - public function getDisplayVideo360AdvertiserLink(GetDisplayVideo360AdvertiserLinkRequest $request, array $callOptions = []): DisplayVideo360AdvertiserLink - { + public function getDisplayVideo360AdvertiserLink( + GetDisplayVideo360AdvertiserLinkRequest $request, + array $callOptions = [] + ): DisplayVideo360AdvertiserLink { return $this->startApiCall('GetDisplayVideo360AdvertiserLink', $request, $callOptions)->wait(); } @@ -3511,8 +3583,10 @@ public function getDisplayVideo360AdvertiserLink(GetDisplayVideo360AdvertiserLin * * @experimental */ - public function getDisplayVideo360AdvertiserLinkProposal(GetDisplayVideo360AdvertiserLinkProposalRequest $request, array $callOptions = []): DisplayVideo360AdvertiserLinkProposal - { + public function getDisplayVideo360AdvertiserLinkProposal( + GetDisplayVideo360AdvertiserLinkProposalRequest $request, + array $callOptions = [] + ): DisplayVideo360AdvertiserLinkProposal { return $this->startApiCall('GetDisplayVideo360AdvertiserLinkProposal', $request, $callOptions)->wait(); } @@ -3542,8 +3616,10 @@ public function getDisplayVideo360AdvertiserLinkProposal(GetDisplayVideo360Adver * * @experimental */ - public function getEnhancedMeasurementSettings(GetEnhancedMeasurementSettingsRequest $request, array $callOptions = []): EnhancedMeasurementSettings - { + public function getEnhancedMeasurementSettings( + GetEnhancedMeasurementSettingsRequest $request, + array $callOptions = [] + ): EnhancedMeasurementSettings { return $this->startApiCall('GetEnhancedMeasurementSettings', $request, $callOptions)->wait(); } @@ -3688,8 +3764,10 @@ public function getGlobalSiteTag(GetGlobalSiteTagRequest $request, array $callOp * * @experimental */ - public function getGoogleSignalsSettings(GetGoogleSignalsSettingsRequest $request, array $callOptions = []): GoogleSignalsSettings - { + public function getGoogleSignalsSettings( + GetGoogleSignalsSettingsRequest $request, + array $callOptions = [] + ): GoogleSignalsSettings { return $this->startApiCall('GetGoogleSignalsSettings', $request, $callOptions)->wait(); } @@ -3745,8 +3823,10 @@ public function getKeyEvent(GetKeyEventRequest $request, array $callOptions = [] * * @experimental */ - public function getMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest $request, array $callOptions = []): MeasurementProtocolSecret - { + public function getMeasurementProtocolSecret( + GetMeasurementProtocolSecretRequest $request, + array $callOptions = [] + ): MeasurementProtocolSecret { return $this->startApiCall('GetMeasurementProtocolSecret', $request, $callOptions)->wait(); } @@ -3804,8 +3884,10 @@ public function getProperty(GetPropertyRequest $request, array $callOptions = [] * * @experimental */ - public function getRollupPropertySourceLink(GetRollupPropertySourceLinkRequest $request, array $callOptions = []): RollupPropertySourceLink - { + public function getRollupPropertySourceLink( + GetRollupPropertySourceLinkRequest $request, + array $callOptions = [] + ): RollupPropertySourceLink { return $this->startApiCall('GetRollupPropertySourceLink', $request, $callOptions)->wait(); } @@ -3833,8 +3915,10 @@ public function getRollupPropertySourceLink(GetRollupPropertySourceLinkRequest $ * * @experimental */ - public function getSKAdNetworkConversionValueSchema(GetSKAdNetworkConversionValueSchemaRequest $request, array $callOptions = []): SKAdNetworkConversionValueSchema - { + public function getSKAdNetworkConversionValueSchema( + GetSKAdNetworkConversionValueSchemaRequest $request, + array $callOptions = [] + ): SKAdNetworkConversionValueSchema { return $this->startApiCall('GetSKAdNetworkConversionValueSchema', $request, $callOptions)->wait(); } @@ -3891,8 +3975,10 @@ public function getSearchAds360Link(GetSearchAds360LinkRequest $request, array $ * * @experimental */ - public function getSubpropertyEventFilter(GetSubpropertyEventFilterRequest $request, array $callOptions = []): SubpropertyEventFilter - { + public function getSubpropertyEventFilter( + GetSubpropertyEventFilterRequest $request, + array $callOptions = [] + ): SubpropertyEventFilter { return $this->startApiCall('GetSubpropertyEventFilter', $request, $callOptions)->wait(); } @@ -3949,8 +4035,10 @@ public function listAccessBindings(ListAccessBindingsRequest $request, array $ca * * @experimental */ - public function listAccountSummaries(ListAccountSummariesRequest $request, array $callOptions = []): PagedListResponse - { + public function listAccountSummaries( + ListAccountSummariesRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListAccountSummaries', $request, $callOptions); } @@ -4098,8 +4186,10 @@ public function listBigQueryLinks(ListBigQueryLinksRequest $request, array $call * * @experimental */ - public function listCalculatedMetrics(ListCalculatedMetricsRequest $request, array $callOptions = []): PagedListResponse - { + public function listCalculatedMetrics( + ListCalculatedMetricsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListCalculatedMetrics', $request, $callOptions); } @@ -4158,8 +4248,10 @@ public function listChannelGroups(ListChannelGroupsRequest $request, array $call * * @experimental */ - public function listConnectedSiteTags(ListConnectedSiteTagsRequest $request, array $callOptions = []): ListConnectedSiteTagsResponse - { + public function listConnectedSiteTags( + ListConnectedSiteTagsRequest $request, + array $callOptions = [] + ): ListConnectedSiteTagsResponse { return $this->startApiCall('ListConnectedSiteTags', $request, $callOptions)->wait(); } @@ -4192,8 +4284,10 @@ public function listConnectedSiteTags(ListConnectedSiteTagsRequest $request, arr * * @deprecated This method will be removed in the next major version update. */ - public function listConversionEvents(ListConversionEventsRequest $request, array $callOptions = []): PagedListResponse - { + public function listConversionEvents( + ListConversionEventsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListConversionEvents', $request, $callOptions); } @@ -4221,8 +4315,10 @@ public function listConversionEvents(ListConversionEventsRequest $request, array * * @experimental */ - public function listCustomDimensions(ListCustomDimensionsRequest $request, array $callOptions = []): PagedListResponse - { + public function listCustomDimensions( + ListCustomDimensionsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListCustomDimensions', $request, $callOptions); } @@ -4309,8 +4405,10 @@ public function listDataStreams(ListDataStreamsRequest $request, array $callOpti * * @experimental */ - public function listDisplayVideo360AdvertiserLinkProposals(ListDisplayVideo360AdvertiserLinkProposalsRequest $request, array $callOptions = []): PagedListResponse - { + public function listDisplayVideo360AdvertiserLinkProposals( + ListDisplayVideo360AdvertiserLinkProposalsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListDisplayVideo360AdvertiserLinkProposals', $request, $callOptions); } @@ -4338,8 +4436,10 @@ public function listDisplayVideo360AdvertiserLinkProposals(ListDisplayVideo360Ad * * @experimental */ - public function listDisplayVideo360AdvertiserLinks(ListDisplayVideo360AdvertiserLinksRequest $request, array $callOptions = []): PagedListResponse - { + public function listDisplayVideo360AdvertiserLinks( + ListDisplayVideo360AdvertiserLinksRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListDisplayVideo360AdvertiserLinks', $request, $callOptions); } @@ -4367,8 +4467,10 @@ public function listDisplayVideo360AdvertiserLinks(ListDisplayVideo360Advertiser * * @experimental */ - public function listEventCreateRules(ListEventCreateRulesRequest $request, array $callOptions = []): PagedListResponse - { + public function listEventCreateRules( + ListEventCreateRulesRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListEventCreateRules', $request, $callOptions); } @@ -4425,8 +4527,10 @@ public function listEventEditRules(ListEventEditRulesRequest $request, array $ca * * @experimental */ - public function listExpandedDataSets(ListExpandedDataSetsRequest $request, array $callOptions = []): PagedListResponse - { + public function listExpandedDataSets( + ListExpandedDataSetsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListExpandedDataSets', $request, $callOptions); } @@ -4543,8 +4647,10 @@ public function listKeyEvents(ListKeyEventsRequest $request, array $callOptions * * @experimental */ - public function listMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest $request, array $callOptions = []): PagedListResponse - { + public function listMeasurementProtocolSecrets( + ListMeasurementProtocolSecretsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListMeasurementProtocolSecrets', $request, $callOptions); } @@ -4607,8 +4713,10 @@ public function listProperties(ListPropertiesRequest $request, array $callOption * * @experimental */ - public function listRollupPropertySourceLinks(ListRollupPropertySourceLinksRequest $request, array $callOptions = []): PagedListResponse - { + public function listRollupPropertySourceLinks( + ListRollupPropertySourceLinksRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListRollupPropertySourceLinks', $request, $callOptions); } @@ -4638,8 +4746,10 @@ public function listRollupPropertySourceLinks(ListRollupPropertySourceLinksReque * * @experimental */ - public function listSKAdNetworkConversionValueSchemas(ListSKAdNetworkConversionValueSchemasRequest $request, array $callOptions = []): PagedListResponse - { + public function listSKAdNetworkConversionValueSchemas( + ListSKAdNetworkConversionValueSchemasRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListSKAdNetworkConversionValueSchemas', $request, $callOptions); } @@ -4667,8 +4777,10 @@ public function listSKAdNetworkConversionValueSchemas(ListSKAdNetworkConversionV * * @experimental */ - public function listSearchAds360Links(ListSearchAds360LinksRequest $request, array $callOptions = []): PagedListResponse - { + public function listSearchAds360Links( + ListSearchAds360LinksRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListSearchAds360Links', $request, $callOptions); } @@ -4696,8 +4808,10 @@ public function listSearchAds360Links(ListSearchAds360LinksRequest $request, arr * * @experimental */ - public function listSubpropertyEventFilters(ListSubpropertyEventFiltersRequest $request, array $callOptions = []): PagedListResponse - { + public function listSubpropertyEventFilters( + ListSubpropertyEventFiltersRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListSubpropertyEventFilters', $request, $callOptions); } @@ -4725,8 +4839,10 @@ public function listSubpropertyEventFilters(ListSubpropertyEventFiltersRequest $ * * @experimental */ - public function provisionAccountTicket(ProvisionAccountTicketRequest $request, array $callOptions = []): ProvisionAccountTicketResponse - { + public function provisionAccountTicket( + ProvisionAccountTicketRequest $request, + array $callOptions = [] + ): ProvisionAccountTicketResponse { return $this->startApiCall('ProvisionAccountTicket', $request, $callOptions)->wait(); } @@ -4755,8 +4871,10 @@ public function provisionAccountTicket(ProvisionAccountTicketRequest $request, a * * @experimental */ - public function provisionSubproperty(ProvisionSubpropertyRequest $request, array $callOptions = []): ProvisionSubpropertyResponse - { + public function provisionSubproperty( + ProvisionSubpropertyRequest $request, + array $callOptions = [] + ): ProvisionSubpropertyResponse { return $this->startApiCall('ProvisionSubproperty', $request, $callOptions)->wait(); } @@ -4855,8 +4973,10 @@ public function runAccessReport(RunAccessReportRequest $request, array $callOpti * * @experimental */ - public function searchChangeHistoryEvents(SearchChangeHistoryEventsRequest $request, array $callOptions = []): PagedListResponse - { + public function searchChangeHistoryEvents( + SearchChangeHistoryEventsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('SearchChangeHistoryEvents', $request, $callOptions); } @@ -4886,8 +5006,10 @@ public function searchChangeHistoryEvents(SearchChangeHistoryEventsRequest $requ * * @experimental */ - public function setAutomatedGa4ConfigurationOptOut(SetAutomatedGa4ConfigurationOptOutRequest $request, array $callOptions = []): SetAutomatedGa4ConfigurationOptOutResponse - { + public function setAutomatedGa4ConfigurationOptOut( + SetAutomatedGa4ConfigurationOptOutRequest $request, + array $callOptions = [] + ): SetAutomatedGa4ConfigurationOptOutResponse { return $this->startApiCall('SetAutomatedGa4ConfigurationOptOut', $request, $callOptions)->wait(); } @@ -4972,8 +5094,10 @@ public function updateAccount(UpdateAccountRequest $request, array $callOptions * * @experimental */ - public function updateAttributionSettings(UpdateAttributionSettingsRequest $request, array $callOptions = []): AttributionSettings - { + public function updateAttributionSettings( + UpdateAttributionSettingsRequest $request, + array $callOptions = [] + ): AttributionSettings { return $this->startApiCall('UpdateAttributionSettings', $request, $callOptions)->wait(); } @@ -5058,8 +5182,10 @@ public function updateBigQueryLink(UpdateBigQueryLinkRequest $request, array $ca * * @experimental */ - public function updateCalculatedMetric(UpdateCalculatedMetricRequest $request, array $callOptions = []): CalculatedMetric - { + public function updateCalculatedMetric( + UpdateCalculatedMetricRequest $request, + array $callOptions = [] + ): CalculatedMetric { return $this->startApiCall('UpdateCalculatedMetric', $request, $callOptions)->wait(); } @@ -5119,8 +5245,10 @@ public function updateChannelGroup(UpdateChannelGroupRequest $request, array $ca * * @deprecated This method will be removed in the next major version update. */ - public function updateConversionEvent(UpdateConversionEventRequest $request, array $callOptions = []): ConversionEvent - { + public function updateConversionEvent( + UpdateConversionEventRequest $request, + array $callOptions = [] + ): ConversionEvent { return $this->startApiCall('UpdateConversionEvent', $request, $callOptions)->wait(); } @@ -5148,8 +5276,10 @@ public function updateConversionEvent(UpdateConversionEventRequest $request, arr * * @experimental */ - public function updateCustomDimension(UpdateCustomDimensionRequest $request, array $callOptions = []): CustomDimension - { + public function updateCustomDimension( + UpdateCustomDimensionRequest $request, + array $callOptions = [] + ): CustomDimension { return $this->startApiCall('UpdateCustomDimension', $request, $callOptions)->wait(); } @@ -5206,8 +5336,10 @@ public function updateCustomMetric(UpdateCustomMetricRequest $request, array $ca * * @experimental */ - public function updateDataRedactionSettings(UpdateDataRedactionSettingsRequest $request, array $callOptions = []): DataRedactionSettings - { + public function updateDataRedactionSettings( + UpdateDataRedactionSettingsRequest $request, + array $callOptions = [] + ): DataRedactionSettings { return $this->startApiCall('UpdateDataRedactionSettings', $request, $callOptions)->wait(); } @@ -5235,8 +5367,10 @@ public function updateDataRedactionSettings(UpdateDataRedactionSettingsRequest $ * * @experimental */ - public function updateDataRetentionSettings(UpdateDataRetentionSettingsRequest $request, array $callOptions = []): DataRetentionSettings - { + public function updateDataRetentionSettings( + UpdateDataRetentionSettingsRequest $request, + array $callOptions = [] + ): DataRetentionSettings { return $this->startApiCall('UpdateDataRetentionSettings', $request, $callOptions)->wait(); } @@ -5293,8 +5427,10 @@ public function updateDataStream(UpdateDataStreamRequest $request, array $callOp * * @experimental */ - public function updateDisplayVideo360AdvertiserLink(UpdateDisplayVideo360AdvertiserLinkRequest $request, array $callOptions = []): DisplayVideo360AdvertiserLink - { + public function updateDisplayVideo360AdvertiserLink( + UpdateDisplayVideo360AdvertiserLinkRequest $request, + array $callOptions = [] + ): DisplayVideo360AdvertiserLink { return $this->startApiCall('UpdateDisplayVideo360AdvertiserLink', $request, $callOptions)->wait(); } @@ -5324,8 +5460,10 @@ public function updateDisplayVideo360AdvertiserLink(UpdateDisplayVideo360Adverti * * @experimental */ - public function updateEnhancedMeasurementSettings(UpdateEnhancedMeasurementSettingsRequest $request, array $callOptions = []): EnhancedMeasurementSettings - { + public function updateEnhancedMeasurementSettings( + UpdateEnhancedMeasurementSettingsRequest $request, + array $callOptions = [] + ): EnhancedMeasurementSettings { return $this->startApiCall('UpdateEnhancedMeasurementSettings', $request, $callOptions)->wait(); } @@ -5353,8 +5491,10 @@ public function updateEnhancedMeasurementSettings(UpdateEnhancedMeasurementSetti * * @experimental */ - public function updateEventCreateRule(UpdateEventCreateRuleRequest $request, array $callOptions = []): EventCreateRule - { + public function updateEventCreateRule( + UpdateEventCreateRuleRequest $request, + array $callOptions = [] + ): EventCreateRule { return $this->startApiCall('UpdateEventCreateRule', $request, $callOptions)->wait(); } @@ -5411,8 +5551,10 @@ public function updateEventEditRule(UpdateEventEditRuleRequest $request, array $ * * @experimental */ - public function updateExpandedDataSet(UpdateExpandedDataSetRequest $request, array $callOptions = []): ExpandedDataSet - { + public function updateExpandedDataSet( + UpdateExpandedDataSetRequest $request, + array $callOptions = [] + ): ExpandedDataSet { return $this->startApiCall('UpdateExpandedDataSet', $request, $callOptions)->wait(); } @@ -5469,8 +5611,10 @@ public function updateGoogleAdsLink(UpdateGoogleAdsLinkRequest $request, array $ * * @experimental */ - public function updateGoogleSignalsSettings(UpdateGoogleSignalsSettingsRequest $request, array $callOptions = []): GoogleSignalsSettings - { + public function updateGoogleSignalsSettings( + UpdateGoogleSignalsSettingsRequest $request, + array $callOptions = [] + ): GoogleSignalsSettings { return $this->startApiCall('UpdateGoogleSignalsSettings', $request, $callOptions)->wait(); } @@ -5526,8 +5670,10 @@ public function updateKeyEvent(UpdateKeyEventRequest $request, array $callOption * * @experimental */ - public function updateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest $request, array $callOptions = []): MeasurementProtocolSecret - { + public function updateMeasurementProtocolSecret( + UpdateMeasurementProtocolSecretRequest $request, + array $callOptions = [] + ): MeasurementProtocolSecret { return $this->startApiCall('UpdateMeasurementProtocolSecret', $request, $callOptions)->wait(); } @@ -5584,8 +5730,10 @@ public function updateProperty(UpdatePropertyRequest $request, array $callOption * * @experimental */ - public function updateSKAdNetworkConversionValueSchema(UpdateSKAdNetworkConversionValueSchemaRequest $request, array $callOptions = []): SKAdNetworkConversionValueSchema - { + public function updateSKAdNetworkConversionValueSchema( + UpdateSKAdNetworkConversionValueSchemaRequest $request, + array $callOptions = [] + ): SKAdNetworkConversionValueSchema { return $this->startApiCall('UpdateSKAdNetworkConversionValueSchema', $request, $callOptions)->wait(); } @@ -5613,8 +5761,10 @@ public function updateSKAdNetworkConversionValueSchema(UpdateSKAdNetworkConversi * * @experimental */ - public function updateSearchAds360Link(UpdateSearchAds360LinkRequest $request, array $callOptions = []): SearchAds360Link - { + public function updateSearchAds360Link( + UpdateSearchAds360LinkRequest $request, + array $callOptions = [] + ): SearchAds360Link { return $this->startApiCall('UpdateSearchAds360Link', $request, $callOptions)->wait(); } @@ -5642,8 +5792,10 @@ public function updateSearchAds360Link(UpdateSearchAds360LinkRequest $request, a * * @experimental */ - public function updateSubpropertyEventFilter(UpdateSubpropertyEventFilterRequest $request, array $callOptions = []): SubpropertyEventFilter - { + public function updateSubpropertyEventFilter( + UpdateSubpropertyEventFilterRequest $request, + array $callOptions = [] + ): SubpropertyEventFilter { return $this->startApiCall('UpdateSubpropertyEventFilter', $request, $callOptions)->wait(); } } diff --git a/AnalyticsAdmin/src/V1alpha/ConnectedSiteTag.php b/AnalyticsAdmin/src/V1alpha/ConnectedSiteTag.php index ade62deeb5b2..4e530bbbbbd9 100644 --- a/AnalyticsAdmin/src/V1alpha/ConnectedSiteTag.php +++ b/AnalyticsAdmin/src/V1alpha/ConnectedSiteTag.php @@ -21,14 +21,14 @@ class ConnectedSiteTag extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Required. "Tag ID to forward events to. Also known as the Measurement ID, * or the "G-ID" (For example: G-12345). * * Generated from protobuf field string tag_id = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $tag_id = ''; + protected $tag_id = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ConversionEvent.php b/AnalyticsAdmin/src/V1alpha/ConversionEvent.php index 9c64f842c832..f8805f3e931f 100644 --- a/AnalyticsAdmin/src/V1alpha/ConversionEvent.php +++ b/AnalyticsAdmin/src/V1alpha/ConversionEvent.php @@ -21,27 +21,27 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The event name for this conversion event. * Examples: 'click', 'purchase' * * Generated from protobuf field string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $event_name = ''; + protected $event_name = ''; /** * Output only. Time when this conversion event was created in the property. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. If set, this event can currently be deleted with * DeleteConversionEvent. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $deletable = false; + protected $deletable = false; /** * 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 @@ -52,7 +52,7 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $custom = false; + protected $custom = false; /** * Optional. The method by which conversions will be counted across multiple * events within a session. If this value is not provided, it will be set to @@ -60,13 +60,13 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.ConversionEvent.ConversionCountingMethod counting_method = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private $counting_method = 0; + protected $counting_method = 0; /** * Optional. Defines a default value/currency for a conversion event. * * Generated from protobuf field optional .google.analytics.admin.v1alpha.ConversionEvent.DefaultConversionValue default_conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - private $default_conversion_value = null; + protected $default_conversion_value = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ConversionEvent/ConversionCountingMethod.php b/AnalyticsAdmin/src/V1alpha/ConversionEvent/ConversionCountingMethod.php index b22477370f5a..4e127e019009 100644 --- a/AnalyticsAdmin/src/V1alpha/ConversionEvent/ConversionCountingMethod.php +++ b/AnalyticsAdmin/src/V1alpha/ConversionEvent/ConversionCountingMethod.php @@ -61,6 +61,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConversionCountingMethod::class, \Google\Analytics\Admin\V1alpha\ConversionEvent_ConversionCountingMethod::class); diff --git a/AnalyticsAdmin/src/V1alpha/ConversionEvent/DefaultConversionValue.php b/AnalyticsAdmin/src/V1alpha/ConversionEvent/DefaultConversionValue.php index b7c015acff03..9492f3c3d49d 100644 --- a/AnalyticsAdmin/src/V1alpha/ConversionEvent/DefaultConversionValue.php +++ b/AnalyticsAdmin/src/V1alpha/ConversionEvent/DefaultConversionValue.php @@ -22,7 +22,7 @@ class DefaultConversionValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field optional double value = 1; */ - private $value = null; + protected $value = null; /** * When a conversion event for this event_name has no set currency, * this currency will be applied as the default. Must be in ISO 4217 @@ -31,7 +31,7 @@ class DefaultConversionValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field optional string currency_code = 2; */ - private $currency_code = null; + protected $currency_code = null; /** * Constructor. @@ -136,6 +136,4 @@ public function setCurrencyCode($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DefaultConversionValue::class, \Google\Analytics\Admin\V1alpha\ConversionEvent_DefaultConversionValue::class); diff --git a/AnalyticsAdmin/src/V1alpha/ConversionValues.php b/AnalyticsAdmin/src/V1alpha/ConversionValues.php index 72c172ff3e84..6a01fe7ab131 100644 --- a/AnalyticsAdmin/src/V1alpha/ConversionValues.php +++ b/AnalyticsAdmin/src/V1alpha/ConversionValues.php @@ -22,7 +22,7 @@ class ConversionValues extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string display_name = 1; */ - private $display_name = ''; + protected $display_name = ''; /** * The fine-grained conversion value. This is applicable only to the first * postback window. Its valid values are [0,63], both inclusive. It must be @@ -33,14 +33,14 @@ class ConversionValues extends \Google\Protobuf\Internal\Message * * Generated from protobuf field optional int32 fine_value = 2; */ - private $fine_value = null; + protected $fine_value = null; /** * Required. A coarse grained conversion value. * This value is not guaranteed to be unique. * * Generated from protobuf field .google.analytics.admin.v1alpha.CoarseValue coarse_value = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $coarse_value = 0; + protected $coarse_value = 0; /** * Event conditions that must be met for this Conversion Value to be achieved. * The conditions in this list are ANDed together. It must have minimum of 1 @@ -55,7 +55,7 @@ class ConversionValues extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool lock_enabled = 5; */ - private $lock_enabled = false; + protected $lock_enabled = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/CreateAccessBindingRequest.php b/AnalyticsAdmin/src/V1alpha/CreateAccessBindingRequest.php index 5ac95d20c7e7..9fee2c95ca93 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateAccessBindingRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateAccessBindingRequest.php @@ -22,13 +22,13 @@ class CreateAccessBindingRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The access binding to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessBinding access_binding = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $access_binding = null; + protected $access_binding = null; /** * @param string $parent Required. Formats: diff --git a/AnalyticsAdmin/src/V1alpha/CreateAdSenseLinkRequest.php b/AnalyticsAdmin/src/V1alpha/CreateAdSenseLinkRequest.php index e4a9886f2d0f..b57d3287654a 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateAdSenseLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateAdSenseLinkRequest.php @@ -22,13 +22,13 @@ class CreateAdSenseLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The AdSense Link to create * * Generated from protobuf field .google.analytics.admin.v1alpha.AdSenseLink adsense_link = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $adsense_link = null; + protected $adsense_link = null; /** * @param string $parent Required. The property for which to create an AdSense Link. diff --git a/AnalyticsAdmin/src/V1alpha/CreateAndroidAppDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/CreateAndroidAppDataStreamRequest.php deleted file mode 100644 index 232e9e047918..000000000000 --- a/AnalyticsAdmin/src/V1alpha/CreateAndroidAppDataStreamRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.analytics.admin.v1alpha.CreateAndroidAppDataStreamRequest - */ -class CreateAndroidAppDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The android app stream to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.AndroidAppDataStream android_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $android_app_data_stream = null; - /** - * Required. The parent resource where this android app data stream will be created. - * Format: properties/123 - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\AndroidAppDataStream $android_app_data_stream - * Required. The android app stream to create. - * @type string $parent - * Required. The parent resource where this android app data stream will be created. - * Format: properties/123 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The android app stream to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.AndroidAppDataStream android_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\AndroidAppDataStream - */ - public function getAndroidAppDataStream() - { - return isset($this->android_app_data_stream) ? $this->android_app_data_stream : null; - } - - public function hasAndroidAppDataStream() - { - return isset($this->android_app_data_stream); - } - - public function clearAndroidAppDataStream() - { - unset($this->android_app_data_stream); - } - - /** - * Required. The android app stream to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.AndroidAppDataStream android_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\AndroidAppDataStream $var - * @return $this - */ - public function setAndroidAppDataStream($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\AndroidAppDataStream::class); - $this->android_app_data_stream = $var; - - return $this; - } - - /** - * Required. The parent resource where this android app data stream will be created. - * Format: properties/123 - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this android app data stream will be created. - * Format: properties/123 - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/CreateAudienceRequest.php b/AnalyticsAdmin/src/V1alpha/CreateAudienceRequest.php index 0a26fea0d46f..55799b94bafc 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateAudienceRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateAudienceRequest.php @@ -20,13 +20,13 @@ class CreateAudienceRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The audience to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.Audience audience = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $audience = null; + protected $audience = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateBigQueryLinkRequest.php b/AnalyticsAdmin/src/V1alpha/CreateBigQueryLinkRequest.php index 78d38c035b5d..abfe1cadb865 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateBigQueryLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateBigQueryLinkRequest.php @@ -20,13 +20,13 @@ class CreateBigQueryLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The BigQueryLink to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.BigQueryLink bigquery_link = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $bigquery_link = null; + protected $bigquery_link = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateCalculatedMetricRequest.php b/AnalyticsAdmin/src/V1alpha/CreateCalculatedMetricRequest.php index aff60c531e6a..f24127edd615 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateCalculatedMetricRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateCalculatedMetricRequest.php @@ -21,7 +21,7 @@ class CreateCalculatedMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The ID to use for the calculated metric which will become the * final component of the calculated metric's resource name. @@ -33,13 +33,13 @@ class CreateCalculatedMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string calculated_metric_id = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $calculated_metric_id = ''; + protected $calculated_metric_id = ''; /** * Required. The CalculatedMetric to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.CalculatedMetric calculated_metric = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $calculated_metric = null; + protected $calculated_metric = null; /** * @param string $parent Required. Format: properties/{property_id} diff --git a/AnalyticsAdmin/src/V1alpha/CreateChannelGroupRequest.php b/AnalyticsAdmin/src/V1alpha/CreateChannelGroupRequest.php index a67e32d10a54..37275d6d2c0e 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateChannelGroupRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateChannelGroupRequest.php @@ -21,13 +21,13 @@ class CreateChannelGroupRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The ChannelGroup to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.ChannelGroup channel_group = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $channel_group = null; + protected $channel_group = null; /** * @param string $parent Required. The property for which to create a ChannelGroup. diff --git a/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagRequest.php b/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagRequest.php index bee5ebdc6257..d69c7da0b80d 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagRequest.php @@ -23,13 +23,13 @@ class CreateConnectedSiteTagRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string property = 1; */ - private $property = ''; + protected $property = ''; /** * Required. The tag to add to the Universal Analytics property * * Generated from protobuf field .google.analytics.admin.v1alpha.ConnectedSiteTag connected_site_tag = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $connected_site_tag = null; + protected $connected_site_tag = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/CreateConversionEventRequest.php b/AnalyticsAdmin/src/V1alpha/CreateConversionEventRequest.php index 81883d890f81..97206d63902b 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateConversionEventRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateConversionEventRequest.php @@ -20,14 +20,14 @@ class CreateConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $conversion_event = null; + protected $conversion_event = null; /** * Required. The resource name of the parent property where this conversion * event will be created. Format: properties/123 * * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * @param string $parent Required. The resource name of the parent property where this conversion diff --git a/AnalyticsAdmin/src/V1alpha/CreateCustomDimensionRequest.php b/AnalyticsAdmin/src/V1alpha/CreateCustomDimensionRequest.php index c6fe4f733f8c..c01fdf0d60ae 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateCustomDimensionRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateCustomDimensionRequest.php @@ -20,13 +20,13 @@ class CreateCustomDimensionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The CustomDimension to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $custom_dimension = null; + protected $custom_dimension = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateCustomMetricRequest.php b/AnalyticsAdmin/src/V1alpha/CreateCustomMetricRequest.php index 400fba9e3af4..7125a58ea752 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateCustomMetricRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateCustomMetricRequest.php @@ -20,13 +20,13 @@ class CreateCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The CustomMetric to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $custom_metric = null; + protected $custom_metric = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/CreateDataStreamRequest.php index 4da996d63a99..f07fea597654 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateDataStreamRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateDataStreamRequest.php @@ -20,13 +20,13 @@ class CreateDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The DataStream to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $data_stream = null; + protected $data_stream = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateDisplayVideo360AdvertiserLinkProposalRequest.php b/AnalyticsAdmin/src/V1alpha/CreateDisplayVideo360AdvertiserLinkProposalRequest.php index 99c9ed8cd779..bc37f9877f43 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateDisplayVideo360AdvertiserLinkProposalRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateDisplayVideo360AdvertiserLinkProposalRequest.php @@ -20,13 +20,13 @@ class CreateDisplayVideo360AdvertiserLinkProposalRequest extends \Google\Protobu * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The DisplayVideo360AdvertiserLinkProposal to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal display_video_360_advertiser_link_proposal = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_video_360_advertiser_link_proposal = null; + protected $display_video_360_advertiser_link_proposal = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateDisplayVideo360AdvertiserLinkRequest.php b/AnalyticsAdmin/src/V1alpha/CreateDisplayVideo360AdvertiserLinkRequest.php index 2e8bf9304d3e..5222d347753b 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateDisplayVideo360AdvertiserLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateDisplayVideo360AdvertiserLinkRequest.php @@ -20,13 +20,13 @@ class CreateDisplayVideo360AdvertiserLinkRequest extends \Google\Protobuf\Intern * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The DisplayVideo360AdvertiserLink to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink display_video_360_advertiser_link = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_video_360_advertiser_link = null; + protected $display_video_360_advertiser_link = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateEventCreateRuleRequest.php b/AnalyticsAdmin/src/V1alpha/CreateEventCreateRuleRequest.php index fb680ba36b66..c3a79ad610c7 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateEventCreateRuleRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateEventCreateRuleRequest.php @@ -20,13 +20,13 @@ class CreateEventCreateRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The EventCreateRule to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.EventCreateRule event_create_rule = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $event_create_rule = null; + protected $event_create_rule = null; /** * @param string $parent Required. Example format: properties/123/dataStreams/456 diff --git a/AnalyticsAdmin/src/V1alpha/CreateEventEditRuleRequest.php b/AnalyticsAdmin/src/V1alpha/CreateEventEditRuleRequest.php index 03ca3814a6a5..7ef52ade8aae 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateEventEditRuleRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateEventEditRuleRequest.php @@ -20,13 +20,13 @@ class CreateEventEditRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The EventEditRule to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.EventEditRule event_edit_rule = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $event_edit_rule = null; + protected $event_edit_rule = null; /** * @param string $parent Required. Example format: properties/123/dataStreams/456 diff --git a/AnalyticsAdmin/src/V1alpha/CreateExpandedDataSetRequest.php b/AnalyticsAdmin/src/V1alpha/CreateExpandedDataSetRequest.php index 8237033ad33f..e7938ba317e9 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateExpandedDataSetRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateExpandedDataSetRequest.php @@ -20,13 +20,13 @@ class CreateExpandedDataSetRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The ExpandedDataSet to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.ExpandedDataSet expanded_data_set = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $expanded_data_set = null; + protected $expanded_data_set = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateFirebaseLinkRequest.php b/AnalyticsAdmin/src/V1alpha/CreateFirebaseLinkRequest.php index a71b41a4d29f..ae89618d2d47 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateFirebaseLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateFirebaseLinkRequest.php @@ -21,13 +21,13 @@ class CreateFirebaseLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The Firebase link to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $firebase_link = null; + protected $firebase_link = null; /** * @param string $parent Required. Format: properties/{property_id} diff --git a/AnalyticsAdmin/src/V1alpha/CreateGoogleAdsLinkRequest.php b/AnalyticsAdmin/src/V1alpha/CreateGoogleAdsLinkRequest.php index abc8abed78db..fa512c6d25ba 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateGoogleAdsLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateGoogleAdsLinkRequest.php @@ -20,13 +20,13 @@ class CreateGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The GoogleAdsLink to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $google_ads_link = null; + protected $google_ads_link = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateIosAppDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/CreateIosAppDataStreamRequest.php deleted file mode 100644 index cdd5f803aade..000000000000 --- a/AnalyticsAdmin/src/V1alpha/CreateIosAppDataStreamRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.analytics.admin.v1alpha.CreateIosAppDataStreamRequest - */ -class CreateIosAppDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The iOS app data stream to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.IosAppDataStream ios_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $ios_app_data_stream = null; - /** - * Required. The parent resource where this ios app data stream will be created. - * Format: properties/123 - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\IosAppDataStream $ios_app_data_stream - * Required. The iOS app data stream to create. - * @type string $parent - * Required. The parent resource where this ios app data stream will be created. - * Format: properties/123 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The iOS app data stream to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.IosAppDataStream ios_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\IosAppDataStream - */ - public function getIosAppDataStream() - { - return isset($this->ios_app_data_stream) ? $this->ios_app_data_stream : null; - } - - public function hasIosAppDataStream() - { - return isset($this->ios_app_data_stream); - } - - public function clearIosAppDataStream() - { - unset($this->ios_app_data_stream); - } - - /** - * Required. The iOS app data stream to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.IosAppDataStream ios_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\IosAppDataStream $var - * @return $this - */ - public function setIosAppDataStream($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\IosAppDataStream::class); - $this->ios_app_data_stream = $var; - - return $this; - } - - /** - * Required. The parent resource where this ios app data stream will be created. - * Format: properties/123 - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this ios app data stream will be created. - * Format: properties/123 - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/CreateKeyEventRequest.php b/AnalyticsAdmin/src/V1alpha/CreateKeyEventRequest.php index 9f641fcda4e5..f6062561ffaf 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateKeyEventRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateKeyEventRequest.php @@ -20,14 +20,14 @@ class CreateKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.KeyEvent key_event = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $key_event = null; + protected $key_event = null; /** * Required. The resource name of the parent property where this Key Event * will be created. Format: properties/123 * * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * @param string $parent Required. The resource name of the parent property where this Key Event diff --git a/AnalyticsAdmin/src/V1alpha/CreateMeasurementProtocolSecretRequest.php b/AnalyticsAdmin/src/V1alpha/CreateMeasurementProtocolSecretRequest.php index 20daf3a95194..8ab18fc88e70 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateMeasurementProtocolSecretRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateMeasurementProtocolSecretRequest.php @@ -21,13 +21,13 @@ class CreateMeasurementProtocolSecretRequest extends \Google\Protobuf\Internal\M * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The measurement protocol secret to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $measurement_protocol_secret = null; + protected $measurement_protocol_secret = null; /** * @param string $parent Required. The parent resource where this secret will be created. diff --git a/AnalyticsAdmin/src/V1alpha/CreatePropertyRequest.php b/AnalyticsAdmin/src/V1alpha/CreatePropertyRequest.php index 37afef9cef3a..985af6f74894 100644 --- a/AnalyticsAdmin/src/V1alpha/CreatePropertyRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreatePropertyRequest.php @@ -21,7 +21,7 @@ class CreatePropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $property = null; + protected $property = null; /** * @param \Google\Analytics\Admin\V1alpha\Property $property Required. The property to create. diff --git a/AnalyticsAdmin/src/V1alpha/CreateRollupPropertyRequest.php b/AnalyticsAdmin/src/V1alpha/CreateRollupPropertyRequest.php index 17783ac67db4..1790318a4c79 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateRollupPropertyRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateRollupPropertyRequest.php @@ -20,7 +20,7 @@ class CreateRollupPropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $rollup_property = null; + protected $rollup_property = null; /** * Optional. The resource names of properties that will be sources to the * created roll-up property. diff --git a/AnalyticsAdmin/src/V1alpha/CreateRollupPropertyResponse.php b/AnalyticsAdmin/src/V1alpha/CreateRollupPropertyResponse.php index 212a26c0f23b..9b604c83153e 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateRollupPropertyResponse.php +++ b/AnalyticsAdmin/src/V1alpha/CreateRollupPropertyResponse.php @@ -20,7 +20,7 @@ class CreateRollupPropertyResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Property rollup_property = 1; */ - private $rollup_property = null; + protected $rollup_property = null; /** * The created roll-up property source links. * diff --git a/AnalyticsAdmin/src/V1alpha/CreateRollupPropertySourceLinkRequest.php b/AnalyticsAdmin/src/V1alpha/CreateRollupPropertySourceLinkRequest.php index d5059a0e8736..0b6b1f9715f7 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateRollupPropertySourceLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateRollupPropertySourceLinkRequest.php @@ -21,13 +21,13 @@ class CreateRollupPropertySourceLinkRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The roll-up property source link to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $rollup_property_source_link = null; + protected $rollup_property_source_link = null; /** * @param string $parent Required. Format: properties/{property_id} diff --git a/AnalyticsAdmin/src/V1alpha/CreateSKAdNetworkConversionValueSchemaRequest.php b/AnalyticsAdmin/src/V1alpha/CreateSKAdNetworkConversionValueSchemaRequest.php index a1785bdd1f8e..0cf6dfe6ab63 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateSKAdNetworkConversionValueSchemaRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateSKAdNetworkConversionValueSchemaRequest.php @@ -21,13 +21,13 @@ class CreateSKAdNetworkConversionValueSchemaRequest extends \Google\Protobuf\Int * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. SKAdNetwork conversion value schema to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema skadnetwork_conversion_value_schema = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $skadnetwork_conversion_value_schema = null; + protected $skadnetwork_conversion_value_schema = null; /** * @param string $parent Required. The parent resource where this schema will be created. diff --git a/AnalyticsAdmin/src/V1alpha/CreateSearchAds360LinkRequest.php b/AnalyticsAdmin/src/V1alpha/CreateSearchAds360LinkRequest.php index 66189ffdcf50..bfe7c2823c53 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateSearchAds360LinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateSearchAds360LinkRequest.php @@ -20,13 +20,13 @@ class CreateSearchAds360LinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The SearchAds360Link to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.SearchAds360Link search_ads_360_link = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $search_ads_360_link = null; + protected $search_ads_360_link = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/CreateSubpropertyEventFilterRequest.php b/AnalyticsAdmin/src/V1alpha/CreateSubpropertyEventFilterRequest.php index 0e3c739f51ae..a1ab70fe50d8 100644 --- a/AnalyticsAdmin/src/V1alpha/CreateSubpropertyEventFilterRequest.php +++ b/AnalyticsAdmin/src/V1alpha/CreateSubpropertyEventFilterRequest.php @@ -21,13 +21,13 @@ class CreateSubpropertyEventFilterRequest extends \Google\Protobuf\Internal\Mess * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The subproperty event filter to create. * * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $subproperty_event_filter = null; + protected $subproperty_event_filter = null; /** * @param string $parent Required. The ordinary property for which to create a subproperty event diff --git a/AnalyticsAdmin/src/V1alpha/CreateSubpropertyRequest.php b/AnalyticsAdmin/src/V1alpha/CreateSubpropertyRequest.php deleted file mode 100644 index 0fb9d995d9f3..000000000000 --- a/AnalyticsAdmin/src/V1alpha/CreateSubpropertyRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.analytics.admin.v1alpha.CreateSubpropertyRequest - */ -class CreateSubpropertyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ordinary property for which to create a subproperty. - * Format: properties/property_id - * Example: properties/123 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * Required. The subproperty to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $subproperty = null; - /** - * Optional. The subproperty event filter to create on an ordinary property. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $subproperty_event_filter = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The ordinary property for which to create a subproperty. - * Format: properties/property_id - * Example: properties/123 - * @type \Google\Analytics\Admin\V1alpha\Property $subproperty - * Required. The subproperty to create. - * @type \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter $subproperty_event_filter - * Optional. The subproperty event filter to create on an ordinary property. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ordinary property for which to create a subproperty. - * Format: properties/property_id - * Example: properties/123 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The ordinary property for which to create a subproperty. - * Format: properties/property_id - * Example: properties/123 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The subproperty to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\Property|null - */ - public function getSubproperty() - { - return $this->subproperty; - } - - public function hasSubproperty() - { - return isset($this->subproperty); - } - - public function clearSubproperty() - { - unset($this->subproperty); - } - - /** - * Required. The subproperty to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\Property $var - * @return $this - */ - public function setSubproperty($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\Property::class); - $this->subproperty = $var; - - return $this; - } - - /** - * Optional. The subproperty event filter to create on an ordinary property. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter|null - */ - public function getSubpropertyEventFilter() - { - return $this->subproperty_event_filter; - } - - public function hasSubpropertyEventFilter() - { - return isset($this->subproperty_event_filter); - } - - public function clearSubpropertyEventFilter() - { - unset($this->subproperty_event_filter); - } - - /** - * Optional. The subproperty event filter to create on an ordinary property. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter $var - * @return $this - */ - public function setSubpropertyEventFilter($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter::class); - $this->subproperty_event_filter = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/CreateSubpropertyResponse.php b/AnalyticsAdmin/src/V1alpha/CreateSubpropertyResponse.php deleted file mode 100644 index ed86acbd052e..000000000000 --- a/AnalyticsAdmin/src/V1alpha/CreateSubpropertyResponse.php +++ /dev/null @@ -1,121 +0,0 @@ -google.analytics.admin.v1alpha.CreateSubpropertyResponse - */ -class CreateSubpropertyResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The created subproperty. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.Property subproperty = 1; - */ - private $subproperty = null; - /** - * The created subproperty event filter. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; - */ - private $subproperty_event_filter = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\Property $subproperty - * The created subproperty. - * @type \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter $subproperty_event_filter - * The created subproperty event filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The created subproperty. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.Property subproperty = 1; - * @return \Google\Analytics\Admin\V1alpha\Property|null - */ - public function getSubproperty() - { - return $this->subproperty; - } - - public function hasSubproperty() - { - return isset($this->subproperty); - } - - public function clearSubproperty() - { - unset($this->subproperty); - } - - /** - * The created subproperty. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.Property subproperty = 1; - * @param \Google\Analytics\Admin\V1alpha\Property $var - * @return $this - */ - public function setSubproperty($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\Property::class); - $this->subproperty = $var; - - return $this; - } - - /** - * The created subproperty event filter. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; - * @return \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter|null - */ - public function getSubpropertyEventFilter() - { - return $this->subproperty_event_filter; - } - - public function hasSubpropertyEventFilter() - { - return isset($this->subproperty_event_filter); - } - - public function clearSubpropertyEventFilter() - { - unset($this->subproperty_event_filter); - } - - /** - * The created subproperty event filter. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; - * @param \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter $var - * @return $this - */ - public function setSubpropertyEventFilter($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter::class); - $this->subproperty_event_filter = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/CreateUserLinkRequest.php b/AnalyticsAdmin/src/V1alpha/CreateUserLinkRequest.php deleted file mode 100644 index b7487e7a7024..000000000000 --- a/AnalyticsAdmin/src/V1alpha/CreateUserLinkRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.analytics.admin.v1alpha.CreateUserLinkRequest - */ -class CreateUserLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * Optional. If set, then email the new user notifying them that they've been - * granted permissions to the resource. - * - * Generated from protobuf field bool notify_new_user = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $notify_new_user = false; - /** - * Required. The user link to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $user_link = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Example format: accounts/1234 - * @type bool $notify_new_user - * Optional. If set, then email the new user notifying them that they've been - * granted permissions to the resource. - * @type \Google\Analytics\Admin\V1alpha\UserLink $user_link - * Required. The user link to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. If set, then email the new user notifying them that they've been - * granted permissions to the resource. - * - * Generated from protobuf field bool notify_new_user = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getNotifyNewUser() - { - return $this->notify_new_user; - } - - /** - * Optional. If set, then email the new user notifying them that they've been - * granted permissions to the resource. - * - * Generated from protobuf field bool notify_new_user = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setNotifyNewUser($var) - { - GPBUtil::checkBool($var); - $this->notify_new_user = $var; - - return $this; - } - - /** - * Required. The user link to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\UserLink|null - */ - public function getUserLink() - { - return $this->user_link; - } - - public function hasUserLink() - { - return isset($this->user_link); - } - - public function clearUserLink() - { - unset($this->user_link); - } - - /** - * Required. The user link to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\UserLink $var - * @return $this - */ - public function setUserLink($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\UserLink::class); - $this->user_link = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/CreateWebDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/CreateWebDataStreamRequest.php deleted file mode 100644 index 7381a5d52457..000000000000 --- a/AnalyticsAdmin/src/V1alpha/CreateWebDataStreamRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.analytics.admin.v1alpha.CreateWebDataStreamRequest - */ -class CreateWebDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The web stream to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.WebDataStream web_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $web_data_stream = null; - /** - * Required. The parent resource where this web data stream will be created. - * Format: properties/123 - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\WebDataStream $web_data_stream - * Required. The web stream to create. - * @type string $parent - * Required. The parent resource where this web data stream will be created. - * Format: properties/123 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The web stream to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.WebDataStream web_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\WebDataStream|null - */ - public function getWebDataStream() - { - return $this->web_data_stream; - } - - public function hasWebDataStream() - { - return isset($this->web_data_stream); - } - - public function clearWebDataStream() - { - unset($this->web_data_stream); - } - - /** - * Required. The web stream to create. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.WebDataStream web_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\WebDataStream $var - * @return $this - */ - public function setWebDataStream($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\WebDataStream::class); - $this->web_data_stream = $var; - - return $this; - } - - /** - * Required. The parent resource where this web data stream will be created. - * Format: properties/123 - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this web data stream will be created. - * Format: properties/123 - * - * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/CustomDimension.php b/AnalyticsAdmin/src/V1alpha/CustomDimension.php index 8cf9d61af679..ba0a444737d8 100644 --- a/AnalyticsAdmin/src/V1alpha/CustomDimension.php +++ b/AnalyticsAdmin/src/V1alpha/CustomDimension.php @@ -21,7 +21,7 @@ class CustomDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. Immutable. Tagging parameter name for this custom dimension. * If this is a user-scoped dimension, then this is the user property name. @@ -35,7 +35,7 @@ class CustomDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $parameter_name = ''; + protected $parameter_name = ''; /** * Required. Display name for this custom dimension as shown in the Analytics * UI. Max length of 82 characters, alphanumeric plus space and underscore @@ -45,20 +45,20 @@ class CustomDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Optional. Description for this custom dimension. Max length of 150 * characters. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; */ - private $description = ''; + protected $description = ''; /** * Required. Immutable. The scope of this dimension. * * Generated from protobuf field .google.analytics.admin.v1alpha.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $scope = 0; + protected $scope = 0; /** * Optional. If set to true, sets this dimension as NPA and excludes it from * ads personalization. @@ -66,7 +66,7 @@ class CustomDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private $disallow_ads_personalization = false; + protected $disallow_ads_personalization = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/CustomDimension/DimensionScope.php b/AnalyticsAdmin/src/V1alpha/CustomDimension/DimensionScope.php index a623e13b2358..fb45986719ee 100644 --- a/AnalyticsAdmin/src/V1alpha/CustomDimension/DimensionScope.php +++ b/AnalyticsAdmin/src/V1alpha/CustomDimension/DimensionScope.php @@ -66,6 +66,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DimensionScope::class, \Google\Analytics\Admin\V1alpha\CustomDimension_DimensionScope::class); diff --git a/AnalyticsAdmin/src/V1alpha/CustomDimension_DimensionScope.php b/AnalyticsAdmin/src/V1alpha/CustomDimension_DimensionScope.php deleted file mode 100644 index 81ce780a4917..000000000000 --- a/AnalyticsAdmin/src/V1alpha/CustomDimension_DimensionScope.php +++ /dev/null @@ -1,16 +0,0 @@ -string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. Immutable. Tagging name for this custom metric. * If this is an event-scoped metric, then this is the event parameter @@ -31,7 +31,7 @@ class CustomMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $parameter_name = ''; + protected $parameter_name = ''; /** * Required. Display name for this custom metric as shown in the Analytics UI. * Max length of 82 characters, alphanumeric plus space and underscore @@ -41,26 +41,26 @@ class CustomMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Optional. Description for this custom dimension. * Max length of 150 characters. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; */ - private $description = ''; + protected $description = ''; /** * Required. The type for the custom metric's value. * * Generated from protobuf field .google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; */ - private $measurement_unit = 0; + protected $measurement_unit = 0; /** * Required. Immutable. The scope of this custom metric. * * Generated from protobuf field .google.analytics.admin.v1alpha.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $scope = 0; + protected $scope = 0; /** * Optional. Types of restricted data that this metric may contain. Required * for metrics with CURRENCY measurement unit. Must be empty for metrics with diff --git a/AnalyticsAdmin/src/V1alpha/CustomMetric/MeasurementUnit.php b/AnalyticsAdmin/src/V1alpha/CustomMetric/MeasurementUnit.php index 5d27e4dc0f14..6a7be41f1dc4 100644 --- a/AnalyticsAdmin/src/V1alpha/CustomMetric/MeasurementUnit.php +++ b/AnalyticsAdmin/src/V1alpha/CustomMetric/MeasurementUnit.php @@ -117,6 +117,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MeasurementUnit::class, \Google\Analytics\Admin\V1alpha\CustomMetric_MeasurementUnit::class); diff --git a/AnalyticsAdmin/src/V1alpha/CustomMetric/MetricScope.php b/AnalyticsAdmin/src/V1alpha/CustomMetric/MetricScope.php index 362df05131af..d0733904c9d6 100644 --- a/AnalyticsAdmin/src/V1alpha/CustomMetric/MetricScope.php +++ b/AnalyticsAdmin/src/V1alpha/CustomMetric/MetricScope.php @@ -52,6 +52,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetricScope::class, \Google\Analytics\Admin\V1alpha\CustomMetric_MetricScope::class); diff --git a/AnalyticsAdmin/src/V1alpha/CustomMetric/RestrictedMetricType.php b/AnalyticsAdmin/src/V1alpha/CustomMetric/RestrictedMetricType.php index 06006742e548..c9154681dbf7 100644 --- a/AnalyticsAdmin/src/V1alpha/CustomMetric/RestrictedMetricType.php +++ b/AnalyticsAdmin/src/V1alpha/CustomMetric/RestrictedMetricType.php @@ -60,6 +60,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RestrictedMetricType::class, \Google\Analytics\Admin\V1alpha\CustomMetric_RestrictedMetricType::class); diff --git a/AnalyticsAdmin/src/V1alpha/CustomMetric_MeasurementUnit.php b/AnalyticsAdmin/src/V1alpha/CustomMetric_MeasurementUnit.php deleted file mode 100644 index be9d08832f18..000000000000 --- a/AnalyticsAdmin/src/V1alpha/CustomMetric_MeasurementUnit.php +++ /dev/null @@ -1,16 +0,0 @@ -string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * If enabled, any event parameter or user property values that look like an * email will be redacted. * * Generated from protobuf field bool email_redaction_enabled = 2; */ - private $email_redaction_enabled = false; + protected $email_redaction_enabled = false; /** * Query Parameter redaction removes the key and value portions of a * query parameter if it is in the configured set of query parameters. @@ -40,7 +40,7 @@ class DataRedactionSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool query_parameter_redaction_enabled = 3; */ - private $query_parameter_redaction_enabled = false; + protected $query_parameter_redaction_enabled = false; /** * The query parameter keys to apply redaction logic to if present in the URL. * Query parameter matching is case-insensitive. diff --git a/AnalyticsAdmin/src/V1alpha/DataRetentionSettings.php b/AnalyticsAdmin/src/V1alpha/DataRetentionSettings.php index 667d65aab8f4..596562959ce5 100644 --- a/AnalyticsAdmin/src/V1alpha/DataRetentionSettings.php +++ b/AnalyticsAdmin/src/V1alpha/DataRetentionSettings.php @@ -21,20 +21,20 @@ class DataRetentionSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * The length of time that event-level data is retained. * * Generated from protobuf field .google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration event_data_retention = 2; */ - private $event_data_retention = 0; + protected $event_data_retention = 0; /** * If true, reset the retention period for the user identifier with every * event from that user. * * Generated from protobuf field bool reset_user_data_on_new_activity = 3; */ - private $reset_user_data_on_new_activity = false; + protected $reset_user_data_on_new_activity = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/DataRetentionSettings/RetentionDuration.php b/AnalyticsAdmin/src/V1alpha/DataRetentionSettings/RetentionDuration.php index be5f9eb42de3..392d67b53de4 100644 --- a/AnalyticsAdmin/src/V1alpha/DataRetentionSettings/RetentionDuration.php +++ b/AnalyticsAdmin/src/V1alpha/DataRetentionSettings/RetentionDuration.php @@ -83,6 +83,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RetentionDuration::class, \Google\Analytics\Admin\V1alpha\DataRetentionSettings_RetentionDuration::class); diff --git a/AnalyticsAdmin/src/V1alpha/DataRetentionSettings_RetentionDuration.php b/AnalyticsAdmin/src/V1alpha/DataRetentionSettings_RetentionDuration.php deleted file mode 100644 index f3585feaed85..000000000000 --- a/AnalyticsAdmin/src/V1alpha/DataRetentionSettings_RetentionDuration.php +++ /dev/null @@ -1,16 +0,0 @@ -string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Allows Google support to access the data in order to help troubleshoot * issues. * * Generated from protobuf field bool sharing_with_google_support_enabled = 2; */ - private $sharing_with_google_support_enabled = false; + protected $sharing_with_google_support_enabled = false; /** * Allows Google sales teams that are assigned to the customer to access the * data in order to suggest configuration changes to improve results. @@ -38,26 +38,26 @@ class DataSharingSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool sharing_with_google_assigned_sales_enabled = 3; */ - private $sharing_with_google_assigned_sales_enabled = false; + protected $sharing_with_google_assigned_sales_enabled = false; /** * Allows any of Google sales to access the data in order to suggest * configuration changes to improve results. * * Generated from protobuf field bool sharing_with_google_any_sales_enabled = 4; */ - private $sharing_with_google_any_sales_enabled = false; + protected $sharing_with_google_any_sales_enabled = false; /** * Allows Google to use the data to improve other Google products or services. * * Generated from protobuf field bool sharing_with_google_products_enabled = 5; */ - private $sharing_with_google_products_enabled = false; + protected $sharing_with_google_products_enabled = false; /** * Allows Google to share the data anonymously in aggregate form with others. * * Generated from protobuf field bool sharing_with_others_enabled = 6; */ - private $sharing_with_others_enabled = false; + protected $sharing_with_others_enabled = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/DataStream.php b/AnalyticsAdmin/src/V1alpha/DataStream.php index 07e859deae14..334525308793 100644 --- a/AnalyticsAdmin/src/V1alpha/DataStream.php +++ b/AnalyticsAdmin/src/V1alpha/DataStream.php @@ -22,13 +22,13 @@ class DataStream extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. Immutable. The type of this DataStream resource. * * Generated from protobuf field .google.analytics.admin.v1alpha.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; */ - private $type = 0; + protected $type = 0; /** * Human-readable display name for the Data Stream. * Required for web data streams. @@ -36,19 +36,19 @@ class DataStream extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string display_name = 3; */ - private $display_name = ''; + protected $display_name = ''; /** * Output only. Time when this stream was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. Time when stream payload fields were last updated. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $update_time = null; + protected $update_time = null; protected $stream_data; /** diff --git a/AnalyticsAdmin/src/V1alpha/DataStream/AndroidAppStreamData.php b/AnalyticsAdmin/src/V1alpha/DataStream/AndroidAppStreamData.php index 43599b9f19d8..d1586ca16fb5 100644 --- a/AnalyticsAdmin/src/V1alpha/DataStream/AndroidAppStreamData.php +++ b/AnalyticsAdmin/src/V1alpha/DataStream/AndroidAppStreamData.php @@ -21,14 +21,14 @@ class AndroidAppStreamData extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $firebase_app_id = ''; + protected $firebase_app_id = ''; /** * Immutable. The package name for the app being measured. * Example: "com.example.myandroidapp" * * Generated from protobuf field string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $package_name = ''; + protected $package_name = ''; /** * Constructor. @@ -107,6 +107,4 @@ public function setPackageName($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AndroidAppStreamData::class, \Google\Analytics\Admin\V1alpha\DataStream_AndroidAppStreamData::class); diff --git a/AnalyticsAdmin/src/V1alpha/DataStream/DataStreamType.php b/AnalyticsAdmin/src/V1alpha/DataStream/DataStreamType.php index 40b9025b6d49..37534dfab8b3 100644 --- a/AnalyticsAdmin/src/V1alpha/DataStream/DataStreamType.php +++ b/AnalyticsAdmin/src/V1alpha/DataStream/DataStreamType.php @@ -66,6 +66,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataStreamType::class, \Google\Analytics\Admin\V1alpha\DataStream_DataStreamType::class); diff --git a/AnalyticsAdmin/src/V1alpha/DataStream/IosAppStreamData.php b/AnalyticsAdmin/src/V1alpha/DataStream/IosAppStreamData.php index bf35d3c8f983..81eccd12e346 100644 --- a/AnalyticsAdmin/src/V1alpha/DataStream/IosAppStreamData.php +++ b/AnalyticsAdmin/src/V1alpha/DataStream/IosAppStreamData.php @@ -21,14 +21,14 @@ class IosAppStreamData extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $firebase_app_id = ''; + protected $firebase_app_id = ''; /** * Required. Immutable. The Apple App Store Bundle ID for the app * Example: "com.example.myiosapp" * * Generated from protobuf field string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; */ - private $bundle_id = ''; + protected $bundle_id = ''; /** * Constructor. @@ -107,6 +107,4 @@ public function setBundleId($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IosAppStreamData::class, \Google\Analytics\Admin\V1alpha\DataStream_IosAppStreamData::class); diff --git a/AnalyticsAdmin/src/V1alpha/DataStream/WebStreamData.php b/AnalyticsAdmin/src/V1alpha/DataStream/WebStreamData.php index 608e5f390e6b..257b51bc2e10 100644 --- a/AnalyticsAdmin/src/V1alpha/DataStream/WebStreamData.php +++ b/AnalyticsAdmin/src/V1alpha/DataStream/WebStreamData.php @@ -21,21 +21,21 @@ class WebStreamData extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $measurement_id = ''; + protected $measurement_id = ''; /** * Output only. ID of the corresponding web app in Firebase, if any. * This ID can change if the web app is deleted and recreated. * * Generated from protobuf field string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $firebase_app_id = ''; + protected $firebase_app_id = ''; /** * Domain name of the web app being measured, or empty. * Example: "http://www.google.com", "https://www.google.com" * * Generated from protobuf field string default_uri = 3; */ - private $default_uri = ''; + protected $default_uri = ''; /** * Constructor. @@ -145,6 +145,4 @@ public function setDefaultUri($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebStreamData::class, \Google\Analytics\Admin\V1alpha\DataStream_WebStreamData::class); diff --git a/AnalyticsAdmin/src/V1alpha/DataStream_AndroidAppStreamData.php b/AnalyticsAdmin/src/V1alpha/DataStream_AndroidAppStreamData.php deleted file mode 100644 index b5dca0ca4578..000000000000 --- a/AnalyticsAdmin/src/V1alpha/DataStream_AndroidAppStreamData.php +++ /dev/null @@ -1,16 +0,0 @@ -string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Formats: diff --git a/AnalyticsAdmin/src/V1alpha/DeleteAccountRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteAccountRequest.php index cf8e5668ca01..78951dd2c825 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteAccountRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteAccountRequest.php @@ -22,7 +22,7 @@ class DeleteAccountRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the Account to soft-delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteAdSenseLinkRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteAdSenseLinkRequest.php index 94daf9f3813b..abcd87d373e8 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteAdSenseLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteAdSenseLinkRequest.php @@ -22,7 +22,7 @@ class DeleteAdSenseLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Unique identifier for the AdSense Link to be deleted. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteAndroidAppDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteAndroidAppDataStreamRequest.php deleted file mode 100644 index fdd915bf41cb..000000000000 --- a/AnalyticsAdmin/src/V1alpha/DeleteAndroidAppDataStreamRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.analytics.admin.v1alpha.DeleteAndroidAppDataStreamRequest - */ -class DeleteAndroidAppDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the android app data stream to delete. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/123/androidAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the android app data stream to delete. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/123/androidAppDataStreams/456" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the android app data stream to delete. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/123/androidAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the android app data stream to delete. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/123/androidAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/DeleteBigQueryLinkRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteBigQueryLinkRequest.php index 87410a5ee293..824fe851d0d8 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteBigQueryLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteBigQueryLinkRequest.php @@ -21,7 +21,7 @@ class DeleteBigQueryLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The BigQueryLink to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteCalculatedMetricRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteCalculatedMetricRequest.php index e900ce55e4af..04b753961214 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteCalculatedMetricRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteCalculatedMetricRequest.php @@ -22,7 +22,7 @@ class DeleteCalculatedMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CalculatedMetric to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteChannelGroupRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteChannelGroupRequest.php index 9072200f06a5..325ec0cd8ba6 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteChannelGroupRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteChannelGroupRequest.php @@ -21,7 +21,7 @@ class DeleteChannelGroupRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The ChannelGroup to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteConnectedSiteTagRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteConnectedSiteTagRequest.php index dd6bb1f919fe..19d55fea7d9d 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteConnectedSiteTagRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteConnectedSiteTagRequest.php @@ -23,14 +23,14 @@ class DeleteConnectedSiteTagRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string property = 1; */ - private $property = ''; + protected $property = ''; /** * Tag ID to forward events to. Also known as the Measurement ID, or the * "G-ID" (For example: G-12345). * * Generated from protobuf field string tag_id = 2; */ - private $tag_id = ''; + protected $tag_id = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteConversionEventRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteConversionEventRequest.php index b2b3027988c0..9d6de61cb354 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteConversionEventRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteConversionEventRequest.php @@ -22,7 +22,7 @@ class DeleteConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The resource name of the conversion event to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteDataStreamRequest.php index 499e2e391368..39297c7804f7 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteDataStreamRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteDataStreamRequest.php @@ -21,7 +21,7 @@ class DeleteDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the DataStream to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteDisplayVideo360AdvertiserLinkProposalRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteDisplayVideo360AdvertiserLinkProposalRequest.php index 4993fe358d67..9919c26cb01d 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteDisplayVideo360AdvertiserLinkProposalRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteDisplayVideo360AdvertiserLinkProposalRequest.php @@ -21,7 +21,7 @@ class DeleteDisplayVideo360AdvertiserLinkProposalRequest extends \Google\Protobu * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteDisplayVideo360AdvertiserLinkRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteDisplayVideo360AdvertiserLinkRequest.php index 2175476039ba..36ae92ceb434 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteDisplayVideo360AdvertiserLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteDisplayVideo360AdvertiserLinkRequest.php @@ -21,7 +21,7 @@ class DeleteDisplayVideo360AdvertiserLinkRequest extends \Google\Protobuf\Intern * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the DisplayVideo360AdvertiserLink to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteEventCreateRuleRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteEventCreateRuleRequest.php index 1c61efd35de1..ebf012c1be2c 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteEventCreateRuleRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteEventCreateRuleRequest.php @@ -21,7 +21,7 @@ class DeleteEventCreateRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Example format: diff --git a/AnalyticsAdmin/src/V1alpha/DeleteEventEditRuleRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteEventEditRuleRequest.php index 9a5322dfec35..e75d1856e39f 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteEventEditRuleRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteEventEditRuleRequest.php @@ -20,7 +20,7 @@ class DeleteEventEditRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Example format: properties/123/dataStreams/456/eventEditRules/789 diff --git a/AnalyticsAdmin/src/V1alpha/DeleteExpandedDataSetRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteExpandedDataSetRequest.php index 09987edd4ded..b635f61d6a9d 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteExpandedDataSetRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteExpandedDataSetRequest.php @@ -20,7 +20,7 @@ class DeleteExpandedDataSetRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Example format: properties/1234/expandedDataSets/5678 diff --git a/AnalyticsAdmin/src/V1alpha/DeleteFirebaseLinkRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteFirebaseLinkRequest.php index 45914b41843e..31ceb191cee4 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteFirebaseLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteFirebaseLinkRequest.php @@ -21,7 +21,7 @@ class DeleteFirebaseLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} diff --git a/AnalyticsAdmin/src/V1alpha/DeleteGoogleAdsLinkRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteGoogleAdsLinkRequest.php index 7c91cc7b44da..04dbf0efeb1d 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteGoogleAdsLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteGoogleAdsLinkRequest.php @@ -20,7 +20,7 @@ class DeleteGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Example format: properties/1234/googleAdsLinks/5678 diff --git a/AnalyticsAdmin/src/V1alpha/DeleteIosAppDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteIosAppDataStreamRequest.php deleted file mode 100644 index 6ba36c8ac00e..000000000000 --- a/AnalyticsAdmin/src/V1alpha/DeleteIosAppDataStreamRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.analytics.admin.v1alpha.DeleteIosAppDataStreamRequest - */ -class DeleteIosAppDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the iOS app data stream to delete. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/123/iosAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the iOS app data stream to delete. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/123/iosAppDataStreams/456" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the iOS app data stream to delete. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/123/iosAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the iOS app data stream to delete. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/123/iosAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/DeleteKeyEventRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteKeyEventRequest.php index 0ac38dfbdee0..f01af4a03ca0 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteKeyEventRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteKeyEventRequest.php @@ -22,7 +22,7 @@ class DeleteKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The resource name of the Key Event to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteMeasurementProtocolSecretRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteMeasurementProtocolSecretRequest.php index 9a94f94caa71..bebadcf7c6b6 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteMeasurementProtocolSecretRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteMeasurementProtocolSecretRequest.php @@ -22,7 +22,7 @@ class DeleteMeasurementProtocolSecretRequest extends \Google\Protobuf\Internal\M * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the MeasurementProtocolSecret to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeletePropertyRequest.php b/AnalyticsAdmin/src/V1alpha/DeletePropertyRequest.php index 0fdc0e3e249c..b02529405170 100644 --- a/AnalyticsAdmin/src/V1alpha/DeletePropertyRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeletePropertyRequest.php @@ -22,7 +22,7 @@ class DeletePropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the Property to soft-delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteRollupPropertySourceLinkRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteRollupPropertySourceLinkRequest.php index 24eac9b9fc67..c72ba364639c 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteRollupPropertySourceLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteRollupPropertySourceLinkRequest.php @@ -22,7 +22,7 @@ class DeleteRollupPropertySourceLinkRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Format: diff --git a/AnalyticsAdmin/src/V1alpha/DeleteSKAdNetworkConversionValueSchemaRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteSKAdNetworkConversionValueSchemaRequest.php index 126e4410a706..19aa61ab4479 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteSKAdNetworkConversionValueSchemaRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteSKAdNetworkConversionValueSchemaRequest.php @@ -22,7 +22,7 @@ class DeleteSKAdNetworkConversionValueSchemaRequest extends \Google\Protobuf\Int * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the SKAdNetworkConversionValueSchema to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteSearchAds360LinkRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteSearchAds360LinkRequest.php index 62a47b9d4918..253c2ef837f3 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteSearchAds360LinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteSearchAds360LinkRequest.php @@ -21,7 +21,7 @@ class DeleteSearchAds360LinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the SearchAds360Link to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteSubpropertyEventFilterRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteSubpropertyEventFilterRequest.php index 285aee32258c..553862e67311 100644 --- a/AnalyticsAdmin/src/V1alpha/DeleteSubpropertyEventFilterRequest.php +++ b/AnalyticsAdmin/src/V1alpha/DeleteSubpropertyEventFilterRequest.php @@ -23,7 +23,7 @@ class DeleteSubpropertyEventFilterRequest extends \Google\Protobuf\Internal\Mess * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Resource name of the subproperty event filter to delete. diff --git a/AnalyticsAdmin/src/V1alpha/DeleteUserLinkRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteUserLinkRequest.php deleted file mode 100644 index d4d4e3a1e370..000000000000 --- a/AnalyticsAdmin/src/V1alpha/DeleteUserLinkRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.analytics.admin.v1alpha.DeleteUserLinkRequest - */ -class DeleteUserLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Example format: accounts/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Example format: accounts/1234/userLinks/5678 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Example format: accounts/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Example format: accounts/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/DeleteWebDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteWebDataStreamRequest.php deleted file mode 100644 index 47ca3663b6e3..000000000000 --- a/AnalyticsAdmin/src/V1alpha/DeleteWebDataStreamRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.analytics.admin.v1alpha.DeleteWebDataStreamRequest - */ -class DeleteWebDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the web data stream to delete. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/123/webDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the web data stream to delete. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/123/webDataStreams/456" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the web data stream to delete. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/123/webDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the web data stream to delete. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/123/webDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/DisplayVideo360AdvertiserLink.php b/AnalyticsAdmin/src/V1alpha/DisplayVideo360AdvertiserLink.php index 4ec08e4542fb..db07c2123059 100644 --- a/AnalyticsAdmin/src/V1alpha/DisplayVideo360AdvertiserLink.php +++ b/AnalyticsAdmin/src/V1alpha/DisplayVideo360AdvertiserLink.php @@ -23,26 +23,26 @@ class DisplayVideo360AdvertiserLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The Display & Video 360 Advertiser's advertiser ID. * * Generated from protobuf field string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $advertiser_id = ''; + protected $advertiser_id = ''; /** * Output only. The display name of the Display & Video 360 Advertiser. * * Generated from protobuf field string advertiser_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $advertiser_display_name = ''; + protected $advertiser_display_name = ''; /** * Enables personalized advertising features with this integration. * If this field is not set on create/update, it will be defaulted to true. * * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 4; */ - private $ads_personalization_enabled = null; + protected $ads_personalization_enabled = null; /** * Immutable. Enables the import of campaign data from Display & Video 360 * into the GA4 property. After link creation, this can only be updated from @@ -51,7 +51,7 @@ class DisplayVideo360AdvertiserLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $campaign_data_sharing_enabled = null; + protected $campaign_data_sharing_enabled = null; /** * Immutable. Enables the import of cost data from Display & Video 360 into * the GA4 property. This can only be enabled if campaign_data_sharing_enabled @@ -61,7 +61,7 @@ class DisplayVideo360AdvertiserLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $cost_data_sharing_enabled = null; + protected $cost_data_sharing_enabled = null; /** * Constructor. @@ -214,7 +214,7 @@ public function clearAdsPersonalizationEnabled() * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 4; * @return bool|null */ - public function getAdsPersonalizationEnabledValue() + public function getAdsPersonalizationEnabledUnwrapped() { return $this->readWrapperValue("ads_personalization_enabled"); } @@ -245,7 +245,7 @@ public function setAdsPersonalizationEnabled($var) * @param bool|null $var * @return $this */ - public function setAdsPersonalizationEnabledValue($var) + public function setAdsPersonalizationEnabledUnwrapped($var) { $this->writeWrapperValue("ads_personalization_enabled", $var); return $this;} @@ -285,7 +285,7 @@ public function clearCampaignDataSharingEnabled() * Generated from protobuf field .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE]; * @return bool|null */ - public function getCampaignDataSharingEnabledValue() + public function getCampaignDataSharingEnabledUnwrapped() { return $this->readWrapperValue("campaign_data_sharing_enabled"); } @@ -320,7 +320,7 @@ public function setCampaignDataSharingEnabled($var) * @param bool|null $var * @return $this */ - public function setCampaignDataSharingEnabledValue($var) + public function setCampaignDataSharingEnabledUnwrapped($var) { $this->writeWrapperValue("campaign_data_sharing_enabled", $var); return $this;} @@ -362,7 +362,7 @@ public function clearCostDataSharingEnabled() * Generated from protobuf field .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE]; * @return bool|null */ - public function getCostDataSharingEnabledValue() + public function getCostDataSharingEnabledUnwrapped() { return $this->readWrapperValue("cost_data_sharing_enabled"); } @@ -399,7 +399,7 @@ public function setCostDataSharingEnabled($var) * @param bool|null $var * @return $this */ - public function setCostDataSharingEnabledValue($var) + public function setCostDataSharingEnabledUnwrapped($var) { $this->writeWrapperValue("cost_data_sharing_enabled", $var); return $this;} diff --git a/AnalyticsAdmin/src/V1alpha/DisplayVideo360AdvertiserLinkProposal.php b/AnalyticsAdmin/src/V1alpha/DisplayVideo360AdvertiserLinkProposal.php index c86f7a63b695..ff6821888ae0 100644 --- a/AnalyticsAdmin/src/V1alpha/DisplayVideo360AdvertiserLinkProposal.php +++ b/AnalyticsAdmin/src/V1alpha/DisplayVideo360AdvertiserLinkProposal.php @@ -27,26 +27,26 @@ class DisplayVideo360AdvertiserLinkProposal extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The Display & Video 360 Advertiser's advertiser ID. * * Generated from protobuf field string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $advertiser_id = ''; + protected $advertiser_id = ''; /** * Output only. The status information for this link proposal. * * Generated from protobuf field .google.analytics.admin.v1alpha.LinkProposalStatusDetails link_proposal_status_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $link_proposal_status_details = null; + protected $link_proposal_status_details = null; /** * Output only. The display name of the Display & Video Advertiser. * Only populated for proposals that originated from Display & Video 360. * * Generated from protobuf field string advertiser_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $advertiser_display_name = ''; + protected $advertiser_display_name = ''; /** * Input only. On a proposal being sent to Display & Video 360, this field * must be set to the email address of an admin on the target advertiser. This @@ -57,21 +57,21 @@ class DisplayVideo360AdvertiserLinkProposal extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string validation_email = 5 [(.google.api.field_behavior) = INPUT_ONLY]; */ - private $validation_email = ''; + protected $validation_email = ''; /** * Immutable. Enables personalized advertising features with this integration. * If this field is not set on create, it will be defaulted to true. * * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $ads_personalization_enabled = null; + protected $ads_personalization_enabled = null; /** * Immutable. Enables the import of campaign data from Display & Video 360. * If this field is not set on create, it will be defaulted to true. * * Generated from protobuf field .google.protobuf.BoolValue campaign_data_sharing_enabled = 7 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $campaign_data_sharing_enabled = null; + protected $campaign_data_sharing_enabled = null; /** * Immutable. Enables the import of cost data from Display & Video 360. * This can only be enabled if campaign_data_sharing_enabled is enabled. @@ -79,7 +79,7 @@ class DisplayVideo360AdvertiserLinkProposal extends \Google\Protobuf\Internal\Me * * Generated from protobuf field .google.protobuf.BoolValue cost_data_sharing_enabled = 8 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $cost_data_sharing_enabled = null; + protected $cost_data_sharing_enabled = null; /** * Constructor. @@ -312,7 +312,7 @@ public function clearAdsPersonalizationEnabled() * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE]; * @return bool|null */ - public function getAdsPersonalizationEnabledValue() + public function getAdsPersonalizationEnabledUnwrapped() { return $this->readWrapperValue("ads_personalization_enabled"); } @@ -343,7 +343,7 @@ public function setAdsPersonalizationEnabled($var) * @param bool|null $var * @return $this */ - public function setAdsPersonalizationEnabledValue($var) + public function setAdsPersonalizationEnabledUnwrapped($var) { $this->writeWrapperValue("ads_personalization_enabled", $var); return $this;} @@ -379,7 +379,7 @@ public function clearCampaignDataSharingEnabled() * Generated from protobuf field .google.protobuf.BoolValue campaign_data_sharing_enabled = 7 [(.google.api.field_behavior) = IMMUTABLE]; * @return bool|null */ - public function getCampaignDataSharingEnabledValue() + public function getCampaignDataSharingEnabledUnwrapped() { return $this->readWrapperValue("campaign_data_sharing_enabled"); } @@ -410,7 +410,7 @@ public function setCampaignDataSharingEnabled($var) * @param bool|null $var * @return $this */ - public function setCampaignDataSharingEnabledValue($var) + public function setCampaignDataSharingEnabledUnwrapped($var) { $this->writeWrapperValue("campaign_data_sharing_enabled", $var); return $this;} @@ -448,7 +448,7 @@ public function clearCostDataSharingEnabled() * Generated from protobuf field .google.protobuf.BoolValue cost_data_sharing_enabled = 8 [(.google.api.field_behavior) = IMMUTABLE]; * @return bool|null */ - public function getCostDataSharingEnabledValue() + public function getCostDataSharingEnabledUnwrapped() { return $this->readWrapperValue("cost_data_sharing_enabled"); } @@ -481,7 +481,7 @@ public function setCostDataSharingEnabled($var) * @param bool|null $var * @return $this */ - public function setCostDataSharingEnabledValue($var) + public function setCostDataSharingEnabledUnwrapped($var) { $this->writeWrapperValue("cost_data_sharing_enabled", $var); return $this;} diff --git a/AnalyticsAdmin/src/V1alpha/EnhancedMeasurementSettings.php b/AnalyticsAdmin/src/V1alpha/EnhancedMeasurementSettings.php index 44106cb54265..b210cd61041e 100644 --- a/AnalyticsAdmin/src/V1alpha/EnhancedMeasurementSettings.php +++ b/AnalyticsAdmin/src/V1alpha/EnhancedMeasurementSettings.php @@ -24,7 +24,7 @@ class EnhancedMeasurementSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Indicates whether Enhanced Measurement Settings will be used to * automatically measure interactions and content on this web stream. @@ -33,49 +33,49 @@ class EnhancedMeasurementSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool stream_enabled = 2; */ - private $stream_enabled = false; + protected $stream_enabled = false; /** * If enabled, capture scroll events each time a visitor gets to the bottom of * a page. * * Generated from protobuf field bool scrolls_enabled = 3; */ - private $scrolls_enabled = false; + protected $scrolls_enabled = false; /** * If enabled, capture an outbound click event each time a visitor clicks a * link that leads them away from your domain. * * Generated from protobuf field bool outbound_clicks_enabled = 4; */ - private $outbound_clicks_enabled = false; + protected $outbound_clicks_enabled = false; /** * If enabled, capture a view search results event each time a visitor * performs a search on your site (based on a query parameter). * * Generated from protobuf field bool site_search_enabled = 5; */ - private $site_search_enabled = false; + protected $site_search_enabled = false; /** * If enabled, capture video play, progress, and complete events as visitors * view embedded videos on your site. * * Generated from protobuf field bool video_engagement_enabled = 6; */ - private $video_engagement_enabled = false; + protected $video_engagement_enabled = false; /** * If enabled, capture a file download event each time a link is clicked with * a common document, compressed file, application, video, or audio extension. * * Generated from protobuf field bool file_downloads_enabled = 7; */ - private $file_downloads_enabled = false; + protected $file_downloads_enabled = false; /** * If enabled, capture a page view event each time the website changes the * browser history state. * * Generated from protobuf field bool page_changes_enabled = 8; */ - private $page_changes_enabled = false; + protected $page_changes_enabled = false; /** * If enabled, capture a form interaction event each time a visitor interacts * with a form on your website. @@ -83,21 +83,21 @@ class EnhancedMeasurementSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool form_interactions_enabled = 9; */ - private $form_interactions_enabled = false; + protected $form_interactions_enabled = false; /** * Required. URL query parameters to interpret as site search parameters. * Max length is 1024 characters. Must not be empty. * * Generated from protobuf field string search_query_parameter = 10 [(.google.api.field_behavior) = REQUIRED]; */ - private $search_query_parameter = ''; + protected $search_query_parameter = ''; /** * Additional URL query parameters. * Max length is 1024 characters. * * Generated from protobuf field string uri_query_parameter = 11; */ - private $uri_query_parameter = ''; + protected $uri_query_parameter = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/EventCreateRule.php b/AnalyticsAdmin/src/V1alpha/EventCreateRule.php index 2b863894e29b..f5101fcff128 100644 --- a/AnalyticsAdmin/src/V1alpha/EventCreateRule.php +++ b/AnalyticsAdmin/src/V1alpha/EventCreateRule.php @@ -28,7 +28,7 @@ class EventCreateRule extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. The name of the new event to be created. * This value must: @@ -38,7 +38,7 @@ class EventCreateRule extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string destination_event = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $destination_event = ''; + protected $destination_event = ''; /** * Required. Must have at least one condition, and can have up to 10 max. * Conditions on the source event must match for this rule to be applied. @@ -54,7 +54,7 @@ class EventCreateRule extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool source_copy_parameters = 4; */ - private $source_copy_parameters = false; + protected $source_copy_parameters = false; /** * Parameter mutations define parameter behavior on the new event, and * are applied in order. diff --git a/AnalyticsAdmin/src/V1alpha/EventEditRule.php b/AnalyticsAdmin/src/V1alpha/EventEditRule.php index cbb5ee8289a5..02c24124702c 100644 --- a/AnalyticsAdmin/src/V1alpha/EventEditRule.php +++ b/AnalyticsAdmin/src/V1alpha/EventEditRule.php @@ -28,14 +28,14 @@ class EventEditRule extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ - private $name = ''; + protected $name = ''; /** * Required. The display name of this event edit rule. Maximum of 255 * characters. * * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Required. Conditions on the source event must match for this rule to be * applied. Must have at least one condition, and can have up to 10 max. @@ -59,7 +59,7 @@ class EventEditRule extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int64 processing_order = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $processing_order = 0; + protected $processing_order = 0; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/EventMapping.php b/AnalyticsAdmin/src/V1alpha/EventMapping.php index d99cd61194be..62800a21cb3f 100644 --- a/AnalyticsAdmin/src/V1alpha/EventMapping.php +++ b/AnalyticsAdmin/src/V1alpha/EventMapping.php @@ -21,7 +21,7 @@ class EventMapping extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string event_name = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $event_name = ''; + protected $event_name = ''; /** * At least one of the following four min/max values must be set. The * values set will be ANDed together to qualify an event. @@ -30,14 +30,14 @@ class EventMapping extends \Google\Protobuf\Internal\Message * * Generated from protobuf field optional int64 min_event_count = 2; */ - private $min_event_count = null; + protected $min_event_count = null; /** * The maximum number of times the event occurred. If not set, maximum event * count won't be checked. * * Generated from protobuf field optional int64 max_event_count = 3; */ - private $max_event_count = null; + protected $max_event_count = null; /** * The minimum revenue generated due to the event. Revenue currency will be * defined at the property level. If not set, minimum event value won't be @@ -45,7 +45,7 @@ class EventMapping extends \Google\Protobuf\Internal\Message * * Generated from protobuf field optional double min_event_value = 4; */ - private $min_event_value = null; + protected $min_event_value = null; /** * The maximum revenue generated due to the event. Revenue currency will be * defined at the property level. If not set, maximum event value won't be @@ -53,7 +53,7 @@ class EventMapping extends \Google\Protobuf\Internal\Message * * Generated from protobuf field optional double max_event_value = 5; */ - private $max_event_value = null; + protected $max_event_value = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ExpandedDataSet.php b/AnalyticsAdmin/src/V1alpha/ExpandedDataSet.php index 8bb5e8c873af..0c24c2b5a748 100644 --- a/AnalyticsAdmin/src/V1alpha/ExpandedDataSet.php +++ b/AnalyticsAdmin/src/V1alpha/ExpandedDataSet.php @@ -21,21 +21,21 @@ class ExpandedDataSet extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. The display name of the ExpandedDataSet. * Max 200 chars. * * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Optional. The description of the ExpandedDataSet. * Max 50 chars. * * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $description = ''; + protected $description = ''; /** * Immutable. The list of dimensions included in the ExpandedDataSet. * See the [API @@ -61,14 +61,14 @@ class ExpandedDataSet extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.ExpandedDataSetFilterExpression dimension_filter_expression = 6 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $dimension_filter_expression = null; + protected $dimension_filter_expression = null; /** * Output only. Time when expanded data set began (or will begin) collecing * data. * * Generated from protobuf field .google.protobuf.Timestamp data_collection_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $data_collection_start_time = null; + protected $data_collection_start_time = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter.php b/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter.php index b7e08e3a4da3..22aed1babf03 100644 --- a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter.php +++ b/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter.php @@ -20,7 +20,7 @@ class ExpandedDataSetFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $field_name = ''; + protected $field_name = ''; protected $one_filter; /** diff --git a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/InListFilter.php b/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/InListFilter.php index 70abd63051f9..86d55e0a2901 100644 --- a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/InListFilter.php +++ b/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/InListFilter.php @@ -29,7 +29,7 @@ class InListFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool case_sensitive = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $case_sensitive = false; + protected $case_sensitive = false; /** * Constructor. @@ -111,6 +111,4 @@ public function setCaseSensitive($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InListFilter::class, \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilter_InListFilter::class); diff --git a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/StringFilter.php b/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/StringFilter.php index a728e1166dcb..e7a8322fc77c 100644 --- a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/StringFilter.php +++ b/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/StringFilter.php @@ -20,13 +20,13 @@ class StringFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.ExpandedDataSetFilter.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $match_type = 0; + protected $match_type = 0; /** * Required. The string value to be matched against. * * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $value = ''; + protected $value = ''; /** * Optional. If true, the match is case-sensitive. If false, the match is * case-insensitive. @@ -35,7 +35,7 @@ class StringFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool case_sensitive = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $case_sensitive = false; + protected $case_sensitive = false; /** * Constructor. @@ -145,6 +145,4 @@ public function setCaseSensitive($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StringFilter::class, \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilter_StringFilter::class); diff --git a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/StringFilter/MatchType.php b/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/StringFilter/MatchType.php index b8c07512fb95..f67a2eacc3c8 100644 --- a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/StringFilter/MatchType.php +++ b/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter/StringFilter/MatchType.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MatchType::class, \Google\Analytics\Admin\V1alpha\ExpandedDataSetFilter_StringFilter_MatchType::class); diff --git a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter_InListFilter.php b/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter_InListFilter.php deleted file mode 100644 index d40b3c4d7e54..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ExpandedDataSetFilter_InListFilter.php +++ /dev/null @@ -1,16 +0,0 @@ -string property = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $property = ''; + protected $property = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/FetchAutomatedGa4ConfigurationOptOutResponse.php b/AnalyticsAdmin/src/V1alpha/FetchAutomatedGa4ConfigurationOptOutResponse.php index 190d30277781..aa38497d6e9b 100644 --- a/AnalyticsAdmin/src/V1alpha/FetchAutomatedGa4ConfigurationOptOutResponse.php +++ b/AnalyticsAdmin/src/V1alpha/FetchAutomatedGa4ConfigurationOptOutResponse.php @@ -21,7 +21,7 @@ class FetchAutomatedGa4ConfigurationOptOutResponse extends \Google\Protobuf\Inte * * Generated from protobuf field bool opt_out = 1; */ - private $opt_out = false; + protected $opt_out = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/FetchConnectedGa4PropertyRequest.php b/AnalyticsAdmin/src/V1alpha/FetchConnectedGa4PropertyRequest.php index 53321d30389e..61191cef5a19 100644 --- a/AnalyticsAdmin/src/V1alpha/FetchConnectedGa4PropertyRequest.php +++ b/AnalyticsAdmin/src/V1alpha/FetchConnectedGa4PropertyRequest.php @@ -24,7 +24,7 @@ class FetchConnectedGa4PropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $property = ''; + protected $property = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/FetchConnectedGa4PropertyResponse.php b/AnalyticsAdmin/src/V1alpha/FetchConnectedGa4PropertyResponse.php index a9d7edc2dede..a94bf8de4550 100644 --- a/AnalyticsAdmin/src/V1alpha/FetchConnectedGa4PropertyResponse.php +++ b/AnalyticsAdmin/src/V1alpha/FetchConnectedGa4PropertyResponse.php @@ -23,7 +23,7 @@ class FetchConnectedGa4PropertyResponse extends \Google\Protobuf\Internal\Messag * * Generated from protobuf field string property = 1 [(.google.api.resource_reference) = { */ - private $property = ''; + protected $property = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/FirebaseLink.php b/AnalyticsAdmin/src/V1alpha/FirebaseLink.php index 50787b7116c9..741cb2628234 100644 --- a/AnalyticsAdmin/src/V1alpha/FirebaseLink.php +++ b/AnalyticsAdmin/src/V1alpha/FirebaseLink.php @@ -20,7 +20,7 @@ class FirebaseLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. Firebase project resource name. When creating a FirebaseLink, * you may provide this resource name using either a project number or project @@ -31,13 +31,13 @@ class FirebaseLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $project = ''; + protected $project = ''; /** * Output only. Time when this FirebaseLink was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/Gapic/AnalyticsAdminServiceGapicClient.php b/AnalyticsAdmin/src/V1alpha/Gapic/AnalyticsAdminServiceGapicClient.php deleted file mode 100644 index 4642ea29d8b7..000000000000 --- a/AnalyticsAdmin/src/V1alpha/Gapic/AnalyticsAdminServiceGapicClient.php +++ /dev/null @@ -1,9215 +0,0 @@ -propertyName('[PROPERTY]'); - * $acknowledgement = 'acknowledgement'; - * $response = $analyticsAdminServiceClient->acknowledgeUserDataCollection($formattedProperty, $acknowledgement); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * 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 parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - * - * @deprecated Please use the new service client {@see \Google\Analytics\Admin\V1alpha\Client\AnalyticsAdminServiceClient}. - */ -class AnalyticsAdminServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.analytics.admin.v1alpha.AnalyticsAdminService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'analyticsadmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'analyticsadmin.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/analytics.edit', - 'https://www.googleapis.com/auth/analytics.manage.users', - 'https://www.googleapis.com/auth/analytics.manage.users.readonly', - 'https://www.googleapis.com/auth/analytics.readonly', - ]; - - private static $accessBindingNameTemplate; - - private static $accountNameTemplate; - - private static $accountAccessBindingNameTemplate; - - private static $adSenseLinkNameTemplate; - - private static $attributionSettingsNameTemplate; - - private static $audienceNameTemplate; - - private static $bigQueryLinkNameTemplate; - - private static $calculatedMetricNameTemplate; - - private static $channelGroupNameTemplate; - - private static $conversionEventNameTemplate; - - private static $customDimensionNameTemplate; - - private static $customMetricNameTemplate; - - private static $dataRedactionSettingsNameTemplate; - - private static $dataRetentionSettingsNameTemplate; - - private static $dataSharingSettingsNameTemplate; - - private static $dataStreamNameTemplate; - - private static $displayVideo360AdvertiserLinkNameTemplate; - - private static $displayVideo360AdvertiserLinkProposalNameTemplate; - - private static $enhancedMeasurementSettingsNameTemplate; - - private static $eventCreateRuleNameTemplate; - - private static $eventEditRuleNameTemplate; - - private static $expandedDataSetNameTemplate; - - private static $firebaseLinkNameTemplate; - - private static $globalSiteTagNameTemplate; - - private static $googleAdsLinkNameTemplate; - - private static $googleSignalsSettingsNameTemplate; - - private static $keyEventNameTemplate; - - private static $measurementProtocolSecretNameTemplate; - - private static $organizationNameTemplate; - - private static $propertyNameTemplate; - - private static $propertyAccessBindingNameTemplate; - - private static $rollupPropertySourceLinkNameTemplate; - - private static $sKAdNetworkConversionValueSchemaNameTemplate; - - private static $searchAds360LinkNameTemplate; - - private static $subpropertyEventFilterNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/analytics_admin_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/analytics_admin_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/analytics_admin_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/analytics_admin_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAccessBindingNameTemplate() - { - if (self::$accessBindingNameTemplate == null) { - self::$accessBindingNameTemplate = new PathTemplate('accounts/{account}/accessBindings/{access_binding}'); - } - - return self::$accessBindingNameTemplate; - } - - private static function getAccountNameTemplate() - { - if (self::$accountNameTemplate == null) { - self::$accountNameTemplate = new PathTemplate('accounts/{account}'); - } - - return self::$accountNameTemplate; - } - - private static function getAccountAccessBindingNameTemplate() - { - if (self::$accountAccessBindingNameTemplate == null) { - self::$accountAccessBindingNameTemplate = new PathTemplate('accounts/{account}/accessBindings/{access_binding}'); - } - - return self::$accountAccessBindingNameTemplate; - } - - private static function getAdSenseLinkNameTemplate() - { - if (self::$adSenseLinkNameTemplate == null) { - self::$adSenseLinkNameTemplate = new PathTemplate('properties/{property}/adSenseLinks/{adsense_link}'); - } - - return self::$adSenseLinkNameTemplate; - } - - private static function getAttributionSettingsNameTemplate() - { - if (self::$attributionSettingsNameTemplate == null) { - self::$attributionSettingsNameTemplate = new PathTemplate('properties/{property}/attributionSettings'); - } - - return self::$attributionSettingsNameTemplate; - } - - private static function getAudienceNameTemplate() - { - if (self::$audienceNameTemplate == null) { - self::$audienceNameTemplate = new PathTemplate('properties/{property}/audiences/{audience}'); - } - - return self::$audienceNameTemplate; - } - - private static function getBigQueryLinkNameTemplate() - { - if (self::$bigQueryLinkNameTemplate == null) { - self::$bigQueryLinkNameTemplate = new PathTemplate('properties/{property}/bigQueryLinks/{bigquery_link}'); - } - - return self::$bigQueryLinkNameTemplate; - } - - private static function getCalculatedMetricNameTemplate() - { - if (self::$calculatedMetricNameTemplate == null) { - self::$calculatedMetricNameTemplate = new PathTemplate('properties/{property}/calculatedMetrics/{calculated_metric}'); - } - - return self::$calculatedMetricNameTemplate; - } - - private static function getChannelGroupNameTemplate() - { - if (self::$channelGroupNameTemplate == null) { - self::$channelGroupNameTemplate = new PathTemplate('properties/{property}/channelGroups/{channel_group}'); - } - - return self::$channelGroupNameTemplate; - } - - private static function getConversionEventNameTemplate() - { - if (self::$conversionEventNameTemplate == null) { - self::$conversionEventNameTemplate = new PathTemplate('properties/{property}/conversionEvents/{conversion_event}'); - } - - return self::$conversionEventNameTemplate; - } - - private static function getCustomDimensionNameTemplate() - { - if (self::$customDimensionNameTemplate == null) { - self::$customDimensionNameTemplate = new PathTemplate('properties/{property}/customDimensions/{custom_dimension}'); - } - - return self::$customDimensionNameTemplate; - } - - private static function getCustomMetricNameTemplate() - { - if (self::$customMetricNameTemplate == null) { - self::$customMetricNameTemplate = new PathTemplate('properties/{property}/customMetrics/{custom_metric}'); - } - - return self::$customMetricNameTemplate; - } - - private static function getDataRedactionSettingsNameTemplate() - { - if (self::$dataRedactionSettingsNameTemplate == null) { - self::$dataRedactionSettingsNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}/dataRedactionSettings'); - } - - return self::$dataRedactionSettingsNameTemplate; - } - - private static function getDataRetentionSettingsNameTemplate() - { - if (self::$dataRetentionSettingsNameTemplate == null) { - self::$dataRetentionSettingsNameTemplate = new PathTemplate('properties/{property}/dataRetentionSettings'); - } - - return self::$dataRetentionSettingsNameTemplate; - } - - private static function getDataSharingSettingsNameTemplate() - { - if (self::$dataSharingSettingsNameTemplate == null) { - self::$dataSharingSettingsNameTemplate = new PathTemplate('accounts/{account}/dataSharingSettings'); - } - - return self::$dataSharingSettingsNameTemplate; - } - - private static function getDataStreamNameTemplate() - { - if (self::$dataStreamNameTemplate == null) { - self::$dataStreamNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}'); - } - - return self::$dataStreamNameTemplate; - } - - private static function getDisplayVideo360AdvertiserLinkNameTemplate() - { - if (self::$displayVideo360AdvertiserLinkNameTemplate == null) { - self::$displayVideo360AdvertiserLinkNameTemplate = new PathTemplate('properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}'); - } - - return self::$displayVideo360AdvertiserLinkNameTemplate; - } - - private static function getDisplayVideo360AdvertiserLinkProposalNameTemplate() - { - if (self::$displayVideo360AdvertiserLinkProposalNameTemplate == null) { - self::$displayVideo360AdvertiserLinkProposalNameTemplate = new PathTemplate('properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}'); - } - - return self::$displayVideo360AdvertiserLinkProposalNameTemplate; - } - - private static function getEnhancedMeasurementSettingsNameTemplate() - { - if (self::$enhancedMeasurementSettingsNameTemplate == null) { - self::$enhancedMeasurementSettingsNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings'); - } - - return self::$enhancedMeasurementSettingsNameTemplate; - } - - private static function getEventCreateRuleNameTemplate() - { - if (self::$eventCreateRuleNameTemplate == null) { - self::$eventCreateRuleNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule}'); - } - - return self::$eventCreateRuleNameTemplate; - } - - private static function getEventEditRuleNameTemplate() - { - if (self::$eventEditRuleNameTemplate == null) { - self::$eventEditRuleNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}/eventEditRules/{event_edit_rule}'); - } - - return self::$eventEditRuleNameTemplate; - } - - private static function getExpandedDataSetNameTemplate() - { - if (self::$expandedDataSetNameTemplate == null) { - self::$expandedDataSetNameTemplate = new PathTemplate('properties/{property}/expandedDataSets/{expanded_data_set}'); - } - - return self::$expandedDataSetNameTemplate; - } - - private static function getFirebaseLinkNameTemplate() - { - if (self::$firebaseLinkNameTemplate == null) { - self::$firebaseLinkNameTemplate = new PathTemplate('properties/{property}/firebaseLinks/{firebase_link}'); - } - - return self::$firebaseLinkNameTemplate; - } - - private static function getGlobalSiteTagNameTemplate() - { - if (self::$globalSiteTagNameTemplate == null) { - self::$globalSiteTagNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}/globalSiteTag'); - } - - return self::$globalSiteTagNameTemplate; - } - - private static function getGoogleAdsLinkNameTemplate() - { - if (self::$googleAdsLinkNameTemplate == null) { - self::$googleAdsLinkNameTemplate = new PathTemplate('properties/{property}/googleAdsLinks/{google_ads_link}'); - } - - return self::$googleAdsLinkNameTemplate; - } - - private static function getGoogleSignalsSettingsNameTemplate() - { - if (self::$googleSignalsSettingsNameTemplate == null) { - self::$googleSignalsSettingsNameTemplate = new PathTemplate('properties/{property}/googleSignalsSettings'); - } - - return self::$googleSignalsSettingsNameTemplate; - } - - private static function getKeyEventNameTemplate() - { - if (self::$keyEventNameTemplate == null) { - self::$keyEventNameTemplate = new PathTemplate('properties/{property}/keyEvents/{key_event}'); - } - - return self::$keyEventNameTemplate; - } - - private static function getMeasurementProtocolSecretNameTemplate() - { - if (self::$measurementProtocolSecretNameTemplate == null) { - self::$measurementProtocolSecretNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}'); - } - - return self::$measurementProtocolSecretNameTemplate; - } - - private static function getOrganizationNameTemplate() - { - if (self::$organizationNameTemplate == null) { - self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); - } - - return self::$organizationNameTemplate; - } - - private static function getPropertyNameTemplate() - { - if (self::$propertyNameTemplate == null) { - self::$propertyNameTemplate = new PathTemplate('properties/{property}'); - } - - return self::$propertyNameTemplate; - } - - private static function getPropertyAccessBindingNameTemplate() - { - if (self::$propertyAccessBindingNameTemplate == null) { - self::$propertyAccessBindingNameTemplate = new PathTemplate('properties/{property}/accessBindings/{access_binding}'); - } - - return self::$propertyAccessBindingNameTemplate; - } - - private static function getRollupPropertySourceLinkNameTemplate() - { - if (self::$rollupPropertySourceLinkNameTemplate == null) { - self::$rollupPropertySourceLinkNameTemplate = new PathTemplate('properties/{property}/rollupPropertySourceLinks/{rollup_property_source_link}'); - } - - return self::$rollupPropertySourceLinkNameTemplate; - } - - private static function getSKAdNetworkConversionValueSchemaNameTemplate() - { - if (self::$sKAdNetworkConversionValueSchemaNameTemplate == null) { - self::$sKAdNetworkConversionValueSchemaNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}'); - } - - return self::$sKAdNetworkConversionValueSchemaNameTemplate; - } - - private static function getSearchAds360LinkNameTemplate() - { - if (self::$searchAds360LinkNameTemplate == null) { - self::$searchAds360LinkNameTemplate = new PathTemplate('properties/{property}/searchAds360Links/{search_ads_360_link}'); - } - - return self::$searchAds360LinkNameTemplate; - } - - private static function getSubpropertyEventFilterNameTemplate() - { - if (self::$subpropertyEventFilterNameTemplate == null) { - self::$subpropertyEventFilterNameTemplate = new PathTemplate('properties/{property}/subpropertyEventFilters/{sub_property_event_filter}'); - } - - return self::$subpropertyEventFilterNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'accessBinding' => self::getAccessBindingNameTemplate(), - 'account' => self::getAccountNameTemplate(), - 'accountAccessBinding' => self::getAccountAccessBindingNameTemplate(), - 'adSenseLink' => self::getAdSenseLinkNameTemplate(), - 'attributionSettings' => self::getAttributionSettingsNameTemplate(), - 'audience' => self::getAudienceNameTemplate(), - 'bigQueryLink' => self::getBigQueryLinkNameTemplate(), - 'calculatedMetric' => self::getCalculatedMetricNameTemplate(), - 'channelGroup' => self::getChannelGroupNameTemplate(), - 'conversionEvent' => self::getConversionEventNameTemplate(), - 'customDimension' => self::getCustomDimensionNameTemplate(), - 'customMetric' => self::getCustomMetricNameTemplate(), - 'dataRedactionSettings' => self::getDataRedactionSettingsNameTemplate(), - 'dataRetentionSettings' => self::getDataRetentionSettingsNameTemplate(), - 'dataSharingSettings' => self::getDataSharingSettingsNameTemplate(), - 'dataStream' => self::getDataStreamNameTemplate(), - 'displayVideo360AdvertiserLink' => self::getDisplayVideo360AdvertiserLinkNameTemplate(), - 'displayVideo360AdvertiserLinkProposal' => self::getDisplayVideo360AdvertiserLinkProposalNameTemplate(), - 'enhancedMeasurementSettings' => self::getEnhancedMeasurementSettingsNameTemplate(), - 'eventCreateRule' => self::getEventCreateRuleNameTemplate(), - 'eventEditRule' => self::getEventEditRuleNameTemplate(), - 'expandedDataSet' => self::getExpandedDataSetNameTemplate(), - 'firebaseLink' => self::getFirebaseLinkNameTemplate(), - 'globalSiteTag' => self::getGlobalSiteTagNameTemplate(), - 'googleAdsLink' => self::getGoogleAdsLinkNameTemplate(), - 'googleSignalsSettings' => self::getGoogleSignalsSettingsNameTemplate(), - 'keyEvent' => self::getKeyEventNameTemplate(), - 'measurementProtocolSecret' => self::getMeasurementProtocolSecretNameTemplate(), - 'organization' => self::getOrganizationNameTemplate(), - 'property' => self::getPropertyNameTemplate(), - 'propertyAccessBinding' => self::getPropertyAccessBindingNameTemplate(), - 'rollupPropertySourceLink' => self::getRollupPropertySourceLinkNameTemplate(), - 'sKAdNetworkConversionValueSchema' => self::getSKAdNetworkConversionValueSchemaNameTemplate(), - 'searchAds360Link' => self::getSearchAds360LinkNameTemplate(), - 'subpropertyEventFilter' => self::getSubpropertyEventFilterNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * access_binding resource. - * - * @param string $account - * @param string $accessBinding - * - * @return string The formatted access_binding resource. - * - * @experimental - */ - public static function accessBindingName($account, $accessBinding) - { - return self::getAccessBindingNameTemplate()->render([ - 'account' => $account, - 'access_binding' => $accessBinding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a account - * resource. - * - * @param string $account - * - * @return string The formatted account resource. - * - * @experimental - */ - public static function accountName($account) - { - return self::getAccountNameTemplate()->render([ - 'account' => $account, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * account_access_binding resource. - * - * @param string $account - * @param string $accessBinding - * - * @return string The formatted account_access_binding resource. - * - * @experimental - */ - public static function accountAccessBindingName($account, $accessBinding) - { - return self::getAccountAccessBindingNameTemplate()->render([ - 'account' => $account, - 'access_binding' => $accessBinding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * ad_sense_link resource. - * - * @param string $property - * @param string $adsenseLink - * - * @return string The formatted ad_sense_link resource. - * - * @experimental - */ - public static function adSenseLinkName($property, $adsenseLink) - { - return self::getAdSenseLinkNameTemplate()->render([ - 'property' => $property, - 'adsense_link' => $adsenseLink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * attribution_settings resource. - * - * @param string $property - * - * @return string The formatted attribution_settings resource. - * - * @experimental - */ - public static function attributionSettingsName($property) - { - return self::getAttributionSettingsNameTemplate()->render([ - 'property' => $property, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a audience - * resource. - * - * @param string $property - * @param string $audience - * - * @return string The formatted audience resource. - * - * @experimental - */ - public static function audienceName($property, $audience) - { - return self::getAudienceNameTemplate()->render([ - 'property' => $property, - 'audience' => $audience, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * big_query_link resource. - * - * @param string $property - * @param string $bigqueryLink - * - * @return string The formatted big_query_link resource. - * - * @experimental - */ - public static function bigQueryLinkName($property, $bigqueryLink) - { - return self::getBigQueryLinkNameTemplate()->render([ - 'property' => $property, - 'bigquery_link' => $bigqueryLink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * calculated_metric resource. - * - * @param string $property - * @param string $calculatedMetric - * - * @return string The formatted calculated_metric resource. - * - * @experimental - */ - public static function calculatedMetricName($property, $calculatedMetric) - { - return self::getCalculatedMetricNameTemplate()->render([ - 'property' => $property, - 'calculated_metric' => $calculatedMetric, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * channel_group resource. - * - * @param string $property - * @param string $channelGroup - * - * @return string The formatted channel_group resource. - * - * @experimental - */ - public static function channelGroupName($property, $channelGroup) - { - return self::getChannelGroupNameTemplate()->render([ - 'property' => $property, - 'channel_group' => $channelGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * conversion_event resource. - * - * @param string $property - * @param string $conversionEvent - * - * @return string The formatted conversion_event resource. - * - * @experimental - */ - public static function conversionEventName($property, $conversionEvent) - { - return self::getConversionEventNameTemplate()->render([ - 'property' => $property, - 'conversion_event' => $conversionEvent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * custom_dimension resource. - * - * @param string $property - * @param string $customDimension - * - * @return string The formatted custom_dimension resource. - * - * @experimental - */ - public static function customDimensionName($property, $customDimension) - { - return self::getCustomDimensionNameTemplate()->render([ - 'property' => $property, - 'custom_dimension' => $customDimension, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * custom_metric resource. - * - * @param string $property - * @param string $customMetric - * - * @return string The formatted custom_metric resource. - * - * @experimental - */ - public static function customMetricName($property, $customMetric) - { - return self::getCustomMetricNameTemplate()->render([ - 'property' => $property, - 'custom_metric' => $customMetric, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_redaction_settings resource. - * - * @param string $property - * @param string $dataStream - * - * @return string The formatted data_redaction_settings resource. - * - * @experimental - */ - public static function dataRedactionSettingsName($property, $dataStream) - { - return self::getDataRedactionSettingsNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_retention_settings resource. - * - * @param string $property - * - * @return string The formatted data_retention_settings resource. - * - * @experimental - */ - public static function dataRetentionSettingsName($property) - { - return self::getDataRetentionSettingsNameTemplate()->render([ - 'property' => $property, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_sharing_settings resource. - * - * @param string $account - * - * @return string The formatted data_sharing_settings resource. - * - * @experimental - */ - public static function dataSharingSettingsName($account) - { - return self::getDataSharingSettingsNameTemplate()->render([ - 'account' => $account, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a data_stream - * resource. - * - * @param string $property - * @param string $dataStream - * - * @return string The formatted data_stream resource. - * - * @experimental - */ - public static function dataStreamName($property, $dataStream) - { - return self::getDataStreamNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * display_video360_advertiser_link resource. - * - * @param string $property - * @param string $displayVideo360AdvertiserLink - * - * @return string The formatted display_video360_advertiser_link resource. - * - * @experimental - */ - public static function displayVideo360AdvertiserLinkName($property, $displayVideo360AdvertiserLink) - { - return self::getDisplayVideo360AdvertiserLinkNameTemplate()->render([ - 'property' => $property, - 'display_video_360_advertiser_link' => $displayVideo360AdvertiserLink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * display_video360_advertiser_link_proposal resource. - * - * @param string $property - * @param string $displayVideo360AdvertiserLinkProposal - * - * @return string The formatted display_video360_advertiser_link_proposal resource. - * - * @experimental - */ - public static function displayVideo360AdvertiserLinkProposalName($property, $displayVideo360AdvertiserLinkProposal) - { - return self::getDisplayVideo360AdvertiserLinkProposalNameTemplate()->render([ - 'property' => $property, - 'display_video_360_advertiser_link_proposal' => $displayVideo360AdvertiserLinkProposal, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * enhanced_measurement_settings resource. - * - * @param string $property - * @param string $dataStream - * - * @return string The formatted enhanced_measurement_settings resource. - * - * @experimental - */ - public static function enhancedMeasurementSettingsName($property, $dataStream) - { - return self::getEnhancedMeasurementSettingsNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * event_create_rule resource. - * - * @param string $property - * @param string $dataStream - * @param string $eventCreateRule - * - * @return string The formatted event_create_rule resource. - * - * @experimental - */ - public static function eventCreateRuleName($property, $dataStream, $eventCreateRule) - { - return self::getEventCreateRuleNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - 'event_create_rule' => $eventCreateRule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * event_edit_rule resource. - * - * @param string $property - * @param string $dataStream - * @param string $eventEditRule - * - * @return string The formatted event_edit_rule resource. - * - * @experimental - */ - public static function eventEditRuleName($property, $dataStream, $eventEditRule) - { - return self::getEventEditRuleNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - 'event_edit_rule' => $eventEditRule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * expanded_data_set resource. - * - * @param string $property - * @param string $expandedDataSet - * - * @return string The formatted expanded_data_set resource. - * - * @experimental - */ - public static function expandedDataSetName($property, $expandedDataSet) - { - return self::getExpandedDataSetNameTemplate()->render([ - 'property' => $property, - 'expanded_data_set' => $expandedDataSet, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * firebase_link resource. - * - * @param string $property - * @param string $firebaseLink - * - * @return string The formatted firebase_link resource. - * - * @experimental - */ - public static function firebaseLinkName($property, $firebaseLink) - { - return self::getFirebaseLinkNameTemplate()->render([ - 'property' => $property, - 'firebase_link' => $firebaseLink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * global_site_tag resource. - * - * @param string $property - * @param string $dataStream - * - * @return string The formatted global_site_tag resource. - * - * @experimental - */ - public static function globalSiteTagName($property, $dataStream) - { - return self::getGlobalSiteTagNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * google_ads_link resource. - * - * @param string $property - * @param string $googleAdsLink - * - * @return string The formatted google_ads_link resource. - * - * @experimental - */ - public static function googleAdsLinkName($property, $googleAdsLink) - { - return self::getGoogleAdsLinkNameTemplate()->render([ - 'property' => $property, - 'google_ads_link' => $googleAdsLink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * google_signals_settings resource. - * - * @param string $property - * - * @return string The formatted google_signals_settings resource. - * - * @experimental - */ - public static function googleSignalsSettingsName($property) - { - return self::getGoogleSignalsSettingsNameTemplate()->render([ - 'property' => $property, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a key_event - * resource. - * - * @param string $property - * @param string $keyEvent - * - * @return string The formatted key_event resource. - * - * @experimental - */ - public static function keyEventName($property, $keyEvent) - { - return self::getKeyEventNameTemplate()->render([ - 'property' => $property, - 'key_event' => $keyEvent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * measurement_protocol_secret resource. - * - * @param string $property - * @param string $dataStream - * @param string $measurementProtocolSecret - * - * @return string The formatted measurement_protocol_secret resource. - * - * @experimental - */ - public static function measurementProtocolSecretName($property, $dataStream, $measurementProtocolSecret) - { - return self::getMeasurementProtocolSecretNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - 'measurement_protocol_secret' => $measurementProtocolSecret, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - * - * @experimental - */ - public static function organizationName($organization) - { - return self::getOrganizationNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a property - * resource. - * - * @param string $property - * - * @return string The formatted property resource. - * - * @experimental - */ - public static function propertyName($property) - { - return self::getPropertyNameTemplate()->render([ - 'property' => $property, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * property_access_binding resource. - * - * @param string $property - * @param string $accessBinding - * - * @return string The formatted property_access_binding resource. - * - * @experimental - */ - public static function propertyAccessBindingName($property, $accessBinding) - { - return self::getPropertyAccessBindingNameTemplate()->render([ - 'property' => $property, - 'access_binding' => $accessBinding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * rollup_property_source_link resource. - * - * @param string $property - * @param string $rollupPropertySourceLink - * - * @return string The formatted rollup_property_source_link resource. - * - * @experimental - */ - public static function rollupPropertySourceLinkName($property, $rollupPropertySourceLink) - { - return self::getRollupPropertySourceLinkNameTemplate()->render([ - 'property' => $property, - 'rollup_property_source_link' => $rollupPropertySourceLink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * sk_ad_network_conversion_value_schema resource. - * - * @param string $property - * @param string $dataStream - * @param string $skadnetworkConversionValueSchema - * - * @return string The formatted sk_ad_network_conversion_value_schema resource. - * - * @experimental - */ - public static function sKAdNetworkConversionValueSchemaName($property, $dataStream, $skadnetworkConversionValueSchema) - { - return self::getSKAdNetworkConversionValueSchemaNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - 'skadnetwork_conversion_value_schema' => $skadnetworkConversionValueSchema, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * search_ads360_link resource. - * - * @param string $property - * @param string $searchAds360Link - * - * @return string The formatted search_ads360_link resource. - * - * @experimental - */ - public static function searchAds360LinkName($property, $searchAds360Link) - { - return self::getSearchAds360LinkNameTemplate()->render([ - 'property' => $property, - 'search_ads_360_link' => $searchAds360Link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * subproperty_event_filter resource. - * - * @param string $property - * @param string $subPropertyEventFilter - * - * @return string The formatted subproperty_event_filter resource. - * - * @experimental - */ - public static function subpropertyEventFilterName($property, $subPropertyEventFilter) - { - return self::getSubpropertyEventFilterNameTemplate()->render([ - 'property' => $property, - 'sub_property_event_filter' => $subPropertyEventFilter, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - accessBinding: accounts/{account}/accessBindings/{access_binding} - * - account: accounts/{account} - * - accountAccessBinding: accounts/{account}/accessBindings/{access_binding} - * - adSenseLink: properties/{property}/adSenseLinks/{adsense_link} - * - attributionSettings: properties/{property}/attributionSettings - * - audience: properties/{property}/audiences/{audience} - * - bigQueryLink: properties/{property}/bigQueryLinks/{bigquery_link} - * - calculatedMetric: properties/{property}/calculatedMetrics/{calculated_metric} - * - channelGroup: properties/{property}/channelGroups/{channel_group} - * - conversionEvent: properties/{property}/conversionEvents/{conversion_event} - * - customDimension: properties/{property}/customDimensions/{custom_dimension} - * - customMetric: properties/{property}/customMetrics/{custom_metric} - * - dataRedactionSettings: properties/{property}/dataStreams/{data_stream}/dataRedactionSettings - * - dataRetentionSettings: properties/{property}/dataRetentionSettings - * - dataSharingSettings: accounts/{account}/dataSharingSettings - * - dataStream: properties/{property}/dataStreams/{data_stream} - * - displayVideo360AdvertiserLink: properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link} - * - displayVideo360AdvertiserLinkProposal: properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal} - * - enhancedMeasurementSettings: properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings - * - eventCreateRule: properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule} - * - eventEditRule: properties/{property}/dataStreams/{data_stream}/eventEditRules/{event_edit_rule} - * - expandedDataSet: properties/{property}/expandedDataSets/{expanded_data_set} - * - firebaseLink: properties/{property}/firebaseLinks/{firebase_link} - * - globalSiteTag: properties/{property}/dataStreams/{data_stream}/globalSiteTag - * - googleAdsLink: properties/{property}/googleAdsLinks/{google_ads_link} - * - googleSignalsSettings: properties/{property}/googleSignalsSettings - * - keyEvent: properties/{property}/keyEvents/{key_event} - * - measurementProtocolSecret: properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret} - * - organization: organizations/{organization} - * - property: properties/{property} - * - propertyAccessBinding: properties/{property}/accessBindings/{access_binding} - * - rollupPropertySourceLink: properties/{property}/rollupPropertySourceLinks/{rollup_property_source_link} - * - sKAdNetworkConversionValueSchema: properties/{property}/dataStreams/{data_stream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} - * - searchAds360Link: properties/{property}/searchAds360Links/{search_ads_360_link} - * - subpropertyEventFilter: properties/{property}/subpropertyEventFilters/{sub_property_event_filter} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'analyticsadmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Acknowledges the terms of user data collection for the specified property. - * - * This acknowledgement must be completed (either in the Google Analytics UI - * or through this API) before MeasurementProtocolSecret resources may be - * created. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedProperty = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $acknowledgement = 'acknowledgement'; - * $response = $analyticsAdminServiceClient->acknowledgeUserDataCollection($formattedProperty, $acknowledgement); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $property Required. The property for which to acknowledge user data collection. - * @param string $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." - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\AcknowledgeUserDataCollectionResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function acknowledgeUserDataCollection($property, $acknowledgement, array $optionalArgs = []) - { - $request = new AcknowledgeUserDataCollectionRequest(); - $requestParamHeaders = []; - $request->setProperty($property); - $request->setAcknowledgement($acknowledgement); - $requestParamHeaders['property'] = $property; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AcknowledgeUserDataCollection', AcknowledgeUserDataCollectionResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Approves a DisplayVideo360AdvertiserLinkProposal. - * The DisplayVideo360AdvertiserLinkProposal will be deleted and a new - * DisplayVideo360AdvertiserLink will be created. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - * $response = $analyticsAdminServiceClient->approveDisplayVideo360AdvertiserLinkProposal($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DisplayVideo360AdvertiserLinkProposal to approve. - * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ApproveDisplayVideo360AdvertiserLinkProposalResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function approveDisplayVideo360AdvertiserLinkProposal($name, array $optionalArgs = []) - { - $request = new ApproveDisplayVideo360AdvertiserLinkProposalRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ApproveDisplayVideo360AdvertiserLinkProposal', ApproveDisplayVideo360AdvertiserLinkProposalResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Archives an Audience on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $analyticsAdminServiceClient->archiveAudience($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Example format: properties/1234/audiences/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function archiveAudience($name, array $optionalArgs = []) - { - $request = new ArchiveAudienceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ArchiveAudience', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Archives a CustomDimension on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - * $analyticsAdminServiceClient->archiveCustomDimension($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CustomDimension to archive. - * Example format: properties/1234/customDimensions/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function archiveCustomDimension($name, array $optionalArgs = []) - { - $request = new ArchiveCustomDimensionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ArchiveCustomDimension', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Archives a CustomMetric on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - * $analyticsAdminServiceClient->archiveCustomMetric($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CustomMetric to archive. - * Example format: properties/1234/customMetrics/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function archiveCustomMetric($name, array $optionalArgs = []) - { - $request = new ArchiveCustomMetricRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ArchiveCustomMetric', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates information about multiple access bindings to an account or - * property. - * - * This method is transactional. If any AccessBinding cannot be created, none - * of the AccessBindings will be created. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * $requests = []; - * $response = $analyticsAdminServiceClient->batchCreateAccessBindings($formattedParent, $requests); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The account or property that owns the access bindings. The parent - * field in the CreateAccessBindingRequest messages must either be empty or - * match this field. Formats: - * - accounts/{account} - * - properties/{property} - * @param CreateAccessBindingRequest[] $requests Required. The requests specifying the access bindings to create. - * A maximum of 1000 access bindings can be created in a batch. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\BatchCreateAccessBindingsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function batchCreateAccessBindings($parent, $requests, array $optionalArgs = []) - { - $request = new BatchCreateAccessBindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRequests($requests); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchCreateAccessBindings', BatchCreateAccessBindingsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes information about multiple users' links to an account or property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * $requests = []; - * $analyticsAdminServiceClient->batchDeleteAccessBindings($formattedParent, $requests); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The account or property that owns the access bindings. The parent - * of all provided values for the 'names' field in DeleteAccessBindingRequest - * messages must match this field. Formats: - * - accounts/{account} - * - properties/{property} - * @param DeleteAccessBindingRequest[] $requests Required. The requests specifying the access bindings to delete. - * A maximum of 1000 access bindings can be deleted in a batch. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function batchDeleteAccessBindings($parent, $requests, array $optionalArgs = []) - { - $request = new BatchDeleteAccessBindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRequests($requests); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchDeleteAccessBindings', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about multiple access bindings to an account or property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * $formattedNames = [ - * $analyticsAdminServiceClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'), - * ]; - * $response = $analyticsAdminServiceClient->batchGetAccessBindings($formattedParent, $formattedNames); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The account or property that owns the access bindings. The parent - * of all provided values for the 'names' field must match this field. - * Formats: - * - accounts/{account} - * - properties/{property} - * @param string[] $names Required. The names of the access bindings to retrieve. - * A maximum of 1000 access bindings can be retrieved in a batch. - * Formats: - * - accounts/{account}/accessBindings/{accessBinding} - * - properties/{property}/accessBindings/{accessBinding} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\BatchGetAccessBindingsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function batchGetAccessBindings($parent, $names, array $optionalArgs = []) - { - $request = new BatchGetAccessBindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setNames($names); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchGetAccessBindings', BatchGetAccessBindingsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates information about multiple access bindings to an account or - * property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * $requests = []; - * $response = $analyticsAdminServiceClient->batchUpdateAccessBindings($formattedParent, $requests); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The account or property that owns the access bindings. The parent - * of all provided AccessBinding in UpdateAccessBindingRequest messages must - * match this field. - * Formats: - * - accounts/{account} - * - properties/{property} - * @param UpdateAccessBindingRequest[] $requests Required. The requests specifying the access bindings to update. - * A maximum of 1000 access bindings can be updated in a batch. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\BatchUpdateAccessBindingsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function batchUpdateAccessBindings($parent, $requests, array $optionalArgs = []) - { - $request = new BatchUpdateAccessBindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRequests($requests); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchUpdateAccessBindings', BatchUpdateAccessBindingsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Cancels a DisplayVideo360AdvertiserLinkProposal. - * Cancelling can mean either: - * - Declining a proposal initiated from Display & Video 360 - * - Withdrawing a proposal initiated from Google Analytics - * After being cancelled, a proposal will eventually be deleted automatically. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - * $response = $analyticsAdminServiceClient->cancelDisplayVideo360AdvertiserLinkProposal($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DisplayVideo360AdvertiserLinkProposal to cancel. - * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLinkProposal - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function cancelDisplayVideo360AdvertiserLinkProposal($name, array $optionalArgs = []) - { - $request = new CancelDisplayVideo360AdvertiserLinkProposalRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CancelDisplayVideo360AdvertiserLinkProposal', DisplayVideo360AdvertiserLinkProposal::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an access binding on an account or property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * $accessBinding = new AccessBinding(); - * $response = $analyticsAdminServiceClient->createAccessBinding($formattedParent, $accessBinding); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Formats: - * - accounts/{account} - * - properties/{property} - * @param AccessBinding $accessBinding Required. The access binding to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\AccessBinding - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createAccessBinding($parent, $accessBinding, array $optionalArgs = []) - { - $request = new CreateAccessBindingRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAccessBinding($accessBinding); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateAccessBinding', AccessBinding::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an AdSenseLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $adsenseLink = new AdSenseLink(); - * $response = $analyticsAdminServiceClient->createAdSenseLink($formattedParent, $adsenseLink); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The property for which to create an AdSense Link. - * Format: properties/{propertyId} - * Example: properties/1234 - * @param AdSenseLink $adsenseLink Required. The AdSense Link to create - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\AdSenseLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createAdSenseLink($parent, $adsenseLink, array $optionalArgs = []) - { - $request = new CreateAdSenseLinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAdsenseLink($adsenseLink); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateAdSenseLink', AdSenseLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an Audience. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $audience = new Audience(); - * $response = $analyticsAdminServiceClient->createAudience($formattedParent, $audience); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param Audience $audience Required. The audience to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\Audience - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createAudience($parent, $audience, array $optionalArgs = []) - { - $request = new CreateAudienceRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAudience($audience); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateAudience', Audience::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a BigQueryLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $bigqueryLink = new BigQueryLink(); - * $response = $analyticsAdminServiceClient->createBigQueryLink($formattedParent, $bigqueryLink); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param BigQueryLink $bigqueryLink Required. The BigQueryLink to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\BigQueryLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createBigQueryLink($parent, $bigqueryLink, array $optionalArgs = []) - { - $request = new CreateBigQueryLinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBigqueryLink($bigqueryLink); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateBigQueryLink', BigQueryLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a CalculatedMetric. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $calculatedMetricId = 'calculated_metric_id'; - * $calculatedMetric = new CalculatedMetric(); - * $response = $analyticsAdminServiceClient->createCalculatedMetric($formattedParent, $calculatedMetricId, $calculatedMetric); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Format: properties/{property_id} - * Example: properties/1234 - * @param string $calculatedMetricId Required. The ID to use for the calculated metric which will become the - * final component of the calculated metric's resource name. - * - * This value should be 1-80 characters and valid characters are - * /[a-zA-Z0-9_]/, no spaces allowed. calculated_metric_id must be unique - * between all calculated metrics under a property. The calculated_metric_id - * is used when referencing this calculated metric from external APIs, for - * example, "calcMetric:{calculated_metric_id}". - * @param CalculatedMetric $calculatedMetric Required. The CalculatedMetric to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CalculatedMetric - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createCalculatedMetric($parent, $calculatedMetricId, $calculatedMetric, array $optionalArgs = []) - { - $request = new CreateCalculatedMetricRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCalculatedMetricId($calculatedMetricId); - $request->setCalculatedMetric($calculatedMetric); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateCalculatedMetric', CalculatedMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a ChannelGroup. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $channelGroup = new ChannelGroup(); - * $response = $analyticsAdminServiceClient->createChannelGroup($formattedParent, $channelGroup); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The property for which to create a ChannelGroup. - * Example format: properties/1234 - * @param ChannelGroup $channelGroup Required. The ChannelGroup to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ChannelGroup - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createChannelGroup($parent, $channelGroup, array $optionalArgs = []) - { - $request = new CreateChannelGroupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setChannelGroup($channelGroup); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateChannelGroup', ChannelGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a connected site tag for a Universal Analytics property. You can - * create a maximum of 20 connected site tags per property. - * Note: This API cannot be used on GA4 properties. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $connectedSiteTag = new ConnectedSiteTag(); - * $response = $analyticsAdminServiceClient->createConnectedSiteTag($connectedSiteTag); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param ConnectedSiteTag $connectedSiteTag Required. The tag to add to the Universal Analytics property - * @param array $optionalArgs { - * Optional. - * - * @type string $property - * The Universal Analytics property to create connected site tags for. - * This API does not support GA4 properties. - * Format: properties/{universalAnalyticsPropertyId} - * Example: properties/1234 - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createConnectedSiteTag($connectedSiteTag, array $optionalArgs = []) - { - $request = new CreateConnectedSiteTagRequest(); - $request->setConnectedSiteTag($connectedSiteTag); - if (isset($optionalArgs['property'])) { - $request->setProperty($optionalArgs['property']); - } - - return $this->startCall('CreateConnectedSiteTag', CreateConnectedSiteTagResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Deprecated: Use `CreateKeyEvent` instead. - * Creates a conversion event with the specified attributes. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $conversionEvent = new ConversionEvent(); - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->createConversionEvent($conversionEvent, $formattedParent); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param ConversionEvent $conversionEvent Required. The conversion event to create. - * @param string $parent Required. The resource name of the parent property where this conversion - * event will be created. Format: properties/123 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ConversionEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function createConversionEvent($conversionEvent, $parent, array $optionalArgs = []) - { - $request = new CreateConversionEventRequest(); - $requestParamHeaders = []; - $request->setConversionEvent($conversionEvent); - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateConversionEvent', ConversionEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a CustomDimension. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $customDimension = new CustomDimension(); - * $response = $analyticsAdminServiceClient->createCustomDimension($formattedParent, $customDimension); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param CustomDimension $customDimension Required. The CustomDimension to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CustomDimension - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createCustomDimension($parent, $customDimension, array $optionalArgs = []) - { - $request = new CreateCustomDimensionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCustomDimension($customDimension); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateCustomDimension', CustomDimension::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a CustomMetric. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $customMetric = new CustomMetric(); - * $response = $analyticsAdminServiceClient->createCustomMetric($formattedParent, $customMetric); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param CustomMetric $customMetric Required. The CustomMetric to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CustomMetric - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createCustomMetric($parent, $customMetric, array $optionalArgs = []) - { - $request = new CreateCustomMetricRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCustomMetric($customMetric); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateCustomMetric', CustomMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a DataStream. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $dataStream = new DataStream(); - * $response = $analyticsAdminServiceClient->createDataStream($formattedParent, $dataStream); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param DataStream $dataStream Required. The DataStream to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DataStream - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createDataStream($parent, $dataStream, array $optionalArgs = []) - { - $request = new CreateDataStreamRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataStream($dataStream); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDataStream', DataStream::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a DisplayVideo360AdvertiserLink. - * This can only be utilized by users who have proper authorization both on - * the Google Analytics property and on the Display & Video 360 advertiser. - * Users who do not have access to the Display & Video 360 advertiser should - * instead seek to create a DisplayVideo360LinkProposal. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $displayVideo360AdvertiserLink = new DisplayVideo360AdvertiserLink(); - * $response = $analyticsAdminServiceClient->createDisplayVideo360AdvertiserLink($formattedParent, $displayVideo360AdvertiserLink); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param DisplayVideo360AdvertiserLink $displayVideo360AdvertiserLink Required. The DisplayVideo360AdvertiserLink to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createDisplayVideo360AdvertiserLink($parent, $displayVideo360AdvertiserLink, array $optionalArgs = []) - { - $request = new CreateDisplayVideo360AdvertiserLinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDisplayVideo360AdvertiserLink($displayVideo360AdvertiserLink); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDisplayVideo360AdvertiserLink', DisplayVideo360AdvertiserLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a DisplayVideo360AdvertiserLinkProposal. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $displayVideo360AdvertiserLinkProposal = new DisplayVideo360AdvertiserLinkProposal(); - * $response = $analyticsAdminServiceClient->createDisplayVideo360AdvertiserLinkProposal($formattedParent, $displayVideo360AdvertiserLinkProposal); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param DisplayVideo360AdvertiserLinkProposal $displayVideo360AdvertiserLinkProposal Required. The DisplayVideo360AdvertiserLinkProposal to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLinkProposal - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createDisplayVideo360AdvertiserLinkProposal($parent, $displayVideo360AdvertiserLinkProposal, array $optionalArgs = []) - { - $request = new CreateDisplayVideo360AdvertiserLinkProposalRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDisplayVideo360AdvertiserLinkProposal($displayVideo360AdvertiserLinkProposal); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDisplayVideo360AdvertiserLinkProposal', DisplayVideo360AdvertiserLinkProposal::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an EventCreateRule. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $eventCreateRule = new EventCreateRule(); - * $response = $analyticsAdminServiceClient->createEventCreateRule($formattedParent, $eventCreateRule); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/123/dataStreams/456 - * @param EventCreateRule $eventCreateRule Required. The EventCreateRule to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\EventCreateRule - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createEventCreateRule($parent, $eventCreateRule, array $optionalArgs = []) - { - $request = new CreateEventCreateRuleRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEventCreateRule($eventCreateRule); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEventCreateRule', EventCreateRule::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an EventEditRule. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $eventEditRule = new EventEditRule(); - * $response = $analyticsAdminServiceClient->createEventEditRule($formattedParent, $eventEditRule); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/123/dataStreams/456 - * @param EventEditRule $eventEditRule Required. The EventEditRule to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\EventEditRule - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createEventEditRule($parent, $eventEditRule, array $optionalArgs = []) - { - $request = new CreateEventEditRuleRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEventEditRule($eventEditRule); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEventEditRule', EventEditRule::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a ExpandedDataSet. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $expandedDataSet = new ExpandedDataSet(); - * $response = $analyticsAdminServiceClient->createExpandedDataSet($formattedParent, $expandedDataSet); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param ExpandedDataSet $expandedDataSet Required. The ExpandedDataSet to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ExpandedDataSet - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createExpandedDataSet($parent, $expandedDataSet, array $optionalArgs = []) - { - $request = new CreateExpandedDataSetRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setExpandedDataSet($expandedDataSet); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateExpandedDataSet', ExpandedDataSet::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a FirebaseLink. - * - * Properties can have at most one FirebaseLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $firebaseLink = new FirebaseLink(); - * $response = $analyticsAdminServiceClient->createFirebaseLink($formattedParent, $firebaseLink); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Format: properties/{property_id} - * - * Example: `properties/1234` - * @param FirebaseLink $firebaseLink Required. The Firebase link to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\FirebaseLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createFirebaseLink($parent, $firebaseLink, array $optionalArgs = []) - { - $request = new CreateFirebaseLinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setFirebaseLink($firebaseLink); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateFirebaseLink', FirebaseLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a GoogleAdsLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $googleAdsLink = new GoogleAdsLink(); - * $response = $analyticsAdminServiceClient->createGoogleAdsLink($formattedParent, $googleAdsLink); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param GoogleAdsLink $googleAdsLink Required. The GoogleAdsLink to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\GoogleAdsLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createGoogleAdsLink($parent, $googleAdsLink, array $optionalArgs = []) - { - $request = new CreateGoogleAdsLinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGoogleAdsLink($googleAdsLink); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateGoogleAdsLink', GoogleAdsLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a Key Event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $keyEvent = new KeyEvent(); - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->createKeyEvent($keyEvent, $formattedParent); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param KeyEvent $keyEvent Required. The Key Event to create. - * @param string $parent Required. The resource name of the parent property where this Key Event - * will be created. Format: properties/123 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\KeyEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createKeyEvent($keyEvent, $parent, array $optionalArgs = []) - { - $request = new CreateKeyEventRequest(); - $requestParamHeaders = []; - $request->setKeyEvent($keyEvent); - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateKeyEvent', KeyEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a measurement protocol secret. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $measurementProtocolSecret = new MeasurementProtocolSecret(); - * $response = $analyticsAdminServiceClient->createMeasurementProtocolSecret($formattedParent, $measurementProtocolSecret); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource where this secret will be created. - * Format: properties/{property}/dataStreams/{dataStream} - * @param MeasurementProtocolSecret $measurementProtocolSecret Required. The measurement protocol secret to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\MeasurementProtocolSecret - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createMeasurementProtocolSecret($parent, $measurementProtocolSecret, array $optionalArgs = []) - { - $request = new CreateMeasurementProtocolSecretRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setMeasurementProtocolSecret($measurementProtocolSecret); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateMeasurementProtocolSecret', MeasurementProtocolSecret::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an "GA4" property with the specified location and attributes. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $property = new Property(); - * $response = $analyticsAdminServiceClient->createProperty($property); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param Property $property Required. The property to create. - * Note: the supplied property must specify its parent. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\Property - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createProperty($property, array $optionalArgs = []) - { - $request = new CreatePropertyRequest(); - $request->setProperty($property); - return $this->startCall('CreateProperty', Property::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a roll-up property and all roll-up property source links. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $rollupProperty = new Property(); - * $response = $analyticsAdminServiceClient->createRollupProperty($rollupProperty); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param Property $rollupProperty Required. The roll-up property to create. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $sourceProperties - * Optional. The resource names of properties that will be sources to the - * created roll-up property. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CreateRollupPropertyResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createRollupProperty($rollupProperty, array $optionalArgs = []) - { - $request = new CreateRollupPropertyRequest(); - $request->setRollupProperty($rollupProperty); - if (isset($optionalArgs['sourceProperties'])) { - $request->setSourceProperties($optionalArgs['sourceProperties']); - } - - return $this->startCall('CreateRollupProperty', CreateRollupPropertyResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a roll-up property source link. - * Only roll-up properties can have source links, so this method will throw an - * error if used on other types of properties. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $rollupPropertySourceLink = new RollupPropertySourceLink(); - * $response = $analyticsAdminServiceClient->createRollupPropertySourceLink($formattedParent, $rollupPropertySourceLink); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Format: properties/{property_id} - * Example: properties/1234 - * @param RollupPropertySourceLink $rollupPropertySourceLink Required. The roll-up property source link to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\RollupPropertySourceLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createRollupPropertySourceLink($parent, $rollupPropertySourceLink, array $optionalArgs = []) - { - $request = new CreateRollupPropertySourceLinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRollupPropertySourceLink($rollupPropertySourceLink); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateRollupPropertySourceLink', RollupPropertySourceLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a SKAdNetworkConversionValueSchema. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $skadnetworkConversionValueSchema = new SKAdNetworkConversionValueSchema(); - * $response = $analyticsAdminServiceClient->createSKAdNetworkConversionValueSchema($formattedParent, $skadnetworkConversionValueSchema); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource where this schema will be created. - * Format: properties/{property}/dataStreams/{dataStream} - * @param SKAdNetworkConversionValueSchema $skadnetworkConversionValueSchema Required. SKAdNetwork conversion value schema to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SKAdNetworkConversionValueSchema - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createSKAdNetworkConversionValueSchema($parent, $skadnetworkConversionValueSchema, array $optionalArgs = []) - { - $request = new CreateSKAdNetworkConversionValueSchemaRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSkadnetworkConversionValueSchema($skadnetworkConversionValueSchema); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSKAdNetworkConversionValueSchema', SKAdNetworkConversionValueSchema::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a SearchAds360Link. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $searchAds360Link = new SearchAds360Link(); - * $response = $analyticsAdminServiceClient->createSearchAds360Link($formattedParent, $searchAds360Link); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param SearchAds360Link $searchAds360Link Required. The SearchAds360Link to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SearchAds360Link - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createSearchAds360Link($parent, $searchAds360Link, array $optionalArgs = []) - { - $request = new CreateSearchAds360LinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSearchAds360Link($searchAds360Link); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSearchAds360Link', SearchAds360Link::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a subproperty Event Filter. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $subpropertyEventFilter = new SubpropertyEventFilter(); - * $response = $analyticsAdminServiceClient->createSubpropertyEventFilter($formattedParent, $subpropertyEventFilter); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The ordinary property for which to create a subproperty event - * filter. Format: properties/property_id Example: properties/123 - * @param SubpropertyEventFilter $subpropertyEventFilter Required. The subproperty event filter to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createSubpropertyEventFilter($parent, $subpropertyEventFilter, array $optionalArgs = []) - { - $request = new CreateSubpropertyEventFilterRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSubpropertyEventFilter($subpropertyEventFilter); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSubpropertyEventFilter', SubpropertyEventFilter::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an access binding on an account or property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - * $analyticsAdminServiceClient->deleteAccessBinding($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Formats: - * - accounts/{account}/accessBindings/{accessBinding} - * - properties/{property}/accessBindings/{accessBinding} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteAccessBinding($name, array $optionalArgs = []) - { - $request = new DeleteAccessBindingRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAccessBinding', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * 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, - * AccessBindings) will be permanently purged. - * https://support.google.com/analytics/answer/6154772 - * - * Returns an error if the target is not found. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * $analyticsAdminServiceClient->deleteAccount($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the Account to soft-delete. - * Format: accounts/{account} - * Example: "accounts/100" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteAccount($name, array $optionalArgs = []) - { - $request = new DeleteAccountRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAccount', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an AdSenseLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - * $analyticsAdminServiceClient->deleteAdSenseLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Unique identifier for the AdSense Link to be deleted. - * Format: properties/{propertyId}/adSenseLinks/{linkId} - * Example: properties/1234/adSenseLinks/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteAdSenseLink($name, array $optionalArgs = []) - { - $request = new DeleteAdSenseLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAdSenseLink', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a BigQueryLink on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - * $analyticsAdminServiceClient->deleteBigQueryLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The BigQueryLink to delete. - * Example format: properties/1234/bigQueryLinks/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteBigQueryLink($name, array $optionalArgs = []) - { - $request = new DeleteBigQueryLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteBigQueryLink', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a CalculatedMetric on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - * $analyticsAdminServiceClient->deleteCalculatedMetric($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CalculatedMetric to delete. - * Format: properties/{property_id}/calculatedMetrics/{calculated_metric_id} - * Example: properties/1234/calculatedMetrics/Metric01 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteCalculatedMetric($name, array $optionalArgs = []) - { - $request = new DeleteCalculatedMetricRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteCalculatedMetric', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a ChannelGroup on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - * $analyticsAdminServiceClient->deleteChannelGroup($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The ChannelGroup to delete. - * Example format: properties/1234/channelGroups/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteChannelGroup($name, array $optionalArgs = []) - { - $request = new DeleteChannelGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteChannelGroup', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a connected site tag for a Universal Analytics property. - * Note: this has no effect on GA4 properties. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $analyticsAdminServiceClient->deleteConnectedSiteTag(); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $property - * The Universal Analytics property to delete connected site tags for. - * This API does not support GA4 properties. - * Format: properties/{universalAnalyticsPropertyId} - * Example: properties/1234 - * @type string $tagId - * Tag ID to forward events to. Also known as the Measurement ID, or the - * "G-ID" (For example: G-12345). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteConnectedSiteTag(array $optionalArgs = []) - { - $request = new DeleteConnectedSiteTagRequest(); - if (isset($optionalArgs['property'])) { - $request->setProperty($optionalArgs['property']); - } - - if (isset($optionalArgs['tagId'])) { - $request->setTagId($optionalArgs['tagId']); - } - - return $this->startCall('DeleteConnectedSiteTag', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deprecated: Use `DeleteKeyEvent` instead. - * Deletes a conversion event in a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - * $analyticsAdminServiceClient->deleteConversionEvent($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the conversion event to delete. - * Format: properties/{property}/conversionEvents/{conversion_event} - * Example: "properties/123/conversionEvents/456" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function deleteConversionEvent($name, array $optionalArgs = []) - { - $request = new DeleteConversionEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteConversionEvent', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a DataStream on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $analyticsAdminServiceClient->deleteDataStream($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DataStream to delete. - * Example format: properties/1234/dataStreams/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteDataStream($name, array $optionalArgs = []) - { - $request = new DeleteDataStreamRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteDataStream', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a DisplayVideo360AdvertiserLink on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - * $analyticsAdminServiceClient->deleteDisplayVideo360AdvertiserLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DisplayVideo360AdvertiserLink to delete. - * Example format: properties/1234/displayVideo360AdvertiserLinks/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteDisplayVideo360AdvertiserLink($name, array $optionalArgs = []) - { - $request = new DeleteDisplayVideo360AdvertiserLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteDisplayVideo360AdvertiserLink', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. - * This can only be used on cancelled proposals. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - * $analyticsAdminServiceClient->deleteDisplayVideo360AdvertiserLinkProposal($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. - * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteDisplayVideo360AdvertiserLinkProposal($name, array $optionalArgs = []) - { - $request = new DeleteDisplayVideo360AdvertiserLinkProposalRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteDisplayVideo360AdvertiserLinkProposal', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an EventCreateRule. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - * $analyticsAdminServiceClient->deleteEventCreateRule($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Example format: - * properties/123/dataStreams/456/eventCreateRules/789 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteEventCreateRule($name, array $optionalArgs = []) - { - $request = new DeleteEventCreateRuleRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEventCreateRule', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an EventEditRule. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - * $analyticsAdminServiceClient->deleteEventEditRule($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Example format: properties/123/dataStreams/456/eventEditRules/789 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteEventEditRule($name, array $optionalArgs = []) - { - $request = new DeleteEventEditRuleRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEventEditRule', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a ExpandedDataSet on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - * $analyticsAdminServiceClient->deleteExpandedDataSet($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Example format: properties/1234/expandedDataSets/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteExpandedDataSet($name, array $optionalArgs = []) - { - $request = new DeleteExpandedDataSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteExpandedDataSet', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a FirebaseLink on a property - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - * $analyticsAdminServiceClient->deleteFirebaseLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} - * - * Example: `properties/1234/firebaseLinks/5678` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteFirebaseLink($name, array $optionalArgs = []) - { - $request = new DeleteFirebaseLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteFirebaseLink', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a GoogleAdsLink on a property - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - * $analyticsAdminServiceClient->deleteGoogleAdsLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Example format: properties/1234/googleAdsLinks/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteGoogleAdsLink($name, array $optionalArgs = []) - { - $request = new DeleteGoogleAdsLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteGoogleAdsLink', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a Key Event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - * $analyticsAdminServiceClient->deleteKeyEvent($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Key Event to delete. - * Format: properties/{property}/keyEvents/{key_event} - * Example: "properties/123/keyEvents/456" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteKeyEvent($name, array $optionalArgs = []) - { - $request = new DeleteKeyEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteKeyEvent', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes target MeasurementProtocolSecret. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - * $analyticsAdminServiceClient->deleteMeasurementProtocolSecret($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the MeasurementProtocolSecret to delete. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteMeasurementProtocolSecret($name, array $optionalArgs = []) - { - $request = new DeleteMeasurementProtocolSecretRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteMeasurementProtocolSecret', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * 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, AccessBindings) - * will be permanently purged. - * https://support.google.com/analytics/answer/6154772 - * - * Returns an error if the target is not found, or is not a GA4 Property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->deleteProperty($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the Property to soft-delete. - * Format: properties/{property_id} - * Example: "properties/1000" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\Property - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteProperty($name, array $optionalArgs = []) - { - $request = new DeletePropertyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteProperty', Property::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a roll-up property source link. - * Only roll-up properties can have source links, so this method will throw an - * error if used on other types of properties. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - * $analyticsAdminServiceClient->deleteRollupPropertySourceLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Format: - * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} - * Example: properties/1234/rollupPropertySourceLinks/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteRollupPropertySourceLink($name, array $optionalArgs = []) - { - $request = new DeleteRollupPropertySourceLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteRollupPropertySourceLink', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes target SKAdNetworkConversionValueSchema. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - * $analyticsAdminServiceClient->deleteSKAdNetworkConversionValueSchema($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the SKAdNetworkConversionValueSchema to delete. - * Format: - * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteSKAdNetworkConversionValueSchema($name, array $optionalArgs = []) - { - $request = new DeleteSKAdNetworkConversionValueSchemaRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteSKAdNetworkConversionValueSchema', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a SearchAds360Link on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - * $analyticsAdminServiceClient->deleteSearchAds360Link($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the SearchAds360Link to delete. - * Example format: properties/1234/SearchAds360Links/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteSearchAds360Link($name, array $optionalArgs = []) - { - $request = new DeleteSearchAds360LinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteSearchAds360Link', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a subproperty event filter. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - * $analyticsAdminServiceClient->deleteSubpropertyEventFilter($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the subproperty event filter to delete. - * Format: - * properties/property_id/subpropertyEventFilters/subproperty_event_filter - * Example: properties/123/subpropertyEventFilters/456 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteSubpropertyEventFilter($name, array $optionalArgs = []) - { - $request = new DeleteSubpropertyEventFilterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteSubpropertyEventFilter', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Fetches the opt out status for the automated GA4 setup process for a UA - * property. - * Note: this has no effect on GA4 property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $property = 'property'; - * $response = $analyticsAdminServiceClient->fetchAutomatedGa4ConfigurationOptOut($property); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $property Required. The UA property to get the opt out status. Note this request uses - * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. - * Format: properties/{internalWebPropertyId} - * Example: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\FetchAutomatedGa4ConfigurationOptOutResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function fetchAutomatedGa4ConfigurationOptOut($property, array $optionalArgs = []) - { - $request = new FetchAutomatedGa4ConfigurationOptOutRequest(); - $request->setProperty($property); - return $this->startCall('FetchAutomatedGa4ConfigurationOptOut', FetchAutomatedGa4ConfigurationOptOutResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Given a specified UA property, looks up the GA4 property connected to it. - * Note: this cannot be used with GA4 properties. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedProperty = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->fetchConnectedGa4Property($formattedProperty); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $property Required. The UA property for which to look up the connected GA4 property. - * Note this request uses the - * internal property ID, not the tracking ID of the form UA-XXXXXX-YY. - * Format: properties/{internal_web_property_id} - * Example: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\FetchConnectedGa4PropertyResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function fetchConnectedGa4Property($property, array $optionalArgs = []) - { - $request = new FetchConnectedGa4PropertyRequest(); - $request->setProperty($property); - return $this->startCall('FetchConnectedGa4Property', FetchConnectedGa4PropertyResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about an access binding. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - * $response = $analyticsAdminServiceClient->getAccessBinding($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the access binding to retrieve. - * Formats: - * - accounts/{account}/accessBindings/{accessBinding} - * - properties/{property}/accessBindings/{accessBinding} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\AccessBinding - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getAccessBinding($name, array $optionalArgs = []) - { - $request = new GetAccessBindingRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAccessBinding', AccessBinding::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single Account. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * $response = $analyticsAdminServiceClient->getAccount($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the account to lookup. - * Format: accounts/{account} - * Example: "accounts/100" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\Account - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getAccount($name, array $optionalArgs = []) - { - $request = new GetAccountRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAccount', Account::class, $optionalArgs, $request)->wait(); - } - - /** - * Looks up a single AdSenseLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - * $response = $analyticsAdminServiceClient->getAdSenseLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Unique identifier for the AdSense Link requested. - * Format: properties/{propertyId}/adSenseLinks/{linkId} - * Example: properties/1234/adSenseLinks/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\AdSenseLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getAdSenseLink($name, array $optionalArgs = []) - { - $request = new GetAdSenseLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAdSenseLink', AdSenseLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a AttributionSettings singleton. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->attributionSettingsName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->getAttributionSettings($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the attribution settings to retrieve. - * Format: properties/{property}/attributionSettings - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\AttributionSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getAttributionSettings($name, array $optionalArgs = []) - { - $request = new GetAttributionSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAttributionSettings', AttributionSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single Audience. - * Audiences created before 2020 may not be supported. - * Default audiences will not show filter definitions. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->audienceName('[PROPERTY]', '[AUDIENCE]'); - * $response = $analyticsAdminServiceClient->getAudience($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the Audience to get. - * Example format: properties/1234/audiences/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\Audience - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getAudience($name, array $optionalArgs = []) - { - $request = new GetAudienceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAudience', Audience::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single BigQuery Link. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - * $response = $analyticsAdminServiceClient->getBigQueryLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the BigQuery link to lookup. - * Format: properties/{property_id}/bigQueryLinks/{bigquery_link_id} - * Example: properties/123/bigQueryLinks/456 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\BigQueryLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getBigQueryLink($name, array $optionalArgs = []) - { - $request = new GetBigQueryLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetBigQueryLink', BigQueryLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single CalculatedMetric. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - * $response = $analyticsAdminServiceClient->getCalculatedMetric($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CalculatedMetric to get. - * Format: properties/{property_id}/calculatedMetrics/{calculated_metric_id} - * Example: properties/1234/calculatedMetrics/Metric01 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CalculatedMetric - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getCalculatedMetric($name, array $optionalArgs = []) - { - $request = new GetCalculatedMetricRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCalculatedMetric', CalculatedMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single ChannelGroup. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - * $response = $analyticsAdminServiceClient->getChannelGroup($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The ChannelGroup to get. - * Example format: properties/1234/channelGroups/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ChannelGroup - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getChannelGroup($name, array $optionalArgs = []) - { - $request = new GetChannelGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetChannelGroup', ChannelGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Deprecated: Use `GetKeyEvent` instead. - * Retrieve a single conversion event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - * $response = $analyticsAdminServiceClient->getConversionEvent($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the conversion event to retrieve. - * Format: properties/{property}/conversionEvents/{conversion_event} - * Example: "properties/123/conversionEvents/456" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ConversionEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function getConversionEvent($name, array $optionalArgs = []) - { - $request = new GetConversionEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetConversionEvent', ConversionEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single CustomDimension. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - * $response = $analyticsAdminServiceClient->getCustomDimension($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CustomDimension to get. - * Example format: properties/1234/customDimensions/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CustomDimension - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getCustomDimension($name, array $optionalArgs = []) - { - $request = new GetCustomDimensionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCustomDimension', CustomDimension::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single CustomMetric. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - * $response = $analyticsAdminServiceClient->getCustomMetric($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CustomMetric to get. - * Example format: properties/1234/customMetrics/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CustomMetric - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getCustomMetric($name, array $optionalArgs = []) - { - $request = new GetCustomMetricRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCustomMetric', CustomMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single DataRedactionSettings. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->dataRedactionSettingsName('[PROPERTY]', '[DATA_STREAM]'); - * $response = $analyticsAdminServiceClient->getDataRedactionSettings($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the settings to lookup. - * Format: - * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings - * Example: "properties/1000/dataStreams/2000/dataRedactionSettings" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DataRedactionSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDataRedactionSettings($name, array $optionalArgs = []) - { - $request = new GetDataRedactionSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataRedactionSettings', DataRedactionSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the singleton data retention settings for this property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->dataRetentionSettingsName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->getDataRetentionSettings($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the settings to lookup. - * Format: - * properties/{property}/dataRetentionSettings - * Example: "properties/1000/dataRetentionSettings" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DataRetentionSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDataRetentionSettings($name, array $optionalArgs = []) - { - $request = new GetDataRetentionSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataRetentionSettings', DataRetentionSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Get data sharing settings on an account. - * Data sharing settings are singletons. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->dataSharingSettingsName('[ACCOUNT]'); - * $response = $analyticsAdminServiceClient->getDataSharingSettings($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the settings to lookup. - * Format: accounts/{account}/dataSharingSettings - * - * Example: `accounts/1000/dataSharingSettings` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DataSharingSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDataSharingSettings($name, array $optionalArgs = []) - { - $request = new GetDataSharingSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataSharingSettings', DataSharingSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single DataStream. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $response = $analyticsAdminServiceClient->getDataStream($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DataStream to get. - * Example format: properties/1234/dataStreams/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DataStream - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDataStream($name, array $optionalArgs = []) - { - $request = new GetDataStreamRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataStream', DataStream::class, $optionalArgs, $request)->wait(); - } - - /** - * Look up a single DisplayVideo360AdvertiserLink - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - * $response = $analyticsAdminServiceClient->getDisplayVideo360AdvertiserLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DisplayVideo360AdvertiserLink to get. - * Example format: properties/1234/displayVideo360AdvertiserLink/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDisplayVideo360AdvertiserLink($name, array $optionalArgs = []) - { - $request = new GetDisplayVideo360AdvertiserLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDisplayVideo360AdvertiserLink', DisplayVideo360AdvertiserLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single DisplayVideo360AdvertiserLinkProposal. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - * $response = $analyticsAdminServiceClient->getDisplayVideo360AdvertiserLinkProposal($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. - * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLinkProposal - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDisplayVideo360AdvertiserLinkProposal($name, array $optionalArgs = []) - { - $request = new GetDisplayVideo360AdvertiserLinkProposalRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDisplayVideo360AdvertiserLinkProposal', DisplayVideo360AdvertiserLinkProposal::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the enhanced measurement settings for this data stream. - * Note that the stream must enable enhanced measurement for these settings to - * take effect. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->enhancedMeasurementSettingsName('[PROPERTY]', '[DATA_STREAM]'); - * $response = $analyticsAdminServiceClient->getEnhancedMeasurementSettings($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the settings to lookup. - * Format: - * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings - * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getEnhancedMeasurementSettings($name, array $optionalArgs = []) - { - $request = new GetEnhancedMeasurementSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEnhancedMeasurementSettings', EnhancedMeasurementSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single EventCreateRule. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - * $response = $analyticsAdminServiceClient->getEventCreateRule($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the EventCreateRule to get. - * Example format: properties/123/dataStreams/456/eventCreateRules/789 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\EventCreateRule - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getEventCreateRule($name, array $optionalArgs = []) - { - $request = new GetEventCreateRuleRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEventCreateRule', EventCreateRule::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single EventEditRule. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - * $response = $analyticsAdminServiceClient->getEventEditRule($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the EventEditRule to get. - * Example format: properties/123/dataStreams/456/eventEditRules/789 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\EventEditRule - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getEventEditRule($name, array $optionalArgs = []) - { - $request = new GetEventEditRuleRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEventEditRule', EventEditRule::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single ExpandedDataSet. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - * $response = $analyticsAdminServiceClient->getExpandedDataSet($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the ExpandedDataSet to get. - * Example format: properties/1234/expandedDataSets/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ExpandedDataSet - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getExpandedDataSet($name, array $optionalArgs = []) - { - $request = new GetExpandedDataSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetExpandedDataSet', ExpandedDataSet::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the Site Tag for the specified web stream. - * Site Tags are immutable singletons. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->globalSiteTagName('[PROPERTY]', '[DATA_STREAM]'); - * $response = $analyticsAdminServiceClient->getGlobalSiteTag($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the site tag to lookup. - * Note that site tags are singletons and do not have unique IDs. - * Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag - * - * Example: `properties/123/dataStreams/456/globalSiteTag` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\GlobalSiteTag - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getGlobalSiteTag($name, array $optionalArgs = []) - { - $request = new GetGlobalSiteTagRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetGlobalSiteTag', GlobalSiteTag::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for Google Signals settings for a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->googleSignalsSettingsName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->getGoogleSignalsSettings($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the google signals settings to retrieve. - * Format: properties/{property}/googleSignalsSettings - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\GoogleSignalsSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getGoogleSignalsSettings($name, array $optionalArgs = []) - { - $request = new GetGoogleSignalsSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetGoogleSignalsSettings', GoogleSignalsSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieve a single Key Event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - * $response = $analyticsAdminServiceClient->getKeyEvent($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Key Event to retrieve. - * Format: properties/{property}/keyEvents/{key_event} - * Example: "properties/123/keyEvents/456" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\KeyEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getKeyEvent($name, array $optionalArgs = []) - { - $request = new GetKeyEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetKeyEvent', KeyEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single "GA4" MeasurementProtocolSecret. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - * $response = $analyticsAdminServiceClient->getMeasurementProtocolSecret($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the measurement protocol secret to lookup. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\MeasurementProtocolSecret - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getMeasurementProtocolSecret($name, array $optionalArgs = []) - { - $request = new GetMeasurementProtocolSecretRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetMeasurementProtocolSecret', MeasurementProtocolSecret::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single "GA4" Property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->getProperty($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the property to lookup. - * Format: properties/{property_id} - * Example: "properties/1000" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\Property - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getProperty($name, array $optionalArgs = []) - { - $request = new GetPropertyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetProperty', Property::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single roll-up property source Link. - * Only roll-up properties can have source links, so this method will throw an - * error if used on other types of properties. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - * $response = $analyticsAdminServiceClient->getRollupPropertySourceLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the roll-up property source link to lookup. - * Format: - * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} - * Example: properties/123/rollupPropertySourceLinks/456 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\RollupPropertySourceLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getRollupPropertySourceLink($name, array $optionalArgs = []) - { - $request = new GetRollupPropertySourceLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetRollupPropertySourceLink', RollupPropertySourceLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Looks up a single SKAdNetworkConversionValueSchema. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - * $response = $analyticsAdminServiceClient->getSKAdNetworkConversionValueSchema($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of SKAdNetwork conversion value schema to look - * up. Format: - * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SKAdNetworkConversionValueSchema - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getSKAdNetworkConversionValueSchema($name, array $optionalArgs = []) - { - $request = new GetSKAdNetworkConversionValueSchemaRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSKAdNetworkConversionValueSchema', SKAdNetworkConversionValueSchema::class, $optionalArgs, $request)->wait(); - } - - /** - * Look up a single SearchAds360Link - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - * $response = $analyticsAdminServiceClient->getSearchAds360Link($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the SearchAds360Link to get. - * Example format: properties/1234/SearchAds360Link/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SearchAds360Link - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getSearchAds360Link($name, array $optionalArgs = []) - { - $request = new GetSearchAds360LinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSearchAds360Link', SearchAds360Link::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single subproperty Event Filter. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - * $response = $analyticsAdminServiceClient->getSubpropertyEventFilter($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the subproperty event filter to lookup. - * Format: - * properties/property_id/subpropertyEventFilters/subproperty_event_filter - * Example: properties/123/subpropertyEventFilters/456 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getSubpropertyEventFilter($name, array $optionalArgs = []) - { - $request = new GetSubpropertyEventFilterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSubpropertyEventFilter', SubpropertyEventFilter::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all access bindings on an account or property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listAccessBindings($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listAccessBindings($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Formats: - * - accounts/{account} - * - properties/{property} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listAccessBindings($parent, array $optionalArgs = []) - { - $request = new ListAccessBindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAccessBindings', $optionalArgs, ListAccessBindingsResponse::class, $request); - } - - /** - * Returns summaries of all accounts accessible by the caller. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listAccountSummaries(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listAccountSummaries(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listAccountSummaries(array $optionalArgs = []) - { - $request = new ListAccountSummariesRequest(); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - return $this->getPagedListResponse('ListAccountSummaries', $optionalArgs, ListAccountSummariesResponse::class, $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. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listAccounts(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listAccounts(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type bool $showDeleted - * Whether to include soft-deleted (ie: "trashed") Accounts in the - * results. Accounts can be inspected to determine whether they are deleted or - * not. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listAccounts(array $optionalArgs = []) - { - $request = new ListAccountsRequest(); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['showDeleted'])) { - $request->setShowDeleted($optionalArgs['showDeleted']); - } - - return $this->getPagedListResponse('ListAccounts', $optionalArgs, ListAccountsResponse::class, $request); - } - - /** - * Lists AdSenseLinks on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listAdSenseLinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listAdSenseLinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the parent property. - * Format: properties/{propertyId} - * Example: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listAdSenseLinks($parent, array $optionalArgs = []) - { - $request = new ListAdSenseLinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAdSenseLinks', $optionalArgs, ListAdSenseLinksResponse::class, $request); - } - - /** - * Lists Audiences on a property. - * Audiences created before 2020 may not be supported. - * Default audiences will not show filter definitions. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listAudiences($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listAudiences($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listAudiences($parent, array $optionalArgs = []) - { - $request = new ListAudiencesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAudiences', $optionalArgs, ListAudiencesResponse::class, $request); - } - - /** - * Lists BigQuery Links on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listBigQueryLinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listBigQueryLinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the property to list BigQuery links under. - * Format: properties/{property_id} - * Example: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listBigQueryLinks($parent, array $optionalArgs = []) - { - $request = new ListBigQueryLinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListBigQueryLinks', $optionalArgs, ListBigQueryLinksResponse::class, $request); - } - - /** - * Lists CalculatedMetrics on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listCalculatedMetrics($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listCalculatedMetrics($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listCalculatedMetrics($parent, array $optionalArgs = []) - { - $request = new ListCalculatedMetricsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCalculatedMetrics', $optionalArgs, ListCalculatedMetricsResponse::class, $request); - } - - /** - * Lists ChannelGroups on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listChannelGroups($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listChannelGroups($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The property for which to list ChannelGroups. - * Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listChannelGroups($parent, array $optionalArgs = []) - { - $request = new ListChannelGroupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListChannelGroups', $optionalArgs, ListChannelGroupsResponse::class, $request); - } - - /** - * Lists the connected site tags for a Universal Analytics property. A maximum - * of 20 connected site tags will be returned. Note: this has no effect on GA4 - * property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $response = $analyticsAdminServiceClient->listConnectedSiteTags(); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $property - * The Universal Analytics property to fetch connected site tags for. - * This does not work on GA4 properties. A maximum of 20 connected site tags - * will be returned. - * Example Format: `properties/1234` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listConnectedSiteTags(array $optionalArgs = []) - { - $request = new ListConnectedSiteTagsRequest(); - if (isset($optionalArgs['property'])) { - $request->setProperty($optionalArgs['property']); - } - - return $this->startCall('ListConnectedSiteTags', ListConnectedSiteTagsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Deprecated: Use `ListKeyEvents` instead. - * Returns a list of conversion events in the specified parent property. - * - * Returns an empty list if no conversion events are found. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listConversionEvents($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listConversionEvents($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent property. - * Example: 'properties/123' - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function listConversionEvents($parent, array $optionalArgs = []) - { - $request = new ListConversionEventsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListConversionEvents', $optionalArgs, ListConversionEventsResponse::class, $request); - } - - /** - * Lists CustomDimensions on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listCustomDimensions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listCustomDimensions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listCustomDimensions($parent, array $optionalArgs = []) - { - $request = new ListCustomDimensionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCustomDimensions', $optionalArgs, ListCustomDimensionsResponse::class, $request); - } - - /** - * Lists CustomMetrics on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listCustomMetrics($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listCustomMetrics($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listCustomMetrics($parent, array $optionalArgs = []) - { - $request = new ListCustomMetricsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCustomMetrics', $optionalArgs, ListCustomMetricsResponse::class, $request); - } - - /** - * Lists DataStreams on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listDataStreams($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listDataStreams($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listDataStreams($parent, array $optionalArgs = []) - { - $request = new ListDataStreamsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataStreams', $optionalArgs, ListDataStreamsResponse::class, $request); - } - - /** - * Lists DisplayVideo360AdvertiserLinkProposals on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listDisplayVideo360AdvertiserLinkProposals($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listDisplayVideo360AdvertiserLinkProposals($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listDisplayVideo360AdvertiserLinkProposals($parent, array $optionalArgs = []) - { - $request = new ListDisplayVideo360AdvertiserLinkProposalsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDisplayVideo360AdvertiserLinkProposals', $optionalArgs, ListDisplayVideo360AdvertiserLinkProposalsResponse::class, $request); - } - - /** - * Lists all DisplayVideo360AdvertiserLinks on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listDisplayVideo360AdvertiserLinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listDisplayVideo360AdvertiserLinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listDisplayVideo360AdvertiserLinks($parent, array $optionalArgs = []) - { - $request = new ListDisplayVideo360AdvertiserLinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDisplayVideo360AdvertiserLinks', $optionalArgs, ListDisplayVideo360AdvertiserLinksResponse::class, $request); - } - - /** - * Lists EventCreateRules on a web data stream. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listEventCreateRules($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listEventCreateRules($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/123/dataStreams/456 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listEventCreateRules($parent, array $optionalArgs = []) - { - $request = new ListEventCreateRulesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEventCreateRules', $optionalArgs, ListEventCreateRulesResponse::class, $request); - } - - /** - * Lists EventEditRules on a web data stream. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listEventEditRules($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listEventEditRules($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/123/dataStreams/456 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listEventEditRules($parent, array $optionalArgs = []) - { - $request = new ListEventEditRulesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEventEditRules', $optionalArgs, ListEventEditRulesResponse::class, $request); - } - - /** - * Lists ExpandedDataSets on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listExpandedDataSets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listExpandedDataSets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listExpandedDataSets($parent, array $optionalArgs = []) - { - $request = new ListExpandedDataSetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListExpandedDataSets', $optionalArgs, ListExpandedDataSetsResponse::class, $request); - } - - /** - * Lists FirebaseLinks on a property. - * Properties can have at most one FirebaseLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listFirebaseLinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listFirebaseLinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Format: properties/{property_id} - * - * Example: `properties/1234` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listFirebaseLinks($parent, array $optionalArgs = []) - { - $request = new ListFirebaseLinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListFirebaseLinks', $optionalArgs, ListFirebaseLinksResponse::class, $request); - } - - /** - * Lists GoogleAdsLinks on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listGoogleAdsLinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listGoogleAdsLinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listGoogleAdsLinks($parent, array $optionalArgs = []) - { - $request = new ListGoogleAdsLinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGoogleAdsLinks', $optionalArgs, ListGoogleAdsLinksResponse::class, $request); - } - - /** - * Returns a list of Key Events in the specified parent property. - * Returns an empty list if no Key Events are found. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listKeyEvents($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listKeyEvents($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent property. - * Example: 'properties/123' - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listKeyEvents($parent, array $optionalArgs = []) - { - $request = new ListKeyEventsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListKeyEvents', $optionalArgs, ListKeyEventsResponse::class, $request); - } - - /** - * Returns child MeasurementProtocolSecrets under the specified parent - * Property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listMeasurementProtocolSecrets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listMeasurementProtocolSecrets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent stream. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listMeasurementProtocolSecrets($parent, array $optionalArgs = []) - { - $request = new ListMeasurementProtocolSecretsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListMeasurementProtocolSecrets', $optionalArgs, ListMeasurementProtocolSecretsResponse::class, $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. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $filter = 'filter'; - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listProperties($filter); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listProperties($filter); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $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. | - * ``` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type bool $showDeleted - * Whether to include soft-deleted (ie: "trashed") Properties in the - * results. Properties can be inspected to determine whether they are deleted - * or not. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listProperties($filter, array $optionalArgs = []) - { - $request = new ListPropertiesRequest(); - $request->setFilter($filter); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['showDeleted'])) { - $request->setShowDeleted($optionalArgs['showDeleted']); - } - - return $this->getPagedListResponse('ListProperties', $optionalArgs, ListPropertiesResponse::class, $request); - } - - /** - * Lists roll-up property source Links on a property. - * Only roll-up properties can have source links, so this method will throw an - * error if used on other types of properties. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listRollupPropertySourceLinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listRollupPropertySourceLinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the roll-up property to list roll-up property source - * links under. Format: properties/{property_id} Example: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listRollupPropertySourceLinks($parent, array $optionalArgs = []) - { - $request = new ListRollupPropertySourceLinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListRollupPropertySourceLinks', $optionalArgs, ListRollupPropertySourceLinksResponse::class, $request); - } - - /** - * Lists SKAdNetworkConversionValueSchema on a stream. - * Properties can have at most one SKAdNetworkConversionValueSchema. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listSKAdNetworkConversionValueSchemas($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listSKAdNetworkConversionValueSchemas($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The DataStream resource to list schemas for. - * Format: - * properties/{property_id}/dataStreams/{dataStream} - * Example: properties/1234/dataStreams/5678 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listSKAdNetworkConversionValueSchemas($parent, array $optionalArgs = []) - { - $request = new ListSKAdNetworkConversionValueSchemasRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSKAdNetworkConversionValueSchemas', $optionalArgs, ListSKAdNetworkConversionValueSchemasResponse::class, $request); - } - - /** - * Lists all SearchAds360Links on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listSearchAds360Links($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listSearchAds360Links($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listSearchAds360Links($parent, array $optionalArgs = []) - { - $request = new ListSearchAds360LinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSearchAds360Links', $optionalArgs, ListSearchAds360LinksResponse::class, $request); - } - - /** - * List all subproperty Event Filters on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listSubpropertyEventFilters($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listSubpropertyEventFilters($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the ordinary property. - * Format: properties/property_id - * Example: properties/123 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listSubpropertyEventFilters($parent, array $optionalArgs = []) - { - $request = new ListSubpropertyEventFiltersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSubpropertyEventFilters', $optionalArgs, ListSubpropertyEventFiltersResponse::class, $request); - } - - /** - * Requests a ticket for creating an account. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $response = $analyticsAdminServiceClient->provisionAccountTicket(); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type Account $account - * The account to create. - * @type string $redirectUri - * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Cloud Console as a Redirect URI. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ProvisionAccountTicketResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function provisionAccountTicket(array $optionalArgs = []) - { - $request = new ProvisionAccountTicketRequest(); - if (isset($optionalArgs['account'])) { - $request->setAccount($optionalArgs['account']); - } - - if (isset($optionalArgs['redirectUri'])) { - $request->setRedirectUri($optionalArgs['redirectUri']); - } - - return $this->startCall('ProvisionAccountTicket', ProvisionAccountTicketResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a subproperty and a subproperty event filter that applies to the - * created subproperty. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $subproperty = new Property(); - * $response = $analyticsAdminServiceClient->provisionSubproperty($subproperty); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param Property $subproperty Required. The subproperty to create. - * @param array $optionalArgs { - * Optional. - * - * @type SubpropertyEventFilter $subpropertyEventFilter - * Optional. The subproperty event filter to create on an ordinary property. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ProvisionSubpropertyResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function provisionSubproperty($subproperty, array $optionalArgs = []) - { - $request = new ProvisionSubpropertyRequest(); - $request->setSubproperty($subproperty); - if (isset($optionalArgs['subpropertyEventFilter'])) { - $request->setSubpropertyEventFilter($optionalArgs['subpropertyEventFilter']); - } - - return $this->startCall('ProvisionSubproperty', ProvisionSubpropertyResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Changes the processing order of event edit rules on the specified stream. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $eventEditRules = []; - * $analyticsAdminServiceClient->reorderEventEditRules($formattedParent, $eventEditRules); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/123/dataStreams/456 - * @param string[] $eventEditRules Required. EventEditRule resource names for the specified data stream, in - * the needed processing order. All EventEditRules for the stream must be - * present in the list. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function reorderEventEditRules($parent, $eventEditRules, array $optionalArgs = []) - { - $request = new ReorderEventEditRulesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEventEditRules($eventEditRules); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ReorderEventEditRules', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a customized report of data access records. The report provides - * records of each time a user reads Google Analytics reporting data. Access - * records are retained for up to 2 years. - * - * Data Access Reports can be requested for a property. Reports may be - * requested for any property, but dimensions that aren't related to quota can - * only be requested on Google Analytics 360 properties. This method is only - * available to Administrators. - * - * These data access records include GA4 UI Reporting, GA4 UI Explorations, - * GA4 Data API, and other products like Firebase & Admob that can retrieve - * data from Google Analytics through a linkage. These records don't include - * property configuration changes like adding a stream or changing a - * property's time zone. For configuration change history, see - * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $response = $analyticsAdminServiceClient->runAccessReport(); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $entity - * The Data Access Report supports requesting at the property level or account - * level. If requested at the account level, Data Access Reports include all - * access for all properties under that account. - * - * To request at the property level, entity should be for example - * 'properties/123' if "123" is your GA4 property ID. To request at the - * account level, entity should be for example 'accounts/1234' if "1234" is - * your GA4 Account ID. - * @type AccessDimension[] $dimensions - * The dimensions requested and displayed in the response. Requests are - * allowed up to 9 dimensions. - * @type AccessMetric[] $metrics - * The metrics requested and displayed in the response. Requests are allowed - * up to 10 metrics. - * @type AccessDateRange[] $dateRanges - * Date ranges of access records to read. If multiple date ranges are - * requested, each response row will contain a zero based date range index. If - * two date ranges overlap, the access records for the overlapping days is - * included in the response rows for both date ranges. Requests are allowed up - * to 2 date ranges. - * @type AccessFilterExpression $dimensionFilter - * Dimension filters let you restrict report response to specific - * dimension values which match the filter. For example, filtering on access - * records of a single user. To learn more, see [Fundamentals of Dimension - * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - * for examples. Metrics cannot be used in this filter. - * @type AccessFilterExpression $metricFilter - * Metric filters allow you to restrict report response to specific metric - * values which match the filter. Metric filters are applied after aggregating - * the report's rows, similar to SQL having-clause. Dimensions cannot be used - * in this filter. - * @type int $offset - * The row count of the start row. The first row is counted as row 0. If - * offset is unspecified, it is treated as 0. If offset is zero, then this - * method will return the first page of results with `limit` entries. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @type int $limit - * The number of rows to return. If unspecified, 10,000 rows are returned. The - * API returns a maximum of 100,000 rows per request, no matter how many you - * ask for. `limit` must be positive. - * - * The API may return fewer rows than the requested `limit`, if there aren't - * as many remaining rows as the `limit`. For instance, there are fewer than - * 300 possible values for the dimension `country`, so when reporting on only - * `country`, you can't get more than 300 rows, even if you set `limit` to a - * higher value. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @type string $timeZone - * This request's time zone if specified. If unspecified, the property's time - * zone is used. The request's time zone is used to interpret the start & end - * dates of the report. - * - * Formatted as strings from the IANA Time Zone database - * (https://www.iana.org/time-zones); for example "America/New_York" or - * "Asia/Tokyo". - * @type AccessOrderBy[] $orderBys - * Specifies how rows are ordered in the response. - * @type bool $returnEntityQuota - * Toggles whether to return the current state of this Analytics Property's - * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level - * requests, this field must be false. - * @type bool $includeAllUsers - * Optional. Determines whether to include users who have never made an API - * call in the response. If true, all users with access to the specified - * property or account are included in the response, regardless of whether - * they have made an API call or not. If false, only the users who have made - * an API call will be included. - * @type bool $expandGroups - * Optional. Decides whether to return the users within user groups. This - * field works only when include_all_users is set to true. If true, it will - * return all users with access to the specified property or account. - * If false, only the users with direct access will be returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\RunAccessReportResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function runAccessReport(array $optionalArgs = []) - { - $request = new RunAccessReportRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['entity'])) { - $request->setEntity($optionalArgs['entity']); - $requestParamHeaders['entity'] = $optionalArgs['entity']; - } - - if (isset($optionalArgs['dimensions'])) { - $request->setDimensions($optionalArgs['dimensions']); - } - - if (isset($optionalArgs['metrics'])) { - $request->setMetrics($optionalArgs['metrics']); - } - - if (isset($optionalArgs['dateRanges'])) { - $request->setDateRanges($optionalArgs['dateRanges']); - } - - if (isset($optionalArgs['dimensionFilter'])) { - $request->setDimensionFilter($optionalArgs['dimensionFilter']); - } - - if (isset($optionalArgs['metricFilter'])) { - $request->setMetricFilter($optionalArgs['metricFilter']); - } - - if (isset($optionalArgs['offset'])) { - $request->setOffset($optionalArgs['offset']); - } - - if (isset($optionalArgs['limit'])) { - $request->setLimit($optionalArgs['limit']); - } - - if (isset($optionalArgs['timeZone'])) { - $request->setTimeZone($optionalArgs['timeZone']); - } - - if (isset($optionalArgs['orderBys'])) { - $request->setOrderBys($optionalArgs['orderBys']); - } - - if (isset($optionalArgs['returnEntityQuota'])) { - $request->setReturnEntityQuota($optionalArgs['returnEntityQuota']); - } - - if (isset($optionalArgs['includeAllUsers'])) { - $request->setIncludeAllUsers($optionalArgs['includeAllUsers']); - } - - if (isset($optionalArgs['expandGroups'])) { - $request->setExpandGroups($optionalArgs['expandGroups']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunAccessReport', RunAccessReportResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Searches through all changes to an account or its children given the - * specified set of filters. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedAccount = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->searchChangeHistoryEvents($formattedAccount); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->searchChangeHistoryEvents($formattedAccount); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $account Required. The account resource for which to return change history - * resources. Format: accounts/{account} - * - * Example: `accounts/100` - * @param array $optionalArgs { - * Optional. - * - * @type string $property - * Optional. Resource name for a child property. If set, only return changes - * made to this property or its child resources. - * Format: properties/{propertyId} - * - * Example: `properties/100` - * @type int[] $resourceType - * Optional. If set, only return changes if they are for a resource that - * matches at least one of these types. - * For allowed values, use constants defined on {@see \Google\Analytics\Admin\V1alpha\ChangeHistoryResourceType} - * @type int[] $action - * Optional. If set, only return changes that match one or more of these types - * of actions. - * For allowed values, use constants defined on {@see \Google\Analytics\Admin\V1alpha\ActionType} - * @type string[] $actorEmail - * Optional. If set, only return changes if they are made by a user in this - * list. - * @type Timestamp $earliestChangeTime - * Optional. If set, only return changes made after this time (inclusive). - * @type Timestamp $latestChangeTime - * Optional. If set, only return changes made before this time (inclusive). - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function searchChangeHistoryEvents($account, array $optionalArgs = []) - { - $request = new SearchChangeHistoryEventsRequest(); - $requestParamHeaders = []; - $request->setAccount($account); - $requestParamHeaders['account'] = $account; - if (isset($optionalArgs['property'])) { - $request->setProperty($optionalArgs['property']); - } - - if (isset($optionalArgs['resourceType'])) { - $request->setResourceType($optionalArgs['resourceType']); - } - - if (isset($optionalArgs['action'])) { - $request->setAction($optionalArgs['action']); - } - - if (isset($optionalArgs['actorEmail'])) { - $request->setActorEmail($optionalArgs['actorEmail']); - } - - if (isset($optionalArgs['earliestChangeTime'])) { - $request->setEarliestChangeTime($optionalArgs['earliestChangeTime']); - } - - if (isset($optionalArgs['latestChangeTime'])) { - $request->setLatestChangeTime($optionalArgs['latestChangeTime']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('SearchChangeHistoryEvents', $optionalArgs, SearchChangeHistoryEventsResponse::class, $request); - } - - /** - * Sets the opt out status for the automated GA4 setup process for a UA - * property. - * Note: this has no effect on GA4 property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $property = 'property'; - * $response = $analyticsAdminServiceClient->setAutomatedGa4ConfigurationOptOut($property); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $property Required. The UA property to set the opt out status. Note this request uses - * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. - * Format: properties/{internalWebPropertyId} - * Example: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type bool $optOut - * The status to set. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SetAutomatedGa4ConfigurationOptOutResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function setAutomatedGa4ConfigurationOptOut($property, array $optionalArgs = []) - { - $request = new SetAutomatedGa4ConfigurationOptOutRequest(); - $request->setProperty($property); - if (isset($optionalArgs['optOut'])) { - $request->setOptOut($optionalArgs['optOut']); - } - - return $this->startCall('SetAutomatedGa4ConfigurationOptOut', SetAutomatedGa4ConfigurationOptOutResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an access binding on an account or property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $accessBinding = new AccessBinding(); - * $response = $analyticsAdminServiceClient->updateAccessBinding($accessBinding); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param AccessBinding $accessBinding Required. The access binding to update. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\AccessBinding - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateAccessBinding($accessBinding, array $optionalArgs = []) - { - $request = new UpdateAccessBindingRequest(); - $requestParamHeaders = []; - $request->setAccessBinding($accessBinding); - $requestParamHeaders['access_binding.name'] = $accessBinding->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateAccessBinding', AccessBinding::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an account. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $account = new Account(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateAccount($account, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param Account $account Required. The account to update. - * The account's `name` field is used to identify the account. - * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake - * case (for example, "field_to_update"). Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match all - * fields. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\Account - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateAccount($account, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAccountRequest(); - $requestParamHeaders = []; - $request->setAccount($account); - $request->setUpdateMask($updateMask); - $requestParamHeaders['account.name'] = $account->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateAccount', Account::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates attribution settings on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $attributionSettings = new AttributionSettings(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateAttributionSettings($attributionSettings, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param AttributionSettings $attributionSettings Required. The attribution settings to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\AttributionSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateAttributionSettings($attributionSettings, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAttributionSettingsRequest(); - $requestParamHeaders = []; - $request->setAttributionSettings($attributionSettings); - $request->setUpdateMask($updateMask); - $requestParamHeaders['attribution_settings.name'] = $attributionSettings->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateAttributionSettings', AttributionSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an Audience on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $audience = new Audience(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateAudience($audience, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param Audience $audience Required. The audience to update. - * The audience's `name` field is used to identify the audience to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\Audience - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateAudience($audience, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAudienceRequest(); - $requestParamHeaders = []; - $request->setAudience($audience); - $request->setUpdateMask($updateMask); - $requestParamHeaders['audience.name'] = $audience->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateAudience', Audience::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a BigQueryLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $bigqueryLink = new BigQueryLink(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateBigQueryLink($bigqueryLink, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param BigQueryLink $bigqueryLink Required. The settings to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\BigQueryLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateBigQueryLink($bigqueryLink, $updateMask, array $optionalArgs = []) - { - $request = new UpdateBigQueryLinkRequest(); - $requestParamHeaders = []; - $request->setBigqueryLink($bigqueryLink); - $request->setUpdateMask($updateMask); - $requestParamHeaders['bigquery_link.name'] = $bigqueryLink->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateBigQueryLink', BigQueryLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a CalculatedMetric on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $calculatedMetric = new CalculatedMetric(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateCalculatedMetric($calculatedMetric, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param CalculatedMetric $calculatedMetric Required. The CalculatedMetric to update - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CalculatedMetric - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateCalculatedMetric($calculatedMetric, $updateMask, array $optionalArgs = []) - { - $request = new UpdateCalculatedMetricRequest(); - $requestParamHeaders = []; - $request->setCalculatedMetric($calculatedMetric); - $request->setUpdateMask($updateMask); - $requestParamHeaders['calculated_metric.name'] = $calculatedMetric->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateCalculatedMetric', CalculatedMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a ChannelGroup. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $channelGroup = new ChannelGroup(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateChannelGroup($channelGroup, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param ChannelGroup $channelGroup Required. The ChannelGroup to update. - * The resource's `name` field is used to identify the ChannelGroup to be - * updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ChannelGroup - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateChannelGroup($channelGroup, $updateMask, array $optionalArgs = []) - { - $request = new UpdateChannelGroupRequest(); - $requestParamHeaders = []; - $request->setChannelGroup($channelGroup); - $request->setUpdateMask($updateMask); - $requestParamHeaders['channel_group.name'] = $channelGroup->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateChannelGroup', ChannelGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Deprecated: Use `UpdateKeyEvent` instead. - * Updates a conversion event with the specified attributes. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $conversionEvent = new ConversionEvent(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateConversionEvent($conversionEvent, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param ConversionEvent $conversionEvent Required. The conversion event to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ConversionEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function updateConversionEvent($conversionEvent, $updateMask, array $optionalArgs = []) - { - $request = new UpdateConversionEventRequest(); - $requestParamHeaders = []; - $request->setConversionEvent($conversionEvent); - $request->setUpdateMask($updateMask); - $requestParamHeaders['conversion_event.name'] = $conversionEvent->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateConversionEvent', ConversionEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a CustomDimension on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateCustomDimension($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type CustomDimension $customDimension - * The CustomDimension to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CustomDimension - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateCustomDimension($updateMask, array $optionalArgs = []) - { - $request = new UpdateCustomDimensionRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['customDimension'])) { - $request->setCustomDimension($optionalArgs['customDimension']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateCustomDimension', CustomDimension::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a CustomMetric on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateCustomMetric($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type CustomMetric $customMetric - * The CustomMetric to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\CustomMetric - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateCustomMetric($updateMask, array $optionalArgs = []) - { - $request = new UpdateCustomMetricRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['customMetric'])) { - $request->setCustomMetric($optionalArgs['customMetric']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateCustomMetric', CustomMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a DataRedactionSettings on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $dataRedactionSettings = new DataRedactionSettings(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateDataRedactionSettings($dataRedactionSettings, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param DataRedactionSettings $dataRedactionSettings Required. The settings to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DataRedactionSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateDataRedactionSettings($dataRedactionSettings, $updateMask, array $optionalArgs = []) - { - $request = new UpdateDataRedactionSettingsRequest(); - $requestParamHeaders = []; - $request->setDataRedactionSettings($dataRedactionSettings); - $request->setUpdateMask($updateMask); - $requestParamHeaders['data_redaction_settings.name'] = $dataRedactionSettings->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDataRedactionSettings', DataRedactionSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the singleton data retention settings for this property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $dataRetentionSettings = new DataRetentionSettings(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateDataRetentionSettings($dataRetentionSettings, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param DataRetentionSettings $dataRetentionSettings Required. The settings to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DataRetentionSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateDataRetentionSettings($dataRetentionSettings, $updateMask, array $optionalArgs = []) - { - $request = new UpdateDataRetentionSettingsRequest(); - $requestParamHeaders = []; - $request->setDataRetentionSettings($dataRetentionSettings); - $request->setUpdateMask($updateMask); - $requestParamHeaders['data_retention_settings.name'] = $dataRetentionSettings->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDataRetentionSettings', DataRetentionSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a DataStream on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateDataStream($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type DataStream $dataStream - * The DataStream to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DataStream - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateDataStream($updateMask, array $optionalArgs = []) - { - $request = new UpdateDataStreamRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['dataStream'])) { - $request->setDataStream($optionalArgs['dataStream']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDataStream', DataStream::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a DisplayVideo360AdvertiserLink on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateDisplayVideo360AdvertiserLink($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type DisplayVideo360AdvertiserLink $displayVideo360AdvertiserLink - * The DisplayVideo360AdvertiserLink to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateDisplayVideo360AdvertiserLink($updateMask, array $optionalArgs = []) - { - $request = new UpdateDisplayVideo360AdvertiserLinkRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['displayVideo360AdvertiserLink'])) { - $request->setDisplayVideo360AdvertiserLink($optionalArgs['displayVideo360AdvertiserLink']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDisplayVideo360AdvertiserLink', DisplayVideo360AdvertiserLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the enhanced measurement settings for this data stream. - * Note that the stream must enable enhanced measurement for these settings to - * take effect. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $enhancedMeasurementSettings = new EnhancedMeasurementSettings(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateEnhancedMeasurementSettings($enhancedMeasurementSettings, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param EnhancedMeasurementSettings $enhancedMeasurementSettings Required. The settings to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateEnhancedMeasurementSettings($enhancedMeasurementSettings, $updateMask, array $optionalArgs = []) - { - $request = new UpdateEnhancedMeasurementSettingsRequest(); - $requestParamHeaders = []; - $request->setEnhancedMeasurementSettings($enhancedMeasurementSettings); - $request->setUpdateMask($updateMask); - $requestParamHeaders['enhanced_measurement_settings.name'] = $enhancedMeasurementSettings->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEnhancedMeasurementSettings', EnhancedMeasurementSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an EventCreateRule. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $eventCreateRule = new EventCreateRule(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateEventCreateRule($eventCreateRule, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param EventCreateRule $eventCreateRule Required. The EventCreateRule to update. - * The resource's `name` field is used to identify the EventCreateRule to be - * updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\EventCreateRule - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateEventCreateRule($eventCreateRule, $updateMask, array $optionalArgs = []) - { - $request = new UpdateEventCreateRuleRequest(); - $requestParamHeaders = []; - $request->setEventCreateRule($eventCreateRule); - $request->setUpdateMask($updateMask); - $requestParamHeaders['event_create_rule.name'] = $eventCreateRule->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEventCreateRule', EventCreateRule::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an EventEditRule. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $eventEditRule = new EventEditRule(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateEventEditRule($eventEditRule, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param EventEditRule $eventEditRule Required. The EventEditRule to update. - * The resource's `name` field is used to identify the EventEditRule to be - * updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\EventEditRule - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateEventEditRule($eventEditRule, $updateMask, array $optionalArgs = []) - { - $request = new UpdateEventEditRuleRequest(); - $requestParamHeaders = []; - $request->setEventEditRule($eventEditRule); - $request->setUpdateMask($updateMask); - $requestParamHeaders['event_edit_rule.name'] = $eventEditRule->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEventEditRule', EventEditRule::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a ExpandedDataSet on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $expandedDataSet = new ExpandedDataSet(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateExpandedDataSet($expandedDataSet, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param ExpandedDataSet $expandedDataSet Required. The ExpandedDataSet to update. - * The resource's `name` field is used to identify the ExpandedDataSet to be - * updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\ExpandedDataSet - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateExpandedDataSet($expandedDataSet, $updateMask, array $optionalArgs = []) - { - $request = new UpdateExpandedDataSetRequest(); - $requestParamHeaders = []; - $request->setExpandedDataSet($expandedDataSet); - $request->setUpdateMask($updateMask); - $requestParamHeaders['expanded_data_set.name'] = $expandedDataSet->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateExpandedDataSet', ExpandedDataSet::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a GoogleAdsLink on a property - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateGoogleAdsLink($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type GoogleAdsLink $googleAdsLink - * The GoogleAdsLink to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\GoogleAdsLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateGoogleAdsLink($updateMask, array $optionalArgs = []) - { - $request = new UpdateGoogleAdsLinkRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['googleAdsLink'])) { - $request->setGoogleAdsLink($optionalArgs['googleAdsLink']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateGoogleAdsLink', GoogleAdsLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates Google Signals settings for a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $googleSignalsSettings = new GoogleSignalsSettings(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateGoogleSignalsSettings($googleSignalsSettings, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param GoogleSignalsSettings $googleSignalsSettings Required. The settings to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\GoogleSignalsSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateGoogleSignalsSettings($googleSignalsSettings, $updateMask, array $optionalArgs = []) - { - $request = new UpdateGoogleSignalsSettingsRequest(); - $requestParamHeaders = []; - $request->setGoogleSignalsSettings($googleSignalsSettings); - $request->setUpdateMask($updateMask); - $requestParamHeaders['google_signals_settings.name'] = $googleSignalsSettings->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateGoogleSignalsSettings', GoogleSignalsSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a Key Event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $keyEvent = new KeyEvent(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateKeyEvent($keyEvent, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param KeyEvent $keyEvent Required. The Key Event to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\KeyEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateKeyEvent($keyEvent, $updateMask, array $optionalArgs = []) - { - $request = new UpdateKeyEventRequest(); - $requestParamHeaders = []; - $request->setKeyEvent($keyEvent); - $request->setUpdateMask($updateMask); - $requestParamHeaders['key_event.name'] = $keyEvent->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateKeyEvent', KeyEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a measurement protocol secret. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $measurementProtocolSecret = new MeasurementProtocolSecret(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateMeasurementProtocolSecret($measurementProtocolSecret, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param MeasurementProtocolSecret $measurementProtocolSecret Required. The measurement protocol secret to update. - * @param FieldMask $updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\MeasurementProtocolSecret - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateMeasurementProtocolSecret($measurementProtocolSecret, $updateMask, array $optionalArgs = []) - { - $request = new UpdateMeasurementProtocolSecretRequest(); - $requestParamHeaders = []; - $request->setMeasurementProtocolSecret($measurementProtocolSecret); - $request->setUpdateMask($updateMask); - $requestParamHeaders['measurement_protocol_secret.name'] = $measurementProtocolSecret->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateMeasurementProtocolSecret', MeasurementProtocolSecret::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $property = new Property(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateProperty($property, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param Property $property Required. The property to update. - * The property's `name` field is used to identify the property to be - * updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\Property - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateProperty($property, $updateMask, array $optionalArgs = []) - { - $request = new UpdatePropertyRequest(); - $requestParamHeaders = []; - $request->setProperty($property); - $request->setUpdateMask($updateMask); - $requestParamHeaders['property.name'] = $property->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateProperty', Property::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a SKAdNetworkConversionValueSchema. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $skadnetworkConversionValueSchema = new SKAdNetworkConversionValueSchema(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateSKAdNetworkConversionValueSchema($skadnetworkConversionValueSchema, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param SKAdNetworkConversionValueSchema $skadnetworkConversionValueSchema Required. SKAdNetwork conversion value schema to update. - * @param FieldMask $updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SKAdNetworkConversionValueSchema - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateSKAdNetworkConversionValueSchema($skadnetworkConversionValueSchema, $updateMask, array $optionalArgs = []) - { - $request = new UpdateSKAdNetworkConversionValueSchemaRequest(); - $requestParamHeaders = []; - $request->setSkadnetworkConversionValueSchema($skadnetworkConversionValueSchema); - $request->setUpdateMask($updateMask); - $requestParamHeaders['skadnetwork_conversion_value_schema.name'] = $skadnetworkConversionValueSchema->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSKAdNetworkConversionValueSchema', SKAdNetworkConversionValueSchema::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a SearchAds360Link on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateSearchAds360Link($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type SearchAds360Link $searchAds360Link - * The SearchAds360Link to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SearchAds360Link - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateSearchAds360Link($updateMask, array $optionalArgs = []) - { - $request = new UpdateSearchAds360LinkRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['searchAds360Link'])) { - $request->setSearchAds360Link($optionalArgs['searchAds360Link']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSearchAds360Link', SearchAds360Link::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a subproperty Event Filter. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $subpropertyEventFilter = new SubpropertyEventFilter(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateSubpropertyEventFilter($subpropertyEventFilter, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param SubpropertyEventFilter $subpropertyEventFilter Required. The subproperty event filter to update. - * @param FieldMask $updateMask Required. The list of fields to update. Field names must be in snake case - * (for example, "field_to_update"). Omitted fields will not be updated. To - * replace the entire entity, use one path with the string "*" to match all - * fields. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateSubpropertyEventFilter($subpropertyEventFilter, $updateMask, array $optionalArgs = []) - { - $request = new UpdateSubpropertyEventFilterRequest(); - $requestParamHeaders = []; - $request->setSubpropertyEventFilter($subpropertyEventFilter); - $request->setUpdateMask($updateMask); - $requestParamHeaders['subproperty_event_filter.name'] = $subpropertyEventFilter->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSubpropertyEventFilter', SubpropertyEventFilter::class, $optionalArgs, $request)->wait(); - } -} diff --git a/AnalyticsAdmin/src/V1alpha/GetAccessBindingRequest.php b/AnalyticsAdmin/src/V1alpha/GetAccessBindingRequest.php index 8697f5e8876a..8f69c685ecfb 100644 --- a/AnalyticsAdmin/src/V1alpha/GetAccessBindingRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetAccessBindingRequest.php @@ -23,7 +23,7 @@ class GetAccessBindingRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the access binding to retrieve. diff --git a/AnalyticsAdmin/src/V1alpha/GetAccountRequest.php b/AnalyticsAdmin/src/V1alpha/GetAccountRequest.php index c79b0a439509..94871e66cafa 100644 --- a/AnalyticsAdmin/src/V1alpha/GetAccountRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetAccountRequest.php @@ -22,7 +22,7 @@ class GetAccountRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the account to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetAdSenseLinkRequest.php b/AnalyticsAdmin/src/V1alpha/GetAdSenseLinkRequest.php index 911009d1dd11..d959c3d1843c 100644 --- a/AnalyticsAdmin/src/V1alpha/GetAdSenseLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetAdSenseLinkRequest.php @@ -22,7 +22,7 @@ class GetAdSenseLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Unique identifier for the AdSense Link requested. diff --git a/AnalyticsAdmin/src/V1alpha/GetAndroidAppDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/GetAndroidAppDataStreamRequest.php deleted file mode 100644 index bba201929db8..000000000000 --- a/AnalyticsAdmin/src/V1alpha/GetAndroidAppDataStreamRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.analytics.admin.v1alpha.GetAndroidAppDataStreamRequest - */ -class GetAndroidAppDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the android app data stream to lookup. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/123/androidAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the android app data stream to lookup. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/123/androidAppDataStreams/456" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the android app data stream to lookup. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/123/androidAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the android app data stream to lookup. - * Format: properties/{property_id}/androidAppDataStreams/{stream_id} - * Example: "properties/123/androidAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/GetAttributionSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/GetAttributionSettingsRequest.php index dbcabdd176a2..afb58ccbe10c 100644 --- a/AnalyticsAdmin/src/V1alpha/GetAttributionSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetAttributionSettingsRequest.php @@ -21,7 +21,7 @@ class GetAttributionSettingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the attribution settings to retrieve. diff --git a/AnalyticsAdmin/src/V1alpha/GetAudienceRequest.php b/AnalyticsAdmin/src/V1alpha/GetAudienceRequest.php index 9d1d8e3b46e5..12efac2e0cad 100644 --- a/AnalyticsAdmin/src/V1alpha/GetAudienceRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetAudienceRequest.php @@ -21,7 +21,7 @@ class GetAudienceRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the Audience to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetBigQueryLinkRequest.php b/AnalyticsAdmin/src/V1alpha/GetBigQueryLinkRequest.php index 296f088dc825..7e7a7525512d 100644 --- a/AnalyticsAdmin/src/V1alpha/GetBigQueryLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetBigQueryLinkRequest.php @@ -22,7 +22,7 @@ class GetBigQueryLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the BigQuery link to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetCalculatedMetricRequest.php b/AnalyticsAdmin/src/V1alpha/GetCalculatedMetricRequest.php index 1a17f495da52..2209a609ba9a 100644 --- a/AnalyticsAdmin/src/V1alpha/GetCalculatedMetricRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetCalculatedMetricRequest.php @@ -22,7 +22,7 @@ class GetCalculatedMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CalculatedMetric to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetChannelGroupRequest.php b/AnalyticsAdmin/src/V1alpha/GetChannelGroupRequest.php index 84255b6dd97f..9943c32f2cf7 100644 --- a/AnalyticsAdmin/src/V1alpha/GetChannelGroupRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetChannelGroupRequest.php @@ -21,7 +21,7 @@ class GetChannelGroupRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The ChannelGroup to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetConversionEventRequest.php b/AnalyticsAdmin/src/V1alpha/GetConversionEventRequest.php index 9b1e48fe49e3..d1af3b6035e6 100644 --- a/AnalyticsAdmin/src/V1alpha/GetConversionEventRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetConversionEventRequest.php @@ -22,7 +22,7 @@ class GetConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The resource name of the conversion event to retrieve. diff --git a/AnalyticsAdmin/src/V1alpha/GetCustomDimensionRequest.php b/AnalyticsAdmin/src/V1alpha/GetCustomDimensionRequest.php index 31dcea311f68..791adbf2d967 100644 --- a/AnalyticsAdmin/src/V1alpha/GetCustomDimensionRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetCustomDimensionRequest.php @@ -21,7 +21,7 @@ class GetCustomDimensionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CustomDimension to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetCustomMetricRequest.php b/AnalyticsAdmin/src/V1alpha/GetCustomMetricRequest.php index 2373f4061e7b..45434fc9c31c 100644 --- a/AnalyticsAdmin/src/V1alpha/GetCustomMetricRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetCustomMetricRequest.php @@ -21,7 +21,7 @@ class GetCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CustomMetric to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetDataRedactionSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/GetDataRedactionSettingsRequest.php index 676e0c5152d4..e87cdcdf2829 100644 --- a/AnalyticsAdmin/src/V1alpha/GetDataRedactionSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetDataRedactionSettingsRequest.php @@ -23,7 +23,7 @@ class GetDataRedactionSettingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the settings to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetDataRetentionSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/GetDataRetentionSettingsRequest.php index 427050eb26f2..c8a5a140ad9b 100644 --- a/AnalyticsAdmin/src/V1alpha/GetDataRetentionSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetDataRetentionSettingsRequest.php @@ -23,7 +23,7 @@ class GetDataRetentionSettingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the settings to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetDataSharingSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/GetDataSharingSettingsRequest.php index 7574e58142e7..4ab1c339196f 100644 --- a/AnalyticsAdmin/src/V1alpha/GetDataSharingSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetDataSharingSettingsRequest.php @@ -22,7 +22,7 @@ class GetDataSharingSettingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the settings to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/GetDataStreamRequest.php index 65e537df33cd..a7c04b39bf4a 100644 --- a/AnalyticsAdmin/src/V1alpha/GetDataStreamRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetDataStreamRequest.php @@ -21,7 +21,7 @@ class GetDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the DataStream to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetDisplayVideo360AdvertiserLinkProposalRequest.php b/AnalyticsAdmin/src/V1alpha/GetDisplayVideo360AdvertiserLinkProposalRequest.php index acacb68ec72e..616f3e26e35a 100644 --- a/AnalyticsAdmin/src/V1alpha/GetDisplayVideo360AdvertiserLinkProposalRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetDisplayVideo360AdvertiserLinkProposalRequest.php @@ -21,7 +21,7 @@ class GetDisplayVideo360AdvertiserLinkProposalRequest extends \Google\Protobuf\I * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetDisplayVideo360AdvertiserLinkRequest.php b/AnalyticsAdmin/src/V1alpha/GetDisplayVideo360AdvertiserLinkRequest.php index d5b6a13f612a..7741175491e5 100644 --- a/AnalyticsAdmin/src/V1alpha/GetDisplayVideo360AdvertiserLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetDisplayVideo360AdvertiserLinkRequest.php @@ -21,7 +21,7 @@ class GetDisplayVideo360AdvertiserLinkRequest extends \Google\Protobuf\Internal\ * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the DisplayVideo360AdvertiserLink to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetEnhancedMeasurementSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/GetEnhancedMeasurementSettingsRequest.php index 6f3aa5fd4add..69e4a08246f4 100644 --- a/AnalyticsAdmin/src/V1alpha/GetEnhancedMeasurementSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetEnhancedMeasurementSettingsRequest.php @@ -23,7 +23,7 @@ class GetEnhancedMeasurementSettingsRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the settings to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetEventCreateRuleRequest.php b/AnalyticsAdmin/src/V1alpha/GetEventCreateRuleRequest.php index 0eeed5ed7924..be3e7b1f59cc 100644 --- a/AnalyticsAdmin/src/V1alpha/GetEventCreateRuleRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetEventCreateRuleRequest.php @@ -21,7 +21,7 @@ class GetEventCreateRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the EventCreateRule to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetEventEditRuleRequest.php b/AnalyticsAdmin/src/V1alpha/GetEventEditRuleRequest.php index f85fd2b2d6c1..45e296fdfb3c 100644 --- a/AnalyticsAdmin/src/V1alpha/GetEventEditRuleRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetEventEditRuleRequest.php @@ -21,7 +21,7 @@ class GetEventEditRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the EventEditRule to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetExpandedDataSetRequest.php b/AnalyticsAdmin/src/V1alpha/GetExpandedDataSetRequest.php index eac41a549eaa..8c794ae9e17d 100644 --- a/AnalyticsAdmin/src/V1alpha/GetExpandedDataSetRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetExpandedDataSetRequest.php @@ -21,7 +21,7 @@ class GetExpandedDataSetRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the ExpandedDataSet to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetGlobalSiteTagRequest.php b/AnalyticsAdmin/src/V1alpha/GetGlobalSiteTagRequest.php index fd076c73fbab..3bdd7333a4e0 100644 --- a/AnalyticsAdmin/src/V1alpha/GetGlobalSiteTagRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetGlobalSiteTagRequest.php @@ -23,7 +23,7 @@ class GetGlobalSiteTagRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the site tag to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetGoogleSignalsSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/GetGoogleSignalsSettingsRequest.php index 7a940bd3ef57..b99c6d935119 100644 --- a/AnalyticsAdmin/src/V1alpha/GetGoogleSignalsSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetGoogleSignalsSettingsRequest.php @@ -21,7 +21,7 @@ class GetGoogleSignalsSettingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the google signals settings to retrieve. diff --git a/AnalyticsAdmin/src/V1alpha/GetIosAppDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/GetIosAppDataStreamRequest.php deleted file mode 100644 index 50301ce73d7c..000000000000 --- a/AnalyticsAdmin/src/V1alpha/GetIosAppDataStreamRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.analytics.admin.v1alpha.GetIosAppDataStreamRequest - */ -class GetIosAppDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the iOS app data stream to lookup. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/123/iosAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the iOS app data stream to lookup. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/123/iosAppDataStreams/456" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the iOS app data stream to lookup. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/123/iosAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the iOS app data stream to lookup. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/123/iosAppDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/GetKeyEventRequest.php b/AnalyticsAdmin/src/V1alpha/GetKeyEventRequest.php index ec3fbf7ab81b..02c7398a12b3 100644 --- a/AnalyticsAdmin/src/V1alpha/GetKeyEventRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetKeyEventRequest.php @@ -22,7 +22,7 @@ class GetKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The resource name of the Key Event to retrieve. diff --git a/AnalyticsAdmin/src/V1alpha/GetMeasurementProtocolSecretRequest.php b/AnalyticsAdmin/src/V1alpha/GetMeasurementProtocolSecretRequest.php index 70062e614d0a..9977c327a3c2 100644 --- a/AnalyticsAdmin/src/V1alpha/GetMeasurementProtocolSecretRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetMeasurementProtocolSecretRequest.php @@ -22,7 +22,7 @@ class GetMeasurementProtocolSecretRequest extends \Google\Protobuf\Internal\Mess * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the measurement protocol secret to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetPropertyRequest.php b/AnalyticsAdmin/src/V1alpha/GetPropertyRequest.php index cde2ed215423..73353be2afe4 100644 --- a/AnalyticsAdmin/src/V1alpha/GetPropertyRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetPropertyRequest.php @@ -22,7 +22,7 @@ class GetPropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the property to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetRollupPropertySourceLinkRequest.php b/AnalyticsAdmin/src/V1alpha/GetRollupPropertySourceLinkRequest.php index bca29cf8080b..84278fa33855 100644 --- a/AnalyticsAdmin/src/V1alpha/GetRollupPropertySourceLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetRollupPropertySourceLinkRequest.php @@ -23,7 +23,7 @@ class GetRollupPropertySourceLinkRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the roll-up property source link to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetSKAdNetworkConversionValueSchemaRequest.php b/AnalyticsAdmin/src/V1alpha/GetSKAdNetworkConversionValueSchemaRequest.php index 5fb3538cbb1a..14cedd41c311 100644 --- a/AnalyticsAdmin/src/V1alpha/GetSKAdNetworkConversionValueSchemaRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetSKAdNetworkConversionValueSchemaRequest.php @@ -22,7 +22,7 @@ class GetSKAdNetworkConversionValueSchemaRequest extends \Google\Protobuf\Intern * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The resource name of SKAdNetwork conversion value schema to look diff --git a/AnalyticsAdmin/src/V1alpha/GetSearchAds360LinkRequest.php b/AnalyticsAdmin/src/V1alpha/GetSearchAds360LinkRequest.php index 407be83d8ae0..e27be0bf9b48 100644 --- a/AnalyticsAdmin/src/V1alpha/GetSearchAds360LinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetSearchAds360LinkRequest.php @@ -21,7 +21,7 @@ class GetSearchAds360LinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the SearchAds360Link to get. diff --git a/AnalyticsAdmin/src/V1alpha/GetSubpropertyEventFilterRequest.php b/AnalyticsAdmin/src/V1alpha/GetSubpropertyEventFilterRequest.php index c00d74f28c52..d8f8e4d82ad3 100644 --- a/AnalyticsAdmin/src/V1alpha/GetSubpropertyEventFilterRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetSubpropertyEventFilterRequest.php @@ -23,7 +23,7 @@ class GetSubpropertyEventFilterRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Resource name of the subproperty event filter to lookup. diff --git a/AnalyticsAdmin/src/V1alpha/GetUserLinkRequest.php b/AnalyticsAdmin/src/V1alpha/GetUserLinkRequest.php deleted file mode 100644 index 44a8325aa094..000000000000 --- a/AnalyticsAdmin/src/V1alpha/GetUserLinkRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.analytics.admin.v1alpha.GetUserLinkRequest - */ -class GetUserLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Example format: accounts/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Example format: accounts/1234/userLinks/5678 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Example format: accounts/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Example format: accounts/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/GetWebDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/GetWebDataStreamRequest.php deleted file mode 100644 index d2595bab287d..000000000000 --- a/AnalyticsAdmin/src/V1alpha/GetWebDataStreamRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.analytics.admin.v1alpha.GetWebDataStreamRequest - */ -class GetWebDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the web data stream to lookup. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/123/webDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the web data stream to lookup. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/123/webDataStreams/456" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the web data stream to lookup. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/123/webDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the web data stream to lookup. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/123/webDataStreams/456" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/GlobalSiteTag.php b/AnalyticsAdmin/src/V1alpha/GlobalSiteTag.php index 8984a9e9449d..ff41c254253b 100644 --- a/AnalyticsAdmin/src/V1alpha/GlobalSiteTag.php +++ b/AnalyticsAdmin/src/V1alpha/GlobalSiteTag.php @@ -23,14 +23,14 @@ class GlobalSiteTag extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. JavaScript code snippet to be pasted as the first item into the * head tag of every webpage to measure. * * Generated from protobuf field string snippet = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $snippet = ''; + protected $snippet = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/GoogleAdsLink.php b/AnalyticsAdmin/src/V1alpha/GoogleAdsLink.php index b78c7ab3ad35..8c768dd1afb0 100644 --- a/AnalyticsAdmin/src/V1alpha/GoogleAdsLink.php +++ b/AnalyticsAdmin/src/V1alpha/GoogleAdsLink.php @@ -22,19 +22,19 @@ class GoogleAdsLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. Google Ads customer ID. * * Generated from protobuf field string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $customer_id = ''; + protected $customer_id = ''; /** * Output only. If true, this link is for a Google Ads manager account. * * Generated from protobuf field bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $can_manage_clients = false; + protected $can_manage_clients = false; /** * Enable personalized advertising features with this integration. * Automatically publish my Google Analytics audience lists and Google @@ -43,26 +43,26 @@ class GoogleAdsLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 5; */ - private $ads_personalization_enabled = null; + protected $ads_personalization_enabled = null; /** * Output only. Time when this link was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. Time when this link was last updated. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $update_time = null; + protected $update_time = null; /** * 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. * * Generated from protobuf field string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $creator_email_address = ''; + protected $creator_email_address = ''; /** * Constructor. @@ -214,7 +214,7 @@ public function clearAdsPersonalizationEnabled() * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 5; * @return bool|null */ - public function getAdsPersonalizationEnabledValue() + public function getAdsPersonalizationEnabledUnwrapped() { return $this->readWrapperValue("ads_personalization_enabled"); } @@ -249,7 +249,7 @@ public function setAdsPersonalizationEnabled($var) * @param bool|null $var * @return $this */ - public function setAdsPersonalizationEnabledValue($var) + public function setAdsPersonalizationEnabledUnwrapped($var) { $this->writeWrapperValue("ads_personalization_enabled", $var); return $this;} diff --git a/AnalyticsAdmin/src/V1alpha/GoogleSignalsSettings.php b/AnalyticsAdmin/src/V1alpha/GoogleSignalsSettings.php index d9ed1de655be..24556ce9639c 100644 --- a/AnalyticsAdmin/src/V1alpha/GoogleSignalsSettings.php +++ b/AnalyticsAdmin/src/V1alpha/GoogleSignalsSettings.php @@ -22,19 +22,19 @@ class GoogleSignalsSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Status of this setting. * * Generated from protobuf field .google.analytics.admin.v1alpha.GoogleSignalsState state = 3; */ - private $state = 0; + protected $state = 0; /** * Output only. Terms of Service acceptance. * * Generated from protobuf field .google.analytics.admin.v1alpha.GoogleSignalsConsent consent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $consent = 0; + protected $consent = 0; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/GroupingRule.php b/AnalyticsAdmin/src/V1alpha/GroupingRule.php index 4f87819730e9..079662ea4784 100644 --- a/AnalyticsAdmin/src/V1alpha/GroupingRule.php +++ b/AnalyticsAdmin/src/V1alpha/GroupingRule.php @@ -20,13 +20,13 @@ class GroupingRule extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Required. The Filter Expression that defines the Grouping Rule. * * Generated from protobuf field .google.analytics.admin.v1alpha.ChannelGroupFilterExpression expression = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $expression = null; + protected $expression = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/IosAppDataStream.php b/AnalyticsAdmin/src/V1alpha/IosAppDataStream.php deleted file mode 100644 index 7011deaabab1..000000000000 --- a/AnalyticsAdmin/src/V1alpha/IosAppDataStream.php +++ /dev/null @@ -1,277 +0,0 @@ -google.analytics.admin.v1alpha.IosAppDataStream - */ -class IosAppDataStream extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/1000/iosAppDataStreams/2000" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $name = ''; - /** - * Output only. ID of the corresponding iOS app in Firebase, if any. - * This ID can change if the iOS app is deleted and recreated. - * - * Generated from protobuf field string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $firebase_app_id = ''; - /** - * Output only. Time when this stream was originally created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $create_time = null; - /** - * Output only. Time when stream payload fields were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $update_time = null; - /** - * Required. Immutable. The Apple App Store Bundle ID for the app - * Example: "com.example.myiosapp" - * - * Generated from protobuf field string bundle_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - */ - private $bundle_id = ''; - /** - * Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * - * Generated from protobuf field string display_name = 6; - */ - private $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/1000/iosAppDataStreams/2000" - * @type string $firebase_app_id - * Output only. ID of the corresponding iOS app in Firebase, if any. - * This ID can change if the iOS app is deleted and recreated. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when this stream was originally created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time when stream payload fields were last updated. - * @type string $bundle_id - * Required. Immutable. The Apple App Store Bundle ID for the app - * Example: "com.example.myiosapp" - * @type string $display_name - * Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/1000/iosAppDataStreams/2000" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/iosAppDataStreams/{stream_id} - * Example: "properties/1000/iosAppDataStreams/2000" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - 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. - * - * Generated from protobuf field string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFirebaseAppId() - { - return $this->firebase_app_id; - } - - /** - * Output only. ID of the corresponding iOS app in Firebase, if any. - * This ID can change if the iOS app is deleted and recreated. - * - * Generated from protobuf field string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFirebaseAppId($var) - { - GPBUtil::checkString($var, True); - $this->firebase_app_id = $var; - - return $this; - } - - /** - * Output only. Time when this stream was originally created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time when this stream was originally created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time when stream payload fields were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Time when stream payload fields were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Required. Immutable. The Apple App Store Bundle ID for the app - * Example: "com.example.myiosapp" - * - * Generated from protobuf field string bundle_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBundleId() - { - return $this->bundle_id; - } - - /** - * Required. Immutable. The Apple App Store Bundle ID for the app - * Example: "com.example.myiosapp" - * - * Generated from protobuf field string bundle_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBundleId($var) - { - GPBUtil::checkString($var, True); - $this->bundle_id = $var; - - return $this; - } - - /** - * Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * - * Generated from protobuf field string display_name = 6; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * - * Generated from protobuf field string display_name = 6; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/KeyEvent.php b/AnalyticsAdmin/src/V1alpha/KeyEvent.php index 50bf116516a5..455cac9d9a97 100644 --- a/AnalyticsAdmin/src/V1alpha/KeyEvent.php +++ b/AnalyticsAdmin/src/V1alpha/KeyEvent.php @@ -21,26 +21,26 @@ class KeyEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The event name for this key event. * Examples: 'click', 'purchase' * * Generated from protobuf field string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $event_name = ''; + protected $event_name = ''; /** * Output only. Time when this key event was created in the property. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. If set to true, this event can be deleted. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $deletable = false; + protected $deletable = false; /** * Output only. If set to true, this key event refers to a custom event. If * set to false, this key event refers to a default event in GA. Default @@ -51,20 +51,20 @@ class KeyEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $custom = false; + protected $custom = false; /** * Required. The method by which Key Events will be counted across multiple * events within a session. * * Generated from protobuf field .google.analytics.admin.v1alpha.KeyEvent.CountingMethod counting_method = 6 [(.google.api.field_behavior) = REQUIRED]; */ - private $counting_method = 0; + protected $counting_method = 0; /** * Optional. Defines a default value/currency for a key event. * * Generated from protobuf field .google.analytics.admin.v1alpha.KeyEvent.DefaultValue default_value = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - private $default_value = null; + protected $default_value = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/KeyEvent/CountingMethod.php b/AnalyticsAdmin/src/V1alpha/KeyEvent/CountingMethod.php index 2dcf7fa2ee5d..51ed6ab2f936 100644 --- a/AnalyticsAdmin/src/V1alpha/KeyEvent/CountingMethod.php +++ b/AnalyticsAdmin/src/V1alpha/KeyEvent/CountingMethod.php @@ -61,6 +61,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CountingMethod::class, \Google\Analytics\Admin\V1alpha\KeyEvent_CountingMethod::class); diff --git a/AnalyticsAdmin/src/V1alpha/KeyEvent/DefaultValue.php b/AnalyticsAdmin/src/V1alpha/KeyEvent/DefaultValue.php index a7369776b97b..a4ae647d9307 100644 --- a/AnalyticsAdmin/src/V1alpha/KeyEvent/DefaultValue.php +++ b/AnalyticsAdmin/src/V1alpha/KeyEvent/DefaultValue.php @@ -22,7 +22,7 @@ class DefaultValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field double numeric_value = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $numeric_value = 0.0; + protected $numeric_value = 0.0; /** * Required. When an occurrence of this Key Event (specified by event_name) * has no set currency this currency will be applied as the default. Must be @@ -31,7 +31,7 @@ class DefaultValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string currency_code = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $currency_code = ''; + protected $currency_code = ''; /** * Constructor. @@ -119,6 +119,4 @@ public function setCurrencyCode($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DefaultValue::class, \Google\Analytics\Admin\V1alpha\KeyEvent_DefaultValue::class); diff --git a/AnalyticsAdmin/src/V1alpha/LinkProposalStatusDetails.php b/AnalyticsAdmin/src/V1alpha/LinkProposalStatusDetails.php index 3deb05a01b2c..0aa42293c25a 100644 --- a/AnalyticsAdmin/src/V1alpha/LinkProposalStatusDetails.php +++ b/AnalyticsAdmin/src/V1alpha/LinkProposalStatusDetails.php @@ -20,19 +20,19 @@ class LinkProposalStatusDetails extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.LinkProposalInitiatingProduct link_proposal_initiating_product = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $link_proposal_initiating_product = 0; + protected $link_proposal_initiating_product = 0; /** * Output only. The email address of the user that proposed this linkage. * * Generated from protobuf field string requestor_email = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $requestor_email = ''; + protected $requestor_email = ''; /** * Output only. The state of this proposal. * * Generated from protobuf field .google.analytics.admin.v1alpha.LinkProposalState link_proposal_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $link_proposal_state = 0; + protected $link_proposal_state = 0; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListAccessBindingsRequest.php b/AnalyticsAdmin/src/V1alpha/ListAccessBindingsRequest.php index 5181654efd67..4e7426d13fb0 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAccessBindingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListAccessBindingsRequest.php @@ -22,7 +22,7 @@ class ListAccessBindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of access bindings to return. * The service may return fewer than this value. @@ -31,7 +31,7 @@ class ListAccessBindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListAccessBindings` call. * Provide this to retrieve the subsequent page. @@ -40,7 +40,7 @@ class ListAccessBindingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Formats: diff --git a/AnalyticsAdmin/src/V1alpha/ListAccessBindingsResponse.php b/AnalyticsAdmin/src/V1alpha/ListAccessBindingsResponse.php index 95ec610409dc..d311f7612c7e 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAccessBindingsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListAccessBindingsResponse.php @@ -28,7 +28,7 @@ class ListAccessBindingsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListAccountSummariesRequest.php b/AnalyticsAdmin/src/V1alpha/ListAccountSummariesRequest.php index f56311ab58e4..b58e30527c68 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAccountSummariesRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListAccountSummariesRequest.php @@ -23,7 +23,7 @@ class ListAccountSummariesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 1; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListAccountSummaries` call. * Provide this to retrieve the subsequent page. @@ -32,7 +32,7 @@ class ListAccountSummariesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 2; */ - private $page_token = ''; + protected $page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListAccountSummariesResponse.php b/AnalyticsAdmin/src/V1alpha/ListAccountSummariesResponse.php index f18da49d89e5..070ea0702270 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAccountSummariesResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListAccountSummariesResponse.php @@ -27,7 +27,7 @@ class ListAccountSummariesResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListAccountsRequest.php b/AnalyticsAdmin/src/V1alpha/ListAccountsRequest.php index bf83091435e6..83b851ab5536 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAccountsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListAccountsRequest.php @@ -23,7 +23,7 @@ class ListAccountsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 1; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListAccounts` call. * Provide this to retrieve the subsequent page. @@ -32,7 +32,7 @@ class ListAccountsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 2; */ - private $page_token = ''; + protected $page_token = ''; /** * Whether to include soft-deleted (ie: "trashed") Accounts in the * results. Accounts can be inspected to determine whether they are deleted or @@ -40,7 +40,7 @@ class ListAccountsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool show_deleted = 3; */ - private $show_deleted = false; + protected $show_deleted = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListAccountsResponse.php b/AnalyticsAdmin/src/V1alpha/ListAccountsResponse.php index 4197d331ad41..3796927d5fc4 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAccountsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListAccountsResponse.php @@ -27,7 +27,7 @@ class ListAccountsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListAdSenseLinksRequest.php b/AnalyticsAdmin/src/V1alpha/ListAdSenseLinksRequest.php index e5e9470f1f75..cffc9c3070b8 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAdSenseLinksRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListAdSenseLinksRequest.php @@ -22,7 +22,7 @@ class ListAdSenseLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -30,7 +30,7 @@ class ListAdSenseLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token received from a previous `ListAdSenseLinks` call. * Provide this to retrieve the subsequent page. @@ -39,7 +39,7 @@ class ListAdSenseLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Resource name of the parent property. diff --git a/AnalyticsAdmin/src/V1alpha/ListAdSenseLinksResponse.php b/AnalyticsAdmin/src/V1alpha/ListAdSenseLinksResponse.php index 82e953af6a2e..be6c763e5625 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAdSenseLinksResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListAdSenseLinksResponse.php @@ -27,7 +27,7 @@ class ListAdSenseLinksResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListAndroidAppDataStreamsRequest.php b/AnalyticsAdmin/src/V1alpha/ListAndroidAppDataStreamsRequest.php deleted file mode 100644 index 9be736fd5a13..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ListAndroidAppDataStreamsRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.analytics.admin.v1alpha.ListAndroidAppDataStreamsRequest - */ -class ListAndroidAppDataStreamsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent property. - * For example, to limit results to app streams under the property with Id - * 123: "properties/123" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * 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) - * - * Generated from protobuf field int32 page_size = 2; - */ - private $page_size = 0; - /** - * A page token, received from a previous call. Provide this to - * retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListAndroidAppDataStreams` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - private $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent property. - * For example, to limit results to app streams under the property with Id - * 123: "properties/123" - * @type int $page_size - * 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) - * @type string $page_token - * A page token, received from a previous call. Provide this to - * retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListAndroidAppDataStreams` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent property. - * For example, to limit results to app streams under the property with Id - * 123: "properties/123" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the parent property. - * For example, to limit results to app streams under the property with Id - * 123: "properties/123" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - 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) - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * 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) - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous call. Provide this to - * retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListAndroidAppDataStreams` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous call. Provide this to - * retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListAndroidAppDataStreams` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/ListAndroidAppDataStreamsResponse.php b/AnalyticsAdmin/src/V1alpha/ListAndroidAppDataStreamsResponse.php deleted file mode 100644 index 86aae0134ace..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ListAndroidAppDataStreamsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.analytics.admin.v1alpha.ListAndroidAppDataStreamsResponse - */ -class ListAndroidAppDataStreamsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Results that matched the filter criteria and were accessible to the caller. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.AndroidAppDataStream android_app_data_streams = 1; - */ - private $android_app_data_streams; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - private $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\AndroidAppDataStream[]|\Google\Protobuf\Internal\RepeatedField $android_app_data_streams - * Results that matched the filter criteria and were accessible to the caller. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Results that matched the filter criteria and were accessible to the caller. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.AndroidAppDataStream android_app_data_streams = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAndroidAppDataStreams() - { - return $this->android_app_data_streams; - } - - /** - * Results that matched the filter criteria and were accessible to the caller. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.AndroidAppDataStream android_app_data_streams = 1; - * @param \Google\Analytics\Admin\V1alpha\AndroidAppDataStream[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAndroidAppDataStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\AndroidAppDataStream::class); - $this->android_app_data_streams = $arr; - - 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. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/ListAudiencesRequest.php b/AnalyticsAdmin/src/V1alpha/ListAudiencesRequest.php index b6ce22582af2..f15cbf657417 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAudiencesRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListAudiencesRequest.php @@ -20,7 +20,7 @@ class ListAudiencesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListAudiencesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListAudiences` call. Provide this * to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListAudiencesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListAudiencesResponse.php b/AnalyticsAdmin/src/V1alpha/ListAudiencesResponse.php index 5a81bad07370..d20f7ee05b42 100644 --- a/AnalyticsAdmin/src/V1alpha/ListAudiencesResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListAudiencesResponse.php @@ -27,7 +27,7 @@ class ListAudiencesResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListBigQueryLinksRequest.php b/AnalyticsAdmin/src/V1alpha/ListBigQueryLinksRequest.php index cbf86710f4c4..a99efe75c653 100644 --- a/AnalyticsAdmin/src/V1alpha/ListBigQueryLinksRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListBigQueryLinksRequest.php @@ -22,7 +22,7 @@ class ListBigQueryLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. @@ -31,7 +31,7 @@ class ListBigQueryLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListBigQueryLinks` call. * Provide this to retrieve the subsequent page. @@ -40,7 +40,7 @@ class ListBigQueryLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The name of the property to list BigQuery links under. diff --git a/AnalyticsAdmin/src/V1alpha/ListBigQueryLinksResponse.php b/AnalyticsAdmin/src/V1alpha/ListBigQueryLinksResponse.php index 9d00f9ad948c..cf3486ac78cd 100644 --- a/AnalyticsAdmin/src/V1alpha/ListBigQueryLinksResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListBigQueryLinksResponse.php @@ -27,7 +27,7 @@ class ListBigQueryLinksResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListCalculatedMetricsRequest.php b/AnalyticsAdmin/src/V1alpha/ListCalculatedMetricsRequest.php index 4c2826553631..ba47706ca733 100644 --- a/AnalyticsAdmin/src/V1alpha/ListCalculatedMetricsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListCalculatedMetricsRequest.php @@ -20,7 +20,7 @@ class ListCalculatedMetricsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListCalculatedMetricsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_size = 0; + protected $page_size = 0; /** * Optional. A page token, received from a previous `ListCalculatedMetrics` * call. Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListCalculatedMetricsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListCalculatedMetricsResponse.php b/AnalyticsAdmin/src/V1alpha/ListCalculatedMetricsResponse.php index c6f78a8eecb7..f12cb7a1a4d7 100644 --- a/AnalyticsAdmin/src/V1alpha/ListCalculatedMetricsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListCalculatedMetricsResponse.php @@ -27,7 +27,7 @@ class ListCalculatedMetricsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListChannelGroupsRequest.php b/AnalyticsAdmin/src/V1alpha/ListChannelGroupsRequest.php index c66b9980d93f..868c9f2c522a 100644 --- a/AnalyticsAdmin/src/V1alpha/ListChannelGroupsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListChannelGroupsRequest.php @@ -21,7 +21,7 @@ class ListChannelGroupsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -29,7 +29,7 @@ class ListChannelGroupsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListChannelGroups` call. Provide * this to retrieve the subsequent page. @@ -38,7 +38,7 @@ class ListChannelGroupsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The property for which to list ChannelGroups. diff --git a/AnalyticsAdmin/src/V1alpha/ListChannelGroupsResponse.php b/AnalyticsAdmin/src/V1alpha/ListChannelGroupsResponse.php index 195cc7c4d572..b92ffc9b5ad8 100644 --- a/AnalyticsAdmin/src/V1alpha/ListChannelGroupsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListChannelGroupsResponse.php @@ -28,7 +28,7 @@ class ListChannelGroupsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsRequest.php b/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsRequest.php index 777d744d1229..e86202e1d53e 100644 --- a/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsRequest.php @@ -23,7 +23,7 @@ class ListConnectedSiteTagsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string property = 1; */ - private $property = ''; + protected $property = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListConversionEventsRequest.php b/AnalyticsAdmin/src/V1alpha/ListConversionEventsRequest.php index 3e180ca41321..ad032627d8cd 100644 --- a/AnalyticsAdmin/src/V1alpha/ListConversionEventsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListConversionEventsRequest.php @@ -21,7 +21,7 @@ class ListConversionEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -29,7 +29,7 @@ class ListConversionEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListConversionEvents` call. * Provide this to retrieve the subsequent page. @@ -38,7 +38,7 @@ class ListConversionEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The resource name of the parent property. diff --git a/AnalyticsAdmin/src/V1alpha/ListConversionEventsResponse.php b/AnalyticsAdmin/src/V1alpha/ListConversionEventsResponse.php index 7f2edbc4de04..4965a76b1303 100644 --- a/AnalyticsAdmin/src/V1alpha/ListConversionEventsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListConversionEventsResponse.php @@ -27,7 +27,7 @@ class ListConversionEventsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListCustomDimensionsRequest.php b/AnalyticsAdmin/src/V1alpha/ListCustomDimensionsRequest.php index 55e837211650..dcfa4039da29 100644 --- a/AnalyticsAdmin/src/V1alpha/ListCustomDimensionsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListCustomDimensionsRequest.php @@ -20,7 +20,7 @@ class ListCustomDimensionsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListCustomDimensionsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListCustomDimensions` call. * Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListCustomDimensionsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListCustomDimensionsResponse.php b/AnalyticsAdmin/src/V1alpha/ListCustomDimensionsResponse.php index 70875e75e372..a7f3bf197e86 100644 --- a/AnalyticsAdmin/src/V1alpha/ListCustomDimensionsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListCustomDimensionsResponse.php @@ -27,7 +27,7 @@ class ListCustomDimensionsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListCustomMetricsRequest.php b/AnalyticsAdmin/src/V1alpha/ListCustomMetricsRequest.php index f9af493d4837..def5bafc6997 100644 --- a/AnalyticsAdmin/src/V1alpha/ListCustomMetricsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListCustomMetricsRequest.php @@ -20,7 +20,7 @@ class ListCustomMetricsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListCustomMetricsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListCustomMetrics` call. * Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListCustomMetricsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListCustomMetricsResponse.php b/AnalyticsAdmin/src/V1alpha/ListCustomMetricsResponse.php index d5de94782c8a..ecaaa9829a28 100644 --- a/AnalyticsAdmin/src/V1alpha/ListCustomMetricsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListCustomMetricsResponse.php @@ -27,7 +27,7 @@ class ListCustomMetricsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListDataStreamsRequest.php b/AnalyticsAdmin/src/V1alpha/ListDataStreamsRequest.php index 2d6edc2571a9..c86cfe9b12ff 100644 --- a/AnalyticsAdmin/src/V1alpha/ListDataStreamsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListDataStreamsRequest.php @@ -20,7 +20,7 @@ class ListDataStreamsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListDataStreamsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListDataStreams` call. * Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListDataStreamsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListDataStreamsResponse.php b/AnalyticsAdmin/src/V1alpha/ListDataStreamsResponse.php index 6eb9c81c012b..c3e6f6522afb 100644 --- a/AnalyticsAdmin/src/V1alpha/ListDataStreamsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListDataStreamsResponse.php @@ -27,7 +27,7 @@ class ListDataStreamsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinkProposalsRequest.php b/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinkProposalsRequest.php index 50b4bf959226..b9ceea36de86 100644 --- a/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinkProposalsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinkProposalsRequest.php @@ -20,7 +20,7 @@ class ListDisplayVideo360AdvertiserLinkProposalsRequest extends \Google\Protobuf * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListDisplayVideo360AdvertiserLinkProposalsRequest extends \Google\Protobuf * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve @@ -39,7 +39,7 @@ class ListDisplayVideo360AdvertiserLinkProposalsRequest extends \Google\Protobuf * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinkProposalsResponse.php b/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinkProposalsResponse.php index 6dcaf3c10423..8d9711d2a2c3 100644 --- a/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinkProposalsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinkProposalsResponse.php @@ -27,7 +27,7 @@ class ListDisplayVideo360AdvertiserLinkProposalsResponse extends \Google\Protobu * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinksRequest.php b/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinksRequest.php index 40db697a42d1..86ff11e2dbfb 100644 --- a/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinksRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinksRequest.php @@ -20,7 +20,7 @@ class ListDisplayVideo360AdvertiserLinksRequest extends \Google\Protobuf\Interna * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListDisplayVideo360AdvertiserLinksRequest extends \Google\Protobuf\Interna * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` * call. Provide this to retrieve the subsequent page. @@ -38,7 +38,7 @@ class ListDisplayVideo360AdvertiserLinksRequest extends \Google\Protobuf\Interna * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinksResponse.php b/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinksResponse.php index 624ee691a091..2bfab58804dc 100644 --- a/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinksResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListDisplayVideo360AdvertiserLinksResponse.php @@ -27,7 +27,7 @@ class ListDisplayVideo360AdvertiserLinksResponse extends \Google\Protobuf\Intern * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListEventCreateRulesRequest.php b/AnalyticsAdmin/src/V1alpha/ListEventCreateRulesRequest.php index bafc21acd971..4c5387a45a89 100644 --- a/AnalyticsAdmin/src/V1alpha/ListEventCreateRulesRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListEventCreateRulesRequest.php @@ -20,7 +20,7 @@ class ListEventCreateRulesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListEventCreateRulesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListEventCreateRules` call. Provide * this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListEventCreateRulesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/123/dataStreams/456 diff --git a/AnalyticsAdmin/src/V1alpha/ListEventCreateRulesResponse.php b/AnalyticsAdmin/src/V1alpha/ListEventCreateRulesResponse.php index 02451dbe66ca..ede402275d7b 100644 --- a/AnalyticsAdmin/src/V1alpha/ListEventCreateRulesResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListEventCreateRulesResponse.php @@ -28,7 +28,7 @@ class ListEventCreateRulesResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListEventEditRulesRequest.php b/AnalyticsAdmin/src/V1alpha/ListEventEditRulesRequest.php index 27655c82c43e..8583c4b7267d 100644 --- a/AnalyticsAdmin/src/V1alpha/ListEventEditRulesRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListEventEditRulesRequest.php @@ -20,7 +20,7 @@ class ListEventEditRulesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Optional. The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListEventEditRulesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_size = 0; + protected $page_size = 0; /** * Optional. A page token, received from a previous `ListEventEditRules` call. * Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListEventEditRulesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/123/dataStreams/456 diff --git a/AnalyticsAdmin/src/V1alpha/ListEventEditRulesResponse.php b/AnalyticsAdmin/src/V1alpha/ListEventEditRulesResponse.php index 48813b9c0b40..8732259d5aa3 100644 --- a/AnalyticsAdmin/src/V1alpha/ListEventEditRulesResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListEventEditRulesResponse.php @@ -28,7 +28,7 @@ class ListEventEditRulesResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListExpandedDataSetsRequest.php b/AnalyticsAdmin/src/V1alpha/ListExpandedDataSetsRequest.php index 375fd06f4c44..6d04f0256adc 100644 --- a/AnalyticsAdmin/src/V1alpha/ListExpandedDataSetsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListExpandedDataSetsRequest.php @@ -20,7 +20,7 @@ class ListExpandedDataSetsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListExpandedDataSetsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListExpandedDataSets` call. Provide * this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListExpandedDataSetsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListExpandedDataSetsResponse.php b/AnalyticsAdmin/src/V1alpha/ListExpandedDataSetsResponse.php index fa668bbb44dd..08667102b0c4 100644 --- a/AnalyticsAdmin/src/V1alpha/ListExpandedDataSetsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListExpandedDataSetsResponse.php @@ -28,7 +28,7 @@ class ListExpandedDataSetsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListFirebaseLinksRequest.php b/AnalyticsAdmin/src/V1alpha/ListFirebaseLinksRequest.php index 7d34de879872..a88d2402151d 100644 --- a/AnalyticsAdmin/src/V1alpha/ListFirebaseLinksRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListFirebaseLinksRequest.php @@ -21,7 +21,7 @@ class ListFirebaseLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. @@ -30,7 +30,7 @@ class ListFirebaseLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. @@ -39,7 +39,7 @@ class ListFirebaseLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Format: properties/{property_id} diff --git a/AnalyticsAdmin/src/V1alpha/ListFirebaseLinksResponse.php b/AnalyticsAdmin/src/V1alpha/ListFirebaseLinksResponse.php index 917acadf7434..3a0d33be83fb 100644 --- a/AnalyticsAdmin/src/V1alpha/ListFirebaseLinksResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListFirebaseLinksResponse.php @@ -29,7 +29,7 @@ class ListFirebaseLinksResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListGoogleAdsLinksRequest.php b/AnalyticsAdmin/src/V1alpha/ListGoogleAdsLinksRequest.php index 81a3ba7d8612..89c94ad77a71 100644 --- a/AnalyticsAdmin/src/V1alpha/ListGoogleAdsLinksRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListGoogleAdsLinksRequest.php @@ -20,7 +20,7 @@ class ListGoogleAdsLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListGoogleAdsLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListGoogleAdsLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListGoogleAdsLinksResponse.php b/AnalyticsAdmin/src/V1alpha/ListGoogleAdsLinksResponse.php index 4b7fef10597f..c3d31c7fdb0c 100644 --- a/AnalyticsAdmin/src/V1alpha/ListGoogleAdsLinksResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListGoogleAdsLinksResponse.php @@ -27,7 +27,7 @@ class ListGoogleAdsLinksResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListIosAppDataStreamsRequest.php b/AnalyticsAdmin/src/V1alpha/ListIosAppDataStreamsRequest.php deleted file mode 100644 index 95a68926aeff..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ListIosAppDataStreamsRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.analytics.admin.v1alpha.ListIosAppDataStreamsRequest - */ -class ListIosAppDataStreamsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent property. - * For example, to list results of app streams under the property with Id - * 123: "properties/123" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * 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) - * - * Generated from protobuf field int32 page_size = 2; - */ - private $page_size = 0; - /** - * A page token, received from a previous `ListIosAppDataStreams` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListIosAppDataStreams` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - private $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent property. - * For example, to list results of app streams under the property with Id - * 123: "properties/123" - * @type int $page_size - * 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) - * @type string $page_token - * A page token, received from a previous `ListIosAppDataStreams` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListIosAppDataStreams` - * must match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent property. - * For example, to list results of app streams under the property with Id - * 123: "properties/123" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the parent property. - * For example, to list results of app streams under the property with Id - * 123: "properties/123" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - 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) - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * 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) - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListIosAppDataStreams` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListIosAppDataStreams` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListIosAppDataStreams` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListIosAppDataStreams` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/ListIosAppDataStreamsResponse.php b/AnalyticsAdmin/src/V1alpha/ListIosAppDataStreamsResponse.php deleted file mode 100644 index 5e6d7cdcb401..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ListIosAppDataStreamsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.analytics.admin.v1alpha.ListIosAppDataStreamsResponse - */ -class ListIosAppDataStreamsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Results that matched the filter criteria and were accessible to the caller. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.IosAppDataStream ios_app_data_streams = 1; - */ - private $ios_app_data_streams; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - private $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\IosAppDataStream[]|\Google\Protobuf\Internal\RepeatedField $ios_app_data_streams - * Results that matched the filter criteria and were accessible to the caller. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Results that matched the filter criteria and were accessible to the caller. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.IosAppDataStream ios_app_data_streams = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIosAppDataStreams() - { - return $this->ios_app_data_streams; - } - - /** - * Results that matched the filter criteria and were accessible to the caller. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.IosAppDataStream ios_app_data_streams = 1; - * @param \Google\Analytics\Admin\V1alpha\IosAppDataStream[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIosAppDataStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\IosAppDataStream::class); - $this->ios_app_data_streams = $arr; - - 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. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/ListKeyEventsRequest.php b/AnalyticsAdmin/src/V1alpha/ListKeyEventsRequest.php index a8bfea3dbea4..ec7a040779e7 100644 --- a/AnalyticsAdmin/src/V1alpha/ListKeyEventsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListKeyEventsRequest.php @@ -21,7 +21,7 @@ class ListKeyEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -29,7 +29,7 @@ class ListKeyEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListKeyEvents` call. * Provide this to retrieve the subsequent page. @@ -38,7 +38,7 @@ class ListKeyEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The resource name of the parent property. diff --git a/AnalyticsAdmin/src/V1alpha/ListKeyEventsResponse.php b/AnalyticsAdmin/src/V1alpha/ListKeyEventsResponse.php index 2a2c2da41395..71524eb0f029 100644 --- a/AnalyticsAdmin/src/V1alpha/ListKeyEventsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListKeyEventsResponse.php @@ -27,7 +27,7 @@ class ListKeyEventsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListMeasurementProtocolSecretsRequest.php b/AnalyticsAdmin/src/V1alpha/ListMeasurementProtocolSecretsRequest.php index 875ec5374166..76a06b8bd3d2 100644 --- a/AnalyticsAdmin/src/V1alpha/ListMeasurementProtocolSecretsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListMeasurementProtocolSecretsRequest.php @@ -22,7 +22,7 @@ class ListMeasurementProtocolSecretsRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 10 resources will be returned. @@ -30,7 +30,7 @@ class ListMeasurementProtocolSecretsRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListMeasurementProtocolSecrets` * call. Provide this to retrieve the subsequent page. When paginating, all @@ -39,7 +39,7 @@ class ListMeasurementProtocolSecretsRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The resource name of the parent stream. diff --git a/AnalyticsAdmin/src/V1alpha/ListMeasurementProtocolSecretsResponse.php b/AnalyticsAdmin/src/V1alpha/ListMeasurementProtocolSecretsResponse.php index abd030ed38dc..5cc554ad270c 100644 --- a/AnalyticsAdmin/src/V1alpha/ListMeasurementProtocolSecretsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListMeasurementProtocolSecretsResponse.php @@ -27,7 +27,7 @@ class ListMeasurementProtocolSecretsResponse extends \Google\Protobuf\Internal\M * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListPropertiesRequest.php b/AnalyticsAdmin/src/V1alpha/ListPropertiesRequest.php index edc7e6b6eca0..4b1b37feb740 100644 --- a/AnalyticsAdmin/src/V1alpha/ListPropertiesRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListPropertiesRequest.php @@ -34,7 +34,7 @@ class ListPropertiesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $filter = ''; + protected $filter = ''; /** * The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. @@ -43,7 +43,7 @@ class ListPropertiesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListProperties` call. * Provide this to retrieve the subsequent page. @@ -52,7 +52,7 @@ class ListPropertiesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * Whether to include soft-deleted (ie: "trashed") Properties in the * results. Properties can be inspected to determine whether they are deleted @@ -60,7 +60,7 @@ class ListPropertiesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool show_deleted = 4; */ - private $show_deleted = false; + protected $show_deleted = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListPropertiesResponse.php b/AnalyticsAdmin/src/V1alpha/ListPropertiesResponse.php index 8749fe1c2c8d..ecfb989f75b6 100644 --- a/AnalyticsAdmin/src/V1alpha/ListPropertiesResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListPropertiesResponse.php @@ -27,7 +27,7 @@ class ListPropertiesResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListRollupPropertySourceLinksRequest.php b/AnalyticsAdmin/src/V1alpha/ListRollupPropertySourceLinksRequest.php index a5464e3557f5..f5add884aba6 100644 --- a/AnalyticsAdmin/src/V1alpha/ListRollupPropertySourceLinksRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListRollupPropertySourceLinksRequest.php @@ -21,7 +21,7 @@ class ListRollupPropertySourceLinksRequest extends \Google\Protobuf\Internal\Mes * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. @@ -30,7 +30,7 @@ class ListRollupPropertySourceLinksRequest extends \Google\Protobuf\Internal\Mes * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_size = 0; + protected $page_size = 0; /** * Optional. A page token, received from a previous * `ListRollupPropertySourceLinks` call. Provide this to retrieve the @@ -40,7 +40,7 @@ class ListRollupPropertySourceLinksRequest extends \Google\Protobuf\Internal\Mes * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The name of the roll-up property to list roll-up property source diff --git a/AnalyticsAdmin/src/V1alpha/ListRollupPropertySourceLinksResponse.php b/AnalyticsAdmin/src/V1alpha/ListRollupPropertySourceLinksResponse.php index 1b5b71138337..f66db6affbd0 100644 --- a/AnalyticsAdmin/src/V1alpha/ListRollupPropertySourceLinksResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListRollupPropertySourceLinksResponse.php @@ -27,7 +27,7 @@ class ListRollupPropertySourceLinksResponse extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListSKAdNetworkConversionValueSchemasRequest.php b/AnalyticsAdmin/src/V1alpha/ListSKAdNetworkConversionValueSchemasRequest.php index 002485ebd4e7..1024b2f84a4c 100644 --- a/AnalyticsAdmin/src/V1alpha/ListSKAdNetworkConversionValueSchemasRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListSKAdNetworkConversionValueSchemasRequest.php @@ -23,7 +23,7 @@ class ListSKAdNetworkConversionValueSchemasRequest extends \Google\Protobuf\Inte * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. @@ -32,7 +32,7 @@ class ListSKAdNetworkConversionValueSchemasRequest extends \Google\Protobuf\Inte * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous * `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the @@ -42,7 +42,7 @@ class ListSKAdNetworkConversionValueSchemasRequest extends \Google\Protobuf\Inte * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The DataStream resource to list schemas for. diff --git a/AnalyticsAdmin/src/V1alpha/ListSKAdNetworkConversionValueSchemasResponse.php b/AnalyticsAdmin/src/V1alpha/ListSKAdNetworkConversionValueSchemasResponse.php index b36b5bda6b62..f5b74fde223e 100644 --- a/AnalyticsAdmin/src/V1alpha/ListSKAdNetworkConversionValueSchemasResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListSKAdNetworkConversionValueSchemasResponse.php @@ -31,7 +31,7 @@ class ListSKAdNetworkConversionValueSchemasResponse extends \Google\Protobuf\Int * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListSearchAds360LinksRequest.php b/AnalyticsAdmin/src/V1alpha/ListSearchAds360LinksRequest.php index 3dee9669526f..da971d20a08d 100644 --- a/AnalyticsAdmin/src/V1alpha/ListSearchAds360LinksRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListSearchAds360LinksRequest.php @@ -20,7 +20,7 @@ class ListSearchAds360LinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListSearchAds360LinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListSearchAds360Links` * call. Provide this to retrieve the subsequent page. @@ -38,7 +38,7 @@ class ListSearchAds360LinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1alpha/ListSearchAds360LinksResponse.php b/AnalyticsAdmin/src/V1alpha/ListSearchAds360LinksResponse.php index e6f306902852..7a95c6bd2faa 100644 --- a/AnalyticsAdmin/src/V1alpha/ListSearchAds360LinksResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListSearchAds360LinksResponse.php @@ -27,7 +27,7 @@ class ListSearchAds360LinksResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListSubpropertyEventFiltersRequest.php b/AnalyticsAdmin/src/V1alpha/ListSubpropertyEventFiltersRequest.php index d586382ecef4..a853b8804a40 100644 --- a/AnalyticsAdmin/src/V1alpha/ListSubpropertyEventFiltersRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ListSubpropertyEventFiltersRequest.php @@ -22,7 +22,7 @@ class ListSubpropertyEventFiltersRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Optional. The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. If unspecified, @@ -31,7 +31,7 @@ class ListSubpropertyEventFiltersRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_size = 0; + protected $page_size = 0; /** * Optional. A page token, received from a previous * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent @@ -41,7 +41,7 @@ class ListSubpropertyEventFiltersRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Resource name of the ordinary property. diff --git a/AnalyticsAdmin/src/V1alpha/ListSubpropertyEventFiltersResponse.php b/AnalyticsAdmin/src/V1alpha/ListSubpropertyEventFiltersResponse.php index f58fd0c69952..3ee9fd68a4f3 100644 --- a/AnalyticsAdmin/src/V1alpha/ListSubpropertyEventFiltersResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ListSubpropertyEventFiltersResponse.php @@ -27,7 +27,7 @@ class ListSubpropertyEventFiltersResponse extends \Google\Protobuf\Internal\Mess * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ListUserLinksRequest.php b/AnalyticsAdmin/src/V1alpha/ListUserLinksRequest.php deleted file mode 100644 index 2f7f0bbff7be..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ListUserLinksRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.analytics.admin.v1alpha.ListUserLinksRequest - */ -class ListUserLinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - private $page_size = 0; - /** - * A page token, received from a previous `ListUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - private $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Example format: accounts/1234 - * @type int $page_size - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. - * @type string $page_token - * A page token, received from a previous `ListUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Example format: accounts/1234 - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/ListUserLinksResponse.php b/AnalyticsAdmin/src/V1alpha/ListUserLinksResponse.php deleted file mode 100644 index 71ca85db7c59..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ListUserLinksResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.analytics.admin.v1alpha.ListUserLinksResponse - */ -class ListUserLinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of UserLinks. These will be ordered stably, but in an arbitrary order. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - private $user_links; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - private $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Analytics\Admin\V1alpha\UserLink>|\Google\Protobuf\Internal\RepeatedField $user_links - * List of UserLinks. These will be ordered stably, but in an arbitrary order. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of UserLinks. These will be ordered stably, but in an arbitrary order. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserLinks() - { - return $this->user_links; - } - - /** - * List of UserLinks. These will be ordered stably, but in an arbitrary order. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - * @param array<\Google\Analytics\Admin\V1alpha\UserLink>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\UserLink::class); - $this->user_links = $arr; - - 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. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/ListWebDataStreamsRequest.php b/AnalyticsAdmin/src/V1alpha/ListWebDataStreamsRequest.php deleted file mode 100644 index 047040b23a51..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ListWebDataStreamsRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.analytics.admin.v1alpha.ListWebDataStreamsRequest - */ -class ListWebDataStreamsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent property. - * For example, to list results of web streams under the property with Id - * 123: "properties/123" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $parent = ''; - /** - * 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) - * - * Generated from protobuf field int32 page_size = 2; - */ - private $page_size = 0; - /** - * A page token, received from a previous `ListWebDataStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListWebDataStreams` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - private $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent property. - * For example, to list results of web streams under the property with Id - * 123: "properties/123" - * @type int $page_size - * 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) - * @type string $page_token - * A page token, received from a previous `ListWebDataStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListWebDataStreams` must - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent property. - * For example, to list results of web streams under the property with Id - * 123: "properties/123" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the parent property. - * For example, to list results of web streams under the property with Id - * 123: "properties/123" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - 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) - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * 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) - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListWebDataStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListWebDataStreams` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListWebDataStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListWebDataStreams` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/ListWebDataStreamsResponse.php b/AnalyticsAdmin/src/V1alpha/ListWebDataStreamsResponse.php deleted file mode 100644 index b2b3813d4a34..000000000000 --- a/AnalyticsAdmin/src/V1alpha/ListWebDataStreamsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.analytics.admin.v1alpha.ListWebDataStreamsResponse - */ -class ListWebDataStreamsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Results that matched the filter criteria and were accessible to the caller. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.WebDataStream web_data_streams = 1; - */ - private $web_data_streams; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - private $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\WebDataStream[]|\Google\Protobuf\Internal\RepeatedField $web_data_streams - * Results that matched the filter criteria and were accessible to the caller. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Results that matched the filter criteria and were accessible to the caller. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.WebDataStream web_data_streams = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebDataStreams() - { - return $this->web_data_streams; - } - - /** - * Results that matched the filter criteria and were accessible to the caller. - * - * Generated from protobuf field repeated .google.analytics.admin.v1alpha.WebDataStream web_data_streams = 1; - * @param \Google\Analytics\Admin\V1alpha\WebDataStream[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebDataStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\WebDataStream::class); - $this->web_data_streams = $arr; - - 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. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/MatchingCondition.php b/AnalyticsAdmin/src/V1alpha/MatchingCondition.php index 0e35dc1f7ee4..03a1db1ac1e2 100644 --- a/AnalyticsAdmin/src/V1alpha/MatchingCondition.php +++ b/AnalyticsAdmin/src/V1alpha/MatchingCondition.php @@ -25,13 +25,13 @@ class MatchingCondition extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string field = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $field = ''; + protected $field = ''; /** * Required. The type of comparison to be applied to the value. * * Generated from protobuf field .google.analytics.admin.v1alpha.MatchingCondition.ComparisonType comparison_type = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $comparison_type = 0; + protected $comparison_type = 0; /** * Required. The value being compared against for this condition. The runtime * implementation may perform type coercion of this value to evaluate this @@ -39,7 +39,7 @@ class MatchingCondition extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $value = ''; + protected $value = ''; /** * Whether or not the result of the comparison should be negated. For example, * if `negated` is true, then 'equals' comparisons would function as 'not @@ -47,7 +47,7 @@ class MatchingCondition extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool negated = 4; */ - private $negated = false; + protected $negated = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/MatchingCondition/ComparisonType.php b/AnalyticsAdmin/src/V1alpha/MatchingCondition/ComparisonType.php index 98caa42ead0a..5756e042c813 100644 --- a/AnalyticsAdmin/src/V1alpha/MatchingCondition/ComparisonType.php +++ b/AnalyticsAdmin/src/V1alpha/MatchingCondition/ComparisonType.php @@ -143,6 +143,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComparisonType::class, \Google\Analytics\Admin\V1alpha\MatchingCondition_ComparisonType::class); diff --git a/AnalyticsAdmin/src/V1alpha/MatchingCondition_ComparisonType.php b/AnalyticsAdmin/src/V1alpha/MatchingCondition_ComparisonType.php deleted file mode 100644 index 2286c84c7c87..000000000000 --- a/AnalyticsAdmin/src/V1alpha/MatchingCondition_ComparisonType.php +++ /dev/null @@ -1,16 +0,0 @@ -google.analytics.admin.v1alpha.MaximumUserAccess - */ -class MaximumUserAccess -{ - /** - * Unspecified maximum user access. - * - * Generated from protobuf enum MAXIMUM_USER_ACCESS_UNSPECIFIED = 0; - */ - const MAXIMUM_USER_ACCESS_UNSPECIFIED = 0; - /** - * Firebase users have no access to the Analytics property. - * - * Generated from protobuf enum NO_ACCESS = 1; - */ - const NO_ACCESS = 1; - /** - * Firebase users have Read & Analyze access to the Analytics property. - * - * Generated from protobuf enum READ_AND_ANALYZE = 2; - */ - const READ_AND_ANALYZE = 2; - /** - * Firebase users have edit access to the Analytics property, but may not - * manage the Firebase link. - * - * Generated from protobuf enum EDITOR_WITHOUT_LINK_MANAGEMENT = 3; - */ - const EDITOR_WITHOUT_LINK_MANAGEMENT = 3; - /** - * Firebase users have edit access to the Analytics property and may manage - * the Firebase link. - * - * Generated from protobuf enum EDITOR_INCLUDING_LINK_MANAGEMENT = 4; - */ - const EDITOR_INCLUDING_LINK_MANAGEMENT = 4; - - private static $valueToName = [ - self::MAXIMUM_USER_ACCESS_UNSPECIFIED => 'MAXIMUM_USER_ACCESS_UNSPECIFIED', - self::NO_ACCESS => 'NO_ACCESS', - self::READ_AND_ANALYZE => 'READ_AND_ANALYZE', - self::EDITOR_WITHOUT_LINK_MANAGEMENT => 'EDITOR_WITHOUT_LINK_MANAGEMENT', - self::EDITOR_INCLUDING_LINK_MANAGEMENT => 'EDITOR_INCLUDING_LINK_MANAGEMENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/AnalyticsAdmin/src/V1alpha/MeasurementProtocolSecret.php b/AnalyticsAdmin/src/V1alpha/MeasurementProtocolSecret.php index 53055f1575f4..8c2a728f23d4 100644 --- a/AnalyticsAdmin/src/V1alpha/MeasurementProtocolSecret.php +++ b/AnalyticsAdmin/src/V1alpha/MeasurementProtocolSecret.php @@ -22,13 +22,13 @@ class MeasurementProtocolSecret extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. Human-readable display name for this secret. * * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * 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 @@ -36,7 +36,7 @@ class MeasurementProtocolSecret extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $secret_value = ''; + protected $secret_value = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ParameterMutation.php b/AnalyticsAdmin/src/V1alpha/ParameterMutation.php index 68a3cf2e2872..3cdcaa9dcc3f 100644 --- a/AnalyticsAdmin/src/V1alpha/ParameterMutation.php +++ b/AnalyticsAdmin/src/V1alpha/ParameterMutation.php @@ -26,7 +26,7 @@ class ParameterMutation extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parameter = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $parameter = ''; + protected $parameter = ''; /** * Required. The value mutation to perform. * * Must be less than 100 characters. @@ -37,7 +37,7 @@ class ParameterMutation extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parameter_value = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $parameter_value = ''; + protected $parameter_value = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/PostbackWindow.php b/AnalyticsAdmin/src/V1alpha/PostbackWindow.php index 901e3b882a41..2dabbb8fd24d 100644 --- a/AnalyticsAdmin/src/V1alpha/PostbackWindow.php +++ b/AnalyticsAdmin/src/V1alpha/PostbackWindow.php @@ -35,7 +35,7 @@ class PostbackWindow extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool postback_window_settings_enabled = 2; */ - private $postback_window_settings_enabled = false; + protected $postback_window_settings_enabled = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/Property.php b/AnalyticsAdmin/src/V1alpha/Property.php index b7765c18a0f5..f1d7004f0129 100644 --- a/AnalyticsAdmin/src/V1alpha/Property.php +++ b/AnalyticsAdmin/src/V1alpha/Property.php @@ -22,7 +22,7 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The property type for this Property resource. When creating a * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then @@ -30,19 +30,19 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $property_type = 0; + protected $property_type = 0; /** * Output only. Time when the entity was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. Time when entity payload fields were last updated. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $update_time = null; + protected $update_time = null; /** * Immutable. Resource name of this property's logical parent. * Note: The Property-Moving UI can be used to change the parent. @@ -51,21 +51,21 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $parent = ''; + protected $parent = ''; /** * Required. Human-readable display name for this property. * The max allowed display name length is 100 UTF-16 code units. * * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Industry associated with this property * Example: AUTOMOTIVE, FOOD_AND_DRINK * * Generated from protobuf field .google.analytics.admin.v1alpha.IndustryCategory industry_category = 6; */ - private $industry_category = 0; + protected $industry_category = 0; /** * Required. Reporting Time Zone, used as the day boundary for reports, * regardless of where the data originates. If the time zone honors DST, @@ -77,7 +77,7 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; */ - private $time_zone = ''; + protected $time_zone = ''; /** * The currency type used in reports involving monetary values. * Format: https://en.wikipedia.org/wiki/ISO_4217 @@ -85,21 +85,21 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string currency_code = 8; */ - private $currency_code = ''; + protected $currency_code = ''; /** * Output only. The Google Analytics service level that applies to this * property. * * Generated from protobuf field .google.analytics.admin.v1alpha.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $service_level = 0; + protected $service_level = 0; /** * 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. * * Generated from protobuf field .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $delete_time = null; + protected $delete_time = 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 @@ -107,7 +107,7 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $expire_time = null; + protected $expire_time = null; /** * Immutable. The resource name of the parent account * Format: accounts/{account_id} @@ -115,7 +115,7 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { */ - private $account = ''; + protected $account = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/PropertySummary.php b/AnalyticsAdmin/src/V1alpha/PropertySummary.php index aa9a3ed36010..05311403f27a 100644 --- a/AnalyticsAdmin/src/V1alpha/PropertySummary.php +++ b/AnalyticsAdmin/src/V1alpha/PropertySummary.php @@ -22,19 +22,19 @@ class PropertySummary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string property = 1 [(.google.api.resource_reference) = { */ - private $property = ''; + protected $property = ''; /** * Display name for the property referred to in this property summary. * * Generated from protobuf field string display_name = 2; */ - private $display_name = ''; + protected $display_name = ''; /** * The property's property type. * * Generated from protobuf field .google.analytics.admin.v1alpha.PropertyType property_type = 3; */ - private $property_type = 0; + protected $property_type = 0; /** * Resource name of this property's logical parent. * Note: The Property-Moving UI can be used to change the parent. @@ -43,7 +43,7 @@ class PropertySummary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 4; */ - private $parent = ''; + protected $parent = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketRequest.php b/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketRequest.php index e6c51c6e3327..f1741f8e243e 100644 --- a/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketRequest.php @@ -20,14 +20,14 @@ class ProvisionAccountTicketRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Account account = 1; */ - private $account = null; + protected $account = null; /** * Redirect URI where the user will be sent after accepting Terms of Service. * Must be configured in Cloud Console as a Redirect URI. * * Generated from protobuf field string redirect_uri = 2; */ - private $redirect_uri = ''; + protected $redirect_uri = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketResponse.php b/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketResponse.php index fffcae523931..22408ea9bcb1 100644 --- a/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketResponse.php @@ -20,7 +20,7 @@ class ProvisionAccountTicketResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string account_ticket_id = 1; */ - private $account_ticket_id = ''; + protected $account_ticket_id = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ProvisionSubpropertyRequest.php b/AnalyticsAdmin/src/V1alpha/ProvisionSubpropertyRequest.php index 123ffc61f074..6602ec17d606 100644 --- a/AnalyticsAdmin/src/V1alpha/ProvisionSubpropertyRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ProvisionSubpropertyRequest.php @@ -20,13 +20,13 @@ class ProvisionSubpropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $subproperty = null; + protected $subproperty = null; /** * Optional. The subproperty event filter to create on an ordinary property. * * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $subproperty_event_filter = null; + protected $subproperty_event_filter = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/ProvisionSubpropertyResponse.php b/AnalyticsAdmin/src/V1alpha/ProvisionSubpropertyResponse.php index 943044dface9..bda7be04665e 100644 --- a/AnalyticsAdmin/src/V1alpha/ProvisionSubpropertyResponse.php +++ b/AnalyticsAdmin/src/V1alpha/ProvisionSubpropertyResponse.php @@ -20,13 +20,13 @@ class ProvisionSubpropertyResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Property subproperty = 1; */ - private $subproperty = null; + protected $subproperty = null; /** * The created subproperty event filter. * * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; */ - private $subproperty_event_filter = null; + protected $subproperty_event_filter = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/README.md b/AnalyticsAdmin/src/V1alpha/README.md deleted file mode 100644 index 78997998e862..000000000000 --- a/AnalyticsAdmin/src/V1alpha/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Google Analytics Admin V1alpha generated client for PHP - -### Sample - -```php -require 'vendor/autoload.php'; - -use Google\Analytics\Admin\V1alpha\AnalyticsAdminServiceClient; - -$client = new AnalyticsAdminServiceClient(); - -$accounts = $client->listAccounts(); - -foreach ($accounts as $account) { - print 'Found account: ' . $account->getName() . PHP_EOL; -} -``` diff --git a/AnalyticsAdmin/src/V1alpha/ReorderEventEditRulesRequest.php b/AnalyticsAdmin/src/V1alpha/ReorderEventEditRulesRequest.php index f0d37d212f89..ac1ffe9ac729 100644 --- a/AnalyticsAdmin/src/V1alpha/ReorderEventEditRulesRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ReorderEventEditRulesRequest.php @@ -20,7 +20,7 @@ class ReorderEventEditRulesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. EventEditRule resource names for the specified data stream, in * the needed processing order. All EventEditRules for the stream must be diff --git a/AnalyticsAdmin/src/V1alpha/RollupPropertySourceLink.php b/AnalyticsAdmin/src/V1alpha/RollupPropertySourceLink.php index 47654900a3d6..e947593952ba 100644 --- a/AnalyticsAdmin/src/V1alpha/RollupPropertySourceLink.php +++ b/AnalyticsAdmin/src/V1alpha/RollupPropertySourceLink.php @@ -23,7 +23,7 @@ class RollupPropertySourceLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. Resource name of the source property. * Format: properties/{property_id} @@ -31,7 +31,7 @@ class RollupPropertySourceLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $source_property = ''; + protected $source_property = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/RunAccessReportRequest.php b/AnalyticsAdmin/src/V1alpha/RunAccessReportRequest.php index e86bc7ae3230..63807d0a47dd 100644 --- a/AnalyticsAdmin/src/V1alpha/RunAccessReportRequest.php +++ b/AnalyticsAdmin/src/V1alpha/RunAccessReportRequest.php @@ -26,7 +26,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string entity = 1; */ - private $entity = ''; + protected $entity = ''; /** * The dimensions requested and displayed in the response. Requests are * allowed up to 9 dimensions. @@ -60,7 +60,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessFilterExpression dimension_filter = 5; */ - private $dimension_filter = null; + protected $dimension_filter = null; /** * Metric filters allow you to restrict report response to specific metric * values which match the filter. Metric filters are applied after aggregating @@ -69,7 +69,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessFilterExpression metric_filter = 6; */ - private $metric_filter = null; + protected $metric_filter = null; /** * The row count of the start row. The first row is counted as row 0. If * offset is unspecified, it is treated as 0. If offset is zero, then this @@ -79,7 +79,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int64 offset = 7; */ - private $offset = 0; + protected $offset = 0; /** * The number of rows to return. If unspecified, 10,000 rows are returned. The * API returns a maximum of 100,000 rows per request, no matter how many you @@ -94,7 +94,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int64 limit = 8; */ - private $limit = 0; + protected $limit = 0; /** * This request's time zone if specified. If unspecified, the property's time * zone is used. The request's time zone is used to interpret the start & end @@ -105,7 +105,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string time_zone = 9; */ - private $time_zone = ''; + protected $time_zone = ''; /** * Specifies how rows are ordered in the response. * @@ -119,7 +119,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool return_entity_quota = 11; */ - private $return_entity_quota = false; + protected $return_entity_quota = false; /** * Optional. Determines whether to include users who have never made an API * call in the response. If true, all users with access to the specified @@ -129,7 +129,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool include_all_users = 12 [(.google.api.field_behavior) = OPTIONAL]; */ - private $include_all_users = false; + protected $include_all_users = false; /** * Optional. Decides whether to return the users within user groups. This * field works only when include_all_users is set to true. If true, it will @@ -138,7 +138,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool expand_groups = 13 [(.google.api.field_behavior) = OPTIONAL]; */ - private $expand_groups = false; + protected $expand_groups = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/RunAccessReportResponse.php b/AnalyticsAdmin/src/V1alpha/RunAccessReportResponse.php index d957fc761ac8..1817890154d9 100644 --- a/AnalyticsAdmin/src/V1alpha/RunAccessReportResponse.php +++ b/AnalyticsAdmin/src/V1alpha/RunAccessReportResponse.php @@ -48,14 +48,14 @@ class RunAccessReportResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 row_count = 4; */ - private $row_count = 0; + protected $row_count = 0; /** * The quota state for this Analytics property including this request. This * field doesn't work with account-level requests. * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessQuota quota = 5; */ - private $quota = null; + protected $quota = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/SKAdNetworkConversionValueSchema.php b/AnalyticsAdmin/src/V1alpha/SKAdNetworkConversionValueSchema.php index a46b25f95b77..23b7b418dd4d 100644 --- a/AnalyticsAdmin/src/V1alpha/SKAdNetworkConversionValueSchema.php +++ b/AnalyticsAdmin/src/V1alpha/SKAdNetworkConversionValueSchema.php @@ -23,7 +23,7 @@ class SKAdNetworkConversionValueSchema extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. The conversion value settings for the first postback window. * These differ from values for postback window two and three in that they @@ -33,7 +33,7 @@ class SKAdNetworkConversionValueSchema extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.PostbackWindow postback_window_one = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $postback_window_one = null; + protected $postback_window_one = null; /** * The conversion value settings for the second postback window. * This field should only be configured if there is a need to define different @@ -43,7 +43,7 @@ class SKAdNetworkConversionValueSchema extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.PostbackWindow postback_window_two = 3; */ - private $postback_window_two = null; + protected $postback_window_two = null; /** * The conversion value settings for the third postback window. * This field should only be set if the user chose to define different @@ -54,7 +54,7 @@ class SKAdNetworkConversionValueSchema extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.PostbackWindow postback_window_three = 4; */ - private $postback_window_three = null; + protected $postback_window_three = null; /** * If enabled, the GA SDK will set conversion values using this schema * definition, and schema will be exported to any Google Ads accounts linked @@ -63,7 +63,7 @@ class SKAdNetworkConversionValueSchema extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool apply_conversion_values = 5; */ - private $apply_conversion_values = false; + protected $apply_conversion_values = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/SearchAds360Link.php b/AnalyticsAdmin/src/V1alpha/SearchAds360Link.php index b09413b63a7e..3861de1b8129 100644 --- a/AnalyticsAdmin/src/V1alpha/SearchAds360Link.php +++ b/AnalyticsAdmin/src/V1alpha/SearchAds360Link.php @@ -22,14 +22,14 @@ class SearchAds360Link extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. This field represents the Advertiser ID of the Search Ads 360 * Advertiser. that has been linked. * * Generated from protobuf field string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $advertiser_id = ''; + protected $advertiser_id = ''; /** * Immutable. Enables the import of campaign data from Search Ads 360 into the * GA4 property. After link creation, this can only be updated from the Search @@ -38,7 +38,7 @@ class SearchAds360Link extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.BoolValue campaign_data_sharing_enabled = 3 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $campaign_data_sharing_enabled = null; + protected $campaign_data_sharing_enabled = null; /** * Immutable. Enables the import of cost data from Search Ads 360 to the GA4 * property. This can only be enabled if campaign_data_sharing_enabled is @@ -48,28 +48,28 @@ class SearchAds360Link extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.BoolValue cost_data_sharing_enabled = 4 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $cost_data_sharing_enabled = null; + protected $cost_data_sharing_enabled = null; /** * Output only. The display name of the Search Ads 360 Advertiser. * Allows users to easily identify the linked resource. * * Generated from protobuf field string advertiser_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $advertiser_display_name = ''; + protected $advertiser_display_name = ''; /** * Enables personalized advertising features with this integration. * If this field is not set on create, it will be defaulted to true. * * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 6; */ - private $ads_personalization_enabled = null; + protected $ads_personalization_enabled = null; /** * Enables export of site stats with this integration. * If this field is not set on create, it will be defaulted to true. * * Generated from protobuf field .google.protobuf.BoolValue site_stats_sharing_enabled = 7; */ - private $site_stats_sharing_enabled = null; + protected $site_stats_sharing_enabled = null; /** * Constructor. @@ -204,7 +204,7 @@ public function clearCampaignDataSharingEnabled() * Generated from protobuf field .google.protobuf.BoolValue campaign_data_sharing_enabled = 3 [(.google.api.field_behavior) = IMMUTABLE]; * @return bool|null */ - public function getCampaignDataSharingEnabledValue() + public function getCampaignDataSharingEnabledUnwrapped() { return $this->readWrapperValue("campaign_data_sharing_enabled"); } @@ -239,7 +239,7 @@ public function setCampaignDataSharingEnabled($var) * @param bool|null $var * @return $this */ - public function setCampaignDataSharingEnabledValue($var) + public function setCampaignDataSharingEnabledUnwrapped($var) { $this->writeWrapperValue("campaign_data_sharing_enabled", $var); return $this;} @@ -281,7 +281,7 @@ public function clearCostDataSharingEnabled() * Generated from protobuf field .google.protobuf.BoolValue cost_data_sharing_enabled = 4 [(.google.api.field_behavior) = IMMUTABLE]; * @return bool|null */ - public function getCostDataSharingEnabledValue() + public function getCostDataSharingEnabledUnwrapped() { return $this->readWrapperValue("cost_data_sharing_enabled"); } @@ -318,7 +318,7 @@ public function setCostDataSharingEnabled($var) * @param bool|null $var * @return $this */ - public function setCostDataSharingEnabledValue($var) + public function setCostDataSharingEnabledUnwrapped($var) { $this->writeWrapperValue("cost_data_sharing_enabled", $var); return $this;} @@ -382,7 +382,7 @@ public function clearAdsPersonalizationEnabled() * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 6; * @return bool|null */ - public function getAdsPersonalizationEnabledValue() + public function getAdsPersonalizationEnabledUnwrapped() { return $this->readWrapperValue("ads_personalization_enabled"); } @@ -413,7 +413,7 @@ public function setAdsPersonalizationEnabled($var) * @param bool|null $var * @return $this */ - public function setAdsPersonalizationEnabledValue($var) + public function setAdsPersonalizationEnabledUnwrapped($var) { $this->writeWrapperValue("ads_personalization_enabled", $var); return $this;} @@ -449,7 +449,7 @@ public function clearSiteStatsSharingEnabled() * Generated from protobuf field .google.protobuf.BoolValue site_stats_sharing_enabled = 7; * @return bool|null */ - public function getSiteStatsSharingEnabledValue() + public function getSiteStatsSharingEnabledUnwrapped() { return $this->readWrapperValue("site_stats_sharing_enabled"); } @@ -480,7 +480,7 @@ public function setSiteStatsSharingEnabled($var) * @param bool|null $var * @return $this */ - public function setSiteStatsSharingEnabledValue($var) + public function setSiteStatsSharingEnabledUnwrapped($var) { $this->writeWrapperValue("site_stats_sharing_enabled", $var); return $this;} diff --git a/AnalyticsAdmin/src/V1alpha/SearchChangeHistoryEventsRequest.php b/AnalyticsAdmin/src/V1alpha/SearchChangeHistoryEventsRequest.php index 71d8b8185a98..a6289173d9c9 100644 --- a/AnalyticsAdmin/src/V1alpha/SearchChangeHistoryEventsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/SearchChangeHistoryEventsRequest.php @@ -22,7 +22,7 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $account = ''; + protected $account = ''; /** * Optional. Resource name for a child property. If set, only return changes * made to this property or its child resources. @@ -31,7 +31,7 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ - private $property = ''; + protected $property = ''; /** * Optional. If set, only return changes if they are for a resource that * matches at least one of these types. @@ -58,13 +58,13 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private $earliest_change_time = null; + protected $earliest_change_time = null; /** * Optional. If set, only return changes made before this time (inclusive). * * Generated from protobuf field .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - private $latest_change_time = null; + protected $latest_change_time = null; /** * Optional. The maximum number of ChangeHistoryEvent items to return. * The service may return fewer than this value, even if there are additional @@ -73,7 +73,7 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 8 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_size = 0; + protected $page_size = 0; /** * Optional. A page token, received from a previous * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent @@ -83,7 +83,7 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 9 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_token = ''; + protected $page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/SearchChangeHistoryEventsResponse.php b/AnalyticsAdmin/src/V1alpha/SearchChangeHistoryEventsResponse.php index 3e240d6d1cde..d26a3e0bd325 100644 --- a/AnalyticsAdmin/src/V1alpha/SearchChangeHistoryEventsResponse.php +++ b/AnalyticsAdmin/src/V1alpha/SearchChangeHistoryEventsResponse.php @@ -27,7 +27,7 @@ class SearchChangeHistoryEventsResponse extends \Google\Protobuf\Internal\Messag * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/SetAutomatedGa4ConfigurationOptOutRequest.php b/AnalyticsAdmin/src/V1alpha/SetAutomatedGa4ConfigurationOptOutRequest.php index 64cd7327ad65..0dd8afa71817 100644 --- a/AnalyticsAdmin/src/V1alpha/SetAutomatedGa4ConfigurationOptOutRequest.php +++ b/AnalyticsAdmin/src/V1alpha/SetAutomatedGa4ConfigurationOptOutRequest.php @@ -23,13 +23,13 @@ class SetAutomatedGa4ConfigurationOptOutRequest extends \Google\Protobuf\Interna * * Generated from protobuf field string property = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $property = ''; + protected $property = ''; /** * The status to set. * * Generated from protobuf field bool opt_out = 2; */ - private $opt_out = false; + protected $opt_out = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilter.php b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilter.php index d74fc43d4f2c..0dbeeb33e198 100644 --- a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilter.php +++ b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilter.php @@ -22,13 +22,13 @@ class SubpropertyEventFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. Resource name of the Subproperty that uses this filter. * * Generated from protobuf field optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $apply_to_property = null; + protected $apply_to_property = null; /** * Required. Unordered list. Filter clauses that define the * SubpropertyEventFilter. All clauses are AND'ed together to determine what diff --git a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterClause.php b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterClause.php index d6a41038a0bd..6b72ca9d1f44 100644 --- a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterClause.php +++ b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterClause.php @@ -23,14 +23,14 @@ class SubpropertyEventFilterClause extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $filter_clause_type = 0; + protected $filter_clause_type = 0; /** * Required. The logical expression for what events are sent to the * subproperty. * * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $filter_expression = null; + protected $filter_expression = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterClause/FilterClauseType.php b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterClause/FilterClauseType.php index 51d997db1a75..7675ae7cddab 100644 --- a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterClause/FilterClauseType.php +++ b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterClause/FilterClauseType.php @@ -64,6 +64,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FilterClauseType::class, \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterClause_FilterClauseType::class); diff --git a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition.php b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition.php index a71098593ff9..ddec2d765ae3 100644 --- a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition.php +++ b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition.php @@ -20,7 +20,7 @@ class SubpropertyEventFilterCondition extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $field_name = ''; + protected $field_name = ''; protected $one_filter; /** diff --git a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition/StringFilter.php b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition/StringFilter.php index c7e1c7bfe983..6cd750de9e5d 100644 --- a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition/StringFilter.php +++ b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition/StringFilter.php @@ -20,20 +20,20 @@ class StringFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $match_type = 0; + protected $match_type = 0; /** * Required. The string value used for the matching. * * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $value = ''; + protected $value = ''; /** * Optional. If true, the string value is case sensitive. If false, the * match is case-insensitive. * * Generated from protobuf field bool case_sensitive = 3 [(.google.api.field_behavior) = OPTIONAL]; */ - private $case_sensitive = false; + protected $case_sensitive = false; /** * Constructor. @@ -137,6 +137,4 @@ public function setCaseSensitive($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StringFilter::class, \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterCondition_StringFilter::class); diff --git a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition/StringFilter/MatchType.php b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition/StringFilter/MatchType.php index 797642e0b851..b666568a0a0a 100644 --- a/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition/StringFilter/MatchType.php +++ b/AnalyticsAdmin/src/V1alpha/SubpropertyEventFilterCondition/StringFilter/MatchType.php @@ -87,6 +87,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MatchType::class, \Google\Analytics\Admin\V1alpha\SubpropertyEventFilterCondition_StringFilter_MatchType::class); diff --git a/AnalyticsAdmin/src/V1alpha/UpdateAccessBindingRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateAccessBindingRequest.php index 3dc59dc603f7..703f9a10e407 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateAccessBindingRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateAccessBindingRequest.php @@ -20,7 +20,7 @@ class UpdateAccessBindingRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessBinding access_binding = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $access_binding = null; + protected $access_binding = null; /** * @param \Google\Analytics\Admin\V1alpha\AccessBinding $accessBinding Required. The access binding to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateAccountRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateAccountRequest.php index cc74d6014c5b..a925a866ced4 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateAccountRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateAccountRequest.php @@ -21,7 +21,7 @@ class UpdateAccountRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $account = null; + protected $account = null; /** * Required. The list of fields to be updated. Field names must be in snake * case (for example, "field_to_update"). Omitted fields will not be updated. @@ -30,7 +30,7 @@ class UpdateAccountRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\Account $account Required. The account to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateAndroidAppDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateAndroidAppDataStreamRequest.php deleted file mode 100644 index c9695464283f..000000000000 --- a/AnalyticsAdmin/src/V1alpha/UpdateAndroidAppDataStreamRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.analytics.admin.v1alpha.UpdateAndroidAppDataStreamRequest - */ -class UpdateAndroidAppDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The android app stream to update. - * The `name` field is used to identify the android app stream to be updated. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.AndroidAppDataStream android_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $android_app_data_stream = 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\AndroidAppDataStream $android_app_data_stream - * Required. The android app stream to update. - * The `name` field is used to identify the android app stream to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The android app stream to update. - * The `name` field is used to identify the android app stream to be updated. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.AndroidAppDataStream android_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\AndroidAppDataStream|null - */ - public function getAndroidAppDataStream() - { - return $this->android_app_data_stream; - } - - public function hasAndroidAppDataStream() - { - return isset($this->android_app_data_stream); - } - - public function clearAndroidAppDataStream() - { - unset($this->android_app_data_stream); - } - - /** - * Required. The android app stream to update. - * The `name` field is used to identify the android app stream to be updated. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.AndroidAppDataStream android_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\AndroidAppDataStream $var - * @return $this - */ - public function setAndroidAppDataStream($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\AndroidAppDataStream::class); - $this->android_app_data_stream = $var; - - 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/UpdateAttributionSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateAttributionSettingsRequest.php index 0ff3ae8f05f9..9ba0cbd25641 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateAttributionSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateAttributionSettingsRequest.php @@ -21,7 +21,7 @@ class UpdateAttributionSettingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.AttributionSettings attribution_settings = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $attribution_settings = null; + protected $attribution_settings = 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 @@ -30,7 +30,7 @@ class UpdateAttributionSettingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\AttributionSettings $attributionSettings Required. The attribution settings to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateAudienceRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateAudienceRequest.php index fded0c6f6e53..b47a66d82822 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateAudienceRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateAudienceRequest.php @@ -21,7 +21,7 @@ class UpdateAudienceRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Audience audience = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $audience = null; + protected $audience = 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 @@ -30,7 +30,7 @@ class UpdateAudienceRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\Audience $audience Required. The audience to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateBigQueryLinkRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateBigQueryLinkRequest.php index 784764222def..70353be2ca57 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateBigQueryLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateBigQueryLinkRequest.php @@ -21,7 +21,7 @@ class UpdateBigQueryLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.BigQueryLink bigquery_link = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $bigquery_link = null; + protected $bigquery_link = 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 @@ -30,7 +30,7 @@ class UpdateBigQueryLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\BigQueryLink $bigqueryLink Required. The settings to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateCalculatedMetricRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateCalculatedMetricRequest.php index ad598117c10c..e255738be0c2 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateCalculatedMetricRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateCalculatedMetricRequest.php @@ -20,7 +20,7 @@ class UpdateCalculatedMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.CalculatedMetric calculated_metric = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $calculated_metric = null; + protected $calculated_metric = 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 @@ -28,7 +28,7 @@ class UpdateCalculatedMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\CalculatedMetric $calculatedMetric Required. The CalculatedMetric to update diff --git a/AnalyticsAdmin/src/V1alpha/UpdateChannelGroupRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateChannelGroupRequest.php index 455b8cd733ef..e87b4c86f25c 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateChannelGroupRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateChannelGroupRequest.php @@ -22,7 +22,7 @@ class UpdateChannelGroupRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.ChannelGroup channel_group = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $channel_group = null; + protected $channel_group = 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 @@ -31,7 +31,7 @@ class UpdateChannelGroupRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\ChannelGroup $channelGroup Required. The ChannelGroup to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateConversionEventRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateConversionEventRequest.php index 8874faa2b810..b3fb1ab8cc6a 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateConversionEventRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateConversionEventRequest.php @@ -21,7 +21,7 @@ class UpdateConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $conversion_event = null; + protected $conversion_event = 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 @@ -30,7 +30,7 @@ class UpdateConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\ConversionEvent $conversionEvent Required. The conversion event to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateCustomDimensionRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateCustomDimensionRequest.php index cabd25d72b5b..9969ffc83ba4 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateCustomDimensionRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateCustomDimensionRequest.php @@ -20,7 +20,7 @@ class UpdateCustomDimensionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.CustomDimension custom_dimension = 1; */ - private $custom_dimension = null; + protected $custom_dimension = 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 @@ -28,7 +28,7 @@ class UpdateCustomDimensionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\CustomDimension $customDimension The CustomDimension to update diff --git a/AnalyticsAdmin/src/V1alpha/UpdateCustomMetricRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateCustomMetricRequest.php index 1456897b6c98..ffc2ef443b16 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateCustomMetricRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateCustomMetricRequest.php @@ -20,7 +20,7 @@ class UpdateCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.CustomMetric custom_metric = 1; */ - private $custom_metric = null; + protected $custom_metric = 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 @@ -28,7 +28,7 @@ class UpdateCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\CustomMetric $customMetric The CustomMetric to update diff --git a/AnalyticsAdmin/src/V1alpha/UpdateDataRedactionSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateDataRedactionSettingsRequest.php index 60e755e6a675..90c4fe834725 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateDataRedactionSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateDataRedactionSettingsRequest.php @@ -21,7 +21,7 @@ class UpdateDataRedactionSettingsRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $data_redaction_settings = null; + protected $data_redaction_settings = 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 @@ -30,7 +30,7 @@ class UpdateDataRedactionSettingsRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\DataRedactionSettings $dataRedactionSettings Required. The settings to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateDataRetentionSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateDataRetentionSettingsRequest.php index c01ad3c0c296..271212d6515c 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateDataRetentionSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateDataRetentionSettingsRequest.php @@ -21,7 +21,7 @@ class UpdateDataRetentionSettingsRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field .google.analytics.admin.v1alpha.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $data_retention_settings = null; + protected $data_retention_settings = 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 @@ -30,7 +30,7 @@ class UpdateDataRetentionSettingsRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\DataRetentionSettings $dataRetentionSettings Required. The settings to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateDataStreamRequest.php index fd8e404c9ed1..300412851b61 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateDataStreamRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateDataStreamRequest.php @@ -20,7 +20,7 @@ class UpdateDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.DataStream data_stream = 1; */ - private $data_stream = null; + protected $data_stream = 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 @@ -28,7 +28,7 @@ class UpdateDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\DataStream $dataStream The DataStream to update diff --git a/AnalyticsAdmin/src/V1alpha/UpdateDisplayVideo360AdvertiserLinkRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateDisplayVideo360AdvertiserLinkRequest.php index e4721318ea45..2bfc911cb99f 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateDisplayVideo360AdvertiserLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateDisplayVideo360AdvertiserLinkRequest.php @@ -20,7 +20,7 @@ class UpdateDisplayVideo360AdvertiserLinkRequest extends \Google\Protobuf\Intern * * Generated from protobuf field .google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink display_video_360_advertiser_link = 1; */ - private $display_video_360_advertiser_link = null; + protected $display_video_360_advertiser_link = 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 @@ -28,7 +28,7 @@ class UpdateDisplayVideo360AdvertiserLinkRequest extends \Google\Protobuf\Intern * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLink $displayVideo360AdvertiserLink The DisplayVideo360AdvertiserLink to update diff --git a/AnalyticsAdmin/src/V1alpha/UpdateEnhancedMeasurementSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateEnhancedMeasurementSettingsRequest.php index 77168d13cd94..45f8e6b8639c 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateEnhancedMeasurementSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateEnhancedMeasurementSettingsRequest.php @@ -21,7 +21,7 @@ class UpdateEnhancedMeasurementSettingsRequest extends \Google\Protobuf\Internal * * Generated from protobuf field .google.analytics.admin.v1alpha.EnhancedMeasurementSettings enhanced_measurement_settings = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $enhanced_measurement_settings = null; + protected $enhanced_measurement_settings = 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 @@ -30,7 +30,7 @@ class UpdateEnhancedMeasurementSettingsRequest extends \Google\Protobuf\Internal * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings $enhancedMeasurementSettings Required. The settings to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateEventCreateRuleRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateEventCreateRuleRequest.php index bd1261c8cae5..290a939cfa3c 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateEventCreateRuleRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateEventCreateRuleRequest.php @@ -22,7 +22,7 @@ class UpdateEventCreateRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.EventCreateRule event_create_rule = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $event_create_rule = null; + protected $event_create_rule = 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 @@ -31,7 +31,7 @@ class UpdateEventCreateRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\EventCreateRule $eventCreateRule Required. The EventCreateRule to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateEventEditRuleRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateEventEditRuleRequest.php index b5eb0eba669b..807ad7d6f3ed 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateEventEditRuleRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateEventEditRuleRequest.php @@ -22,7 +22,7 @@ class UpdateEventEditRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.EventEditRule event_edit_rule = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $event_edit_rule = null; + protected $event_edit_rule = 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 @@ -31,7 +31,7 @@ class UpdateEventEditRuleRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\EventEditRule $eventEditRule Required. The EventEditRule to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateExpandedDataSetRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateExpandedDataSetRequest.php index 44a205fa0ef0..f313b97f288e 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateExpandedDataSetRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateExpandedDataSetRequest.php @@ -22,7 +22,7 @@ class UpdateExpandedDataSetRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.ExpandedDataSet expanded_data_set = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $expanded_data_set = null; + protected $expanded_data_set = 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 @@ -31,7 +31,7 @@ class UpdateExpandedDataSetRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\ExpandedDataSet $expandedDataSet Required. The ExpandedDataSet to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateFirebaseLinkRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateFirebaseLinkRequest.php deleted file mode 100644 index ec97fe2f87b5..000000000000 --- a/AnalyticsAdmin/src/V1alpha/UpdateFirebaseLinkRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.analytics.admin.v1alpha.UpdateFirebaseLinkRequest - */ -class UpdateFirebaseLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Firebase link to update. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.FirebaseLink firebase_link = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $firebase_link = 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\FirebaseLink $firebase_link - * Required. The Firebase link to update. - * @type \Google\Protobuf\FieldMask $update_mask - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Firebase link to update. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.FirebaseLink firebase_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\FirebaseLink|null - */ - public function getFirebaseLink() - { - return isset($this->firebase_link) ? $this->firebase_link : null; - } - - public function hasFirebaseLink() - { - return isset($this->firebase_link); - } - - public function clearFirebaseLink() - { - unset($this->firebase_link); - } - - /** - * Required. The Firebase link to update. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.FirebaseLink firebase_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\FirebaseLink $var - * @return $this - */ - public function setFirebaseLink($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\FirebaseLink::class); - $this->firebase_link = $var; - - 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return isset($this->update_mask) ? $this->update_mask : null; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/UpdateGoogleAdsLinkRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateGoogleAdsLinkRequest.php index 378a70416329..a9c80b56b789 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateGoogleAdsLinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateGoogleAdsLinkRequest.php @@ -20,7 +20,7 @@ class UpdateGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.GoogleAdsLink google_ads_link = 1; */ - private $google_ads_link = null; + protected $google_ads_link = 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 @@ -29,7 +29,7 @@ class UpdateGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\GoogleAdsLink $googleAdsLink The GoogleAdsLink to update diff --git a/AnalyticsAdmin/src/V1alpha/UpdateGoogleSignalsSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateGoogleSignalsSettingsRequest.php index 5e4d494cf50a..b8db45e5ea71 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateGoogleSignalsSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateGoogleSignalsSettingsRequest.php @@ -21,7 +21,7 @@ class UpdateGoogleSignalsSettingsRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field .google.analytics.admin.v1alpha.GoogleSignalsSettings google_signals_settings = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $google_signals_settings = null; + protected $google_signals_settings = 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 @@ -30,7 +30,7 @@ class UpdateGoogleSignalsSettingsRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\GoogleSignalsSettings $googleSignalsSettings Required. The settings to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateIosAppDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateIosAppDataStreamRequest.php deleted file mode 100644 index 68358307a86c..000000000000 --- a/AnalyticsAdmin/src/V1alpha/UpdateIosAppDataStreamRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.analytics.admin.v1alpha.UpdateIosAppDataStreamRequest - */ -class UpdateIosAppDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The iOS app stream to update. - * The `name` field is used to identify the iOS app stream to be updated. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.IosAppDataStream ios_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $ios_app_data_stream = 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\IosAppDataStream $ios_app_data_stream - * Required. The iOS app stream to update. - * The `name` field is used to identify the iOS app stream to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The iOS app stream to update. - * The `name` field is used to identify the iOS app stream to be updated. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.IosAppDataStream ios_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\IosAppDataStream|null - */ - public function getIosAppDataStream() - { - return $this->ios_app_data_stream; - } - - public function hasIosAppDataStream() - { - return isset($this->ios_app_data_stream); - } - - public function clearIosAppDataStream() - { - unset($this->ios_app_data_stream); - } - - /** - * Required. The iOS app stream to update. - * The `name` field is used to identify the iOS app stream to be updated. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.IosAppDataStream ios_app_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\IosAppDataStream $var - * @return $this - */ - public function setIosAppDataStream($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\IosAppDataStream::class); - $this->ios_app_data_stream = $var; - - 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/UpdateKeyEventRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateKeyEventRequest.php index 5f32240b89e4..3b2c09343dfe 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateKeyEventRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateKeyEventRequest.php @@ -21,7 +21,7 @@ class UpdateKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.KeyEvent key_event = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $key_event = null; + protected $key_event = 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 @@ -30,7 +30,7 @@ class UpdateKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\KeyEvent $keyEvent Required. The Key Event to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateMeasurementProtocolSecretRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateMeasurementProtocolSecretRequest.php index 6b02f907dd2c..f5debcd30595 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateMeasurementProtocolSecretRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateMeasurementProtocolSecretRequest.php @@ -20,14 +20,14 @@ class UpdateMeasurementProtocolSecretRequest extends \Google\Protobuf\Internal\M * * Generated from protobuf field .google.analytics.admin.v1alpha.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $measurement_protocol_secret = null; + protected $measurement_protocol_secret = null; /** * Required. The list of fields to be updated. Omitted fields will not be * updated. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\MeasurementProtocolSecret $measurementProtocolSecret Required. The measurement protocol secret to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdatePropertyRequest.php b/AnalyticsAdmin/src/V1alpha/UpdatePropertyRequest.php index fe06698c0e12..b2bda9b05c60 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdatePropertyRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdatePropertyRequest.php @@ -22,7 +22,7 @@ class UpdatePropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $property = null; + protected $property = 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 @@ -31,7 +31,7 @@ class UpdatePropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\Property $property Required. The property to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateSKAdNetworkConversionValueSchemaRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateSKAdNetworkConversionValueSchemaRequest.php index b2065ec64dff..c7993c2b69ac 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateSKAdNetworkConversionValueSchemaRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateSKAdNetworkConversionValueSchemaRequest.php @@ -20,14 +20,14 @@ class UpdateSKAdNetworkConversionValueSchemaRequest extends \Google\Protobuf\Int * * Generated from protobuf field .google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema skadnetwork_conversion_value_schema = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $skadnetwork_conversion_value_schema = null; + protected $skadnetwork_conversion_value_schema = null; /** * Required. The list of fields to be updated. Omitted fields will not be * updated. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\SKAdNetworkConversionValueSchema $skadnetworkConversionValueSchema Required. SKAdNetwork conversion value schema to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateSearchAds360LinkRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateSearchAds360LinkRequest.php index 4c41905e545b..51802652a25a 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateSearchAds360LinkRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateSearchAds360LinkRequest.php @@ -20,7 +20,7 @@ class UpdateSearchAds360LinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1alpha.SearchAds360Link search_ads_360_link = 1; */ - private $search_ads_360_link = null; + protected $search_ads_360_link = 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 @@ -28,7 +28,7 @@ class UpdateSearchAds360LinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\SearchAds360Link $searchAds360Link The SearchAds360Link to update diff --git a/AnalyticsAdmin/src/V1alpha/UpdateSubpropertyEventFilterRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateSubpropertyEventFilterRequest.php index 8653fe665548..e24ad736c9a4 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateSubpropertyEventFilterRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateSubpropertyEventFilterRequest.php @@ -20,7 +20,7 @@ class UpdateSubpropertyEventFilterRequest extends \Google\Protobuf\Internal\Mess * * Generated from protobuf field .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $subproperty_event_filter = null; + protected $subproperty_event_filter = null; /** * Required. The list of fields to update. Field names must be in snake case * (for example, "field_to_update"). Omitted fields will not be updated. To @@ -29,7 +29,7 @@ class UpdateSubpropertyEventFilterRequest extends \Google\Protobuf\Internal\Mess * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1alpha\SubpropertyEventFilter $subpropertyEventFilter Required. The subproperty event filter to update. diff --git a/AnalyticsAdmin/src/V1alpha/UpdateUserLinkRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateUserLinkRequest.php deleted file mode 100644 index d70a336389fe..000000000000 --- a/AnalyticsAdmin/src/V1alpha/UpdateUserLinkRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.analytics.admin.v1alpha.UpdateUserLinkRequest - */ -class UpdateUserLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The user link to update. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $user_link = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\UserLink $user_link - * Required. The user link to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The user link to update. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\UserLink|null - */ - public function getUserLink() - { - return $this->user_link; - } - - public function hasUserLink() - { - return isset($this->user_link); - } - - public function clearUserLink() - { - unset($this->user_link); - } - - /** - * Required. The user link to update. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\UserLink $var - * @return $this - */ - public function setUserLink($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\UserLink::class); - $this->user_link = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/UpdateWebDataStreamRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateWebDataStreamRequest.php deleted file mode 100644 index bd8759899311..000000000000 --- a/AnalyticsAdmin/src/V1alpha/UpdateWebDataStreamRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.analytics.admin.v1alpha.UpdateWebDataStreamRequest - */ -class UpdateWebDataStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The web stream to update. - * The `name` field is used to identify the web stream to be updated. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.WebDataStream web_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $web_data_stream = 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Analytics\Admin\V1alpha\WebDataStream $web_data_stream - * Required. The web stream to update. - * The `name` field is used to identify the web stream to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The web stream to update. - * The `name` field is used to identify the web stream to be updated. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.WebDataStream web_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Analytics\Admin\V1alpha\WebDataStream|null - */ - public function getWebDataStream() - { - return $this->web_data_stream; - } - - public function hasWebDataStream() - { - return isset($this->web_data_stream); - } - - public function clearWebDataStream() - { - unset($this->web_data_stream); - } - - /** - * Required. The web stream to update. - * The `name` field is used to identify the web stream to be updated. - * - * Generated from protobuf field .google.analytics.admin.v1alpha.WebDataStream web_data_stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Analytics\Admin\V1alpha\WebDataStream $var - * @return $this - */ - public function setWebDataStream($var) - { - GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\WebDataStream::class); - $this->web_data_stream = $var; - - 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/UserLink.php b/AnalyticsAdmin/src/V1alpha/UserLink.php deleted file mode 100644 index 793f119bbdad..000000000000 --- a/AnalyticsAdmin/src/V1alpha/UserLink.php +++ /dev/null @@ -1,180 +0,0 @@ -google.analytics.admin.v1alpha.UserLink - */ -class UserLink extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Example format: properties/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $name = ''; - /** - * Immutable. Email address of the user to link - * - * Generated from protobuf field string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - private $email_address = ''; - /** - * Roles directly assigned to this user for this account or property. - * Valid values: - * predefinedRoles/viewer - * predefinedRoles/analyst - * predefinedRoles/editor - * predefinedRoles/admin - * predefinedRoles/no-cost-data - * predefinedRoles/no-revenue-data - * Excludes roles that are inherited from a higher-level entity, group, - * or organization admin role. - * A UserLink that is updated to have an empty list of direct_roles will be - * deleted. - * - * Generated from protobuf field repeated string direct_roles = 3; - */ - private $direct_roles; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Example format: properties/1234/userLinks/5678 - * @type string $email_address - * Immutable. Email address of the user to link - * @type array|\Google\Protobuf\Internal\RepeatedField $direct_roles - * Roles directly assigned to this user for this account or property. - * Valid values: - * predefinedRoles/viewer - * predefinedRoles/analyst - * predefinedRoles/editor - * predefinedRoles/admin - * predefinedRoles/no-cost-data - * predefinedRoles/no-revenue-data - * Excludes roles that are inherited from a higher-level entity, group, - * or organization admin role. - * A UserLink that is updated to have an empty list of direct_roles will be - * deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Example format: properties/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Example format: properties/1234/userLinks/5678 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. Email address of the user to link - * - * Generated from protobuf field string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getEmailAddress() - { - return $this->email_address; - } - - /** - * Immutable. Email address of the user to link - * - * Generated from protobuf field string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setEmailAddress($var) - { - GPBUtil::checkString($var, True); - $this->email_address = $var; - - return $this; - } - - /** - * Roles directly assigned to this user for this account or property. - * Valid values: - * predefinedRoles/viewer - * predefinedRoles/analyst - * predefinedRoles/editor - * predefinedRoles/admin - * predefinedRoles/no-cost-data - * predefinedRoles/no-revenue-data - * Excludes roles that are inherited from a higher-level entity, group, - * or organization admin role. - * A UserLink that is updated to have an empty list of direct_roles will be - * deleted. - * - * Generated from protobuf field repeated string direct_roles = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDirectRoles() - { - return $this->direct_roles; - } - - /** - * Roles directly assigned to this user for this account or property. - * Valid values: - * predefinedRoles/viewer - * predefinedRoles/analyst - * predefinedRoles/editor - * predefinedRoles/admin - * predefinedRoles/no-cost-data - * predefinedRoles/no-revenue-data - * Excludes roles that are inherited from a higher-level entity, group, - * or organization admin role. - * A UserLink that is updated to have an empty list of direct_roles will be - * deleted. - * - * Generated from protobuf field repeated string direct_roles = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDirectRoles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->direct_roles = $arr; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1alpha/WebDataStream.php b/AnalyticsAdmin/src/V1alpha/WebDataStream.php deleted file mode 100644 index 7c8a30c5b325..000000000000 --- a/AnalyticsAdmin/src/V1alpha/WebDataStream.php +++ /dev/null @@ -1,315 +0,0 @@ -google.analytics.admin.v1alpha.WebDataStream - */ -class WebDataStream extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/1000/webDataStreams/2000" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $name = ''; - /** - * Output only. Analytics "Measurement ID", without the "G-" prefix. - * Example: "G-1A2BCD345E" would just be "1A2BCD345E" - * - * Generated from protobuf field string measurement_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $measurement_id = ''; - /** - * Output only. ID of the corresponding web app in Firebase, if any. - * This ID can change if the web app is deleted and recreated. - * - * Generated from protobuf field string firebase_app_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $firebase_app_id = ''; - /** - * Output only. Time when this stream was originally created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $create_time = null; - /** - * Output only. Time when stream payload fields were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $update_time = null; - /** - * Immutable. Domain name of the web app being measured, or empty. - * Example: "http://www.google.com", "https://www.google.com" - * - * Generated from protobuf field string default_uri = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - private $default_uri = ''; - /** - * Required. Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - private $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/1000/webDataStreams/2000" - * @type string $measurement_id - * Output only. Analytics "Measurement ID", without the "G-" prefix. - * Example: "G-1A2BCD345E" would just be "1A2BCD345E" - * @type string $firebase_app_id - * Output only. ID of the corresponding web app in Firebase, if any. - * This ID can change if the web app is deleted and recreated. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when this stream was originally created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time when stream payload fields were last updated. - * @type string $default_uri - * Immutable. Domain name of the web app being measured, or empty. - * Example: "http://www.google.com", "https://www.google.com" - * @type string $display_name - * Required. Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/1000/webDataStreams/2000" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of this Data Stream. - * Format: properties/{property_id}/webDataStreams/{stream_id} - * Example: "properties/1000/webDataStreams/2000" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Analytics "Measurement ID", without the "G-" prefix. - * Example: "G-1A2BCD345E" would just be "1A2BCD345E" - * - * Generated from protobuf field string measurement_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMeasurementId() - { - return $this->measurement_id; - } - - /** - * Output only. Analytics "Measurement ID", without the "G-" prefix. - * Example: "G-1A2BCD345E" would just be "1A2BCD345E" - * - * Generated from protobuf field string measurement_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMeasurementId($var) - { - GPBUtil::checkString($var, True); - $this->measurement_id = $var; - - 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. - * - * Generated from protobuf field string firebase_app_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFirebaseAppId() - { - return $this->firebase_app_id; - } - - /** - * Output only. ID of the corresponding web app in Firebase, if any. - * This ID can change if the web app is deleted and recreated. - * - * Generated from protobuf field string firebase_app_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFirebaseAppId($var) - { - GPBUtil::checkString($var, True); - $this->firebase_app_id = $var; - - return $this; - } - - /** - * Output only. Time when this stream was originally created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time when this stream was originally created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time when stream payload fields were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Time when stream payload fields were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Immutable. Domain name of the web app being measured, or empty. - * Example: "http://www.google.com", "https://www.google.com" - * - * Generated from protobuf field string default_uri = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getDefaultUri() - { - return $this->default_uri; - } - - /** - * Immutable. Domain name of the web app being measured, or empty. - * Example: "http://www.google.com", "https://www.google.com" - * - * Generated from protobuf field string default_uri = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setDefaultUri($var) - { - GPBUtil::checkString($var, True); - $this->default_uri = $var; - - return $this; - } - - /** - * Required. Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Human-readable display name for the Data Stream. - * The max allowed display name length is 255 UTF-16 code units. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/AnalyticsAdmin/src/V1beta/AccessBetweenFilter.php b/AnalyticsAdmin/src/V1beta/AccessBetweenFilter.php index 98de8d7c7a65..3e44c7218fb7 100644 --- a/AnalyticsAdmin/src/V1beta/AccessBetweenFilter.php +++ b/AnalyticsAdmin/src/V1beta/AccessBetweenFilter.php @@ -20,13 +20,13 @@ class AccessBetweenFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue from_value = 1; */ - private $from_value = null; + protected $from_value = null; /** * Ends with this number. * * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue to_value = 2; */ - private $to_value = null; + protected $to_value = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessDateRange.php b/AnalyticsAdmin/src/V1beta/AccessDateRange.php index 578736ddd92e..2693ac3c1401 100644 --- a/AnalyticsAdmin/src/V1beta/AccessDateRange.php +++ b/AnalyticsAdmin/src/V1beta/AccessDateRange.php @@ -23,7 +23,7 @@ class AccessDateRange extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string start_date = 1; */ - private $start_date = ''; + protected $start_date = ''; /** * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot * be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is @@ -32,7 +32,7 @@ class AccessDateRange extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string end_date = 2; */ - private $end_date = ''; + protected $end_date = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessDimension.php b/AnalyticsAdmin/src/V1beta/AccessDimension.php index 1bff140fc514..ad8fa116e91b 100644 --- a/AnalyticsAdmin/src/V1beta/AccessDimension.php +++ b/AnalyticsAdmin/src/V1beta/AccessDimension.php @@ -25,7 +25,7 @@ class AccessDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string dimension_name = 1; */ - private $dimension_name = ''; + protected $dimension_name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessDimensionHeader.php b/AnalyticsAdmin/src/V1beta/AccessDimensionHeader.php index 2706b0d86c1c..5c89abc67615 100644 --- a/AnalyticsAdmin/src/V1beta/AccessDimensionHeader.php +++ b/AnalyticsAdmin/src/V1beta/AccessDimensionHeader.php @@ -23,7 +23,7 @@ class AccessDimensionHeader extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string dimension_name = 1; */ - private $dimension_name = ''; + protected $dimension_name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessDimensionValue.php b/AnalyticsAdmin/src/V1beta/AccessDimensionValue.php index 80bb42bc8de1..3c878103a7ef 100644 --- a/AnalyticsAdmin/src/V1beta/AccessDimensionValue.php +++ b/AnalyticsAdmin/src/V1beta/AccessDimensionValue.php @@ -21,7 +21,7 @@ class AccessDimensionValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string value = 1; */ - private $value = ''; + protected $value = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessFilter.php b/AnalyticsAdmin/src/V1beta/AccessFilter.php index 941e0b518b6b..7555f3b7e5bb 100644 --- a/AnalyticsAdmin/src/V1beta/AccessFilter.php +++ b/AnalyticsAdmin/src/V1beta/AccessFilter.php @@ -20,7 +20,7 @@ class AccessFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string field_name = 1; */ - private $field_name = ''; + protected $field_name = ''; protected $one_filter; /** diff --git a/AnalyticsAdmin/src/V1beta/AccessInListFilter.php b/AnalyticsAdmin/src/V1beta/AccessInListFilter.php index b6fcbf4de1f0..81057b5c955e 100644 --- a/AnalyticsAdmin/src/V1beta/AccessInListFilter.php +++ b/AnalyticsAdmin/src/V1beta/AccessInListFilter.php @@ -26,7 +26,7 @@ class AccessInListFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool case_sensitive = 2; */ - private $case_sensitive = false; + protected $case_sensitive = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessMetric.php b/AnalyticsAdmin/src/V1beta/AccessMetric.php index d074b188f73f..fefa95685fec 100644 --- a/AnalyticsAdmin/src/V1beta/AccessMetric.php +++ b/AnalyticsAdmin/src/V1beta/AccessMetric.php @@ -24,7 +24,7 @@ class AccessMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string metric_name = 1; */ - private $metric_name = ''; + protected $metric_name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessMetricHeader.php b/AnalyticsAdmin/src/V1beta/AccessMetricHeader.php index 38ab2c4ccbc4..93fb29069548 100644 --- a/AnalyticsAdmin/src/V1beta/AccessMetricHeader.php +++ b/AnalyticsAdmin/src/V1beta/AccessMetricHeader.php @@ -23,7 +23,7 @@ class AccessMetricHeader extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string metric_name = 1; */ - private $metric_name = ''; + protected $metric_name = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessMetricValue.php b/AnalyticsAdmin/src/V1beta/AccessMetricValue.php index fffb52ed7544..39d8d6f9da45 100644 --- a/AnalyticsAdmin/src/V1beta/AccessMetricValue.php +++ b/AnalyticsAdmin/src/V1beta/AccessMetricValue.php @@ -20,7 +20,7 @@ class AccessMetricValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string value = 1; */ - private $value = ''; + protected $value = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessNumericFilter.php b/AnalyticsAdmin/src/V1beta/AccessNumericFilter.php index 956cd2aea5c9..0e21c7cada03 100644 --- a/AnalyticsAdmin/src/V1beta/AccessNumericFilter.php +++ b/AnalyticsAdmin/src/V1beta/AccessNumericFilter.php @@ -20,13 +20,13 @@ class AccessNumericFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.AccessNumericFilter.Operation operation = 1; */ - private $operation = 0; + protected $operation = 0; /** * A numeric value or a date value. * * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue value = 2; */ - private $value = null; + protected $value = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessNumericFilter/Operation.php b/AnalyticsAdmin/src/V1beta/AccessNumericFilter/Operation.php index bb570ffb41cd..f72909f64a70 100644 --- a/AnalyticsAdmin/src/V1beta/AccessNumericFilter/Operation.php +++ b/AnalyticsAdmin/src/V1beta/AccessNumericFilter/Operation.php @@ -80,6 +80,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Operation::class, \Google\Analytics\Admin\V1beta\AccessNumericFilter_Operation::class); diff --git a/AnalyticsAdmin/src/V1beta/AccessOrderBy.php b/AnalyticsAdmin/src/V1beta/AccessOrderBy.php index 8d563bca1442..6170de42bfbb 100644 --- a/AnalyticsAdmin/src/V1beta/AccessOrderBy.php +++ b/AnalyticsAdmin/src/V1beta/AccessOrderBy.php @@ -23,7 +23,7 @@ class AccessOrderBy extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool desc = 3; */ - private $desc = false; + protected $desc = false; protected $one_order_by; /** diff --git a/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy.php b/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy.php index cd5ea2be7ab3..261c9f8e4381 100644 --- a/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy.php +++ b/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy.php @@ -20,13 +20,13 @@ class DimensionOrderBy extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string dimension_name = 1; */ - private $dimension_name = ''; + protected $dimension_name = ''; /** * Controls the rule for dimension value ordering. * * Generated from protobuf field .google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType order_type = 2; */ - private $order_type = 0; + protected $order_type = 0; /** * Constructor. @@ -99,6 +99,4 @@ public function setOrderType($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DimensionOrderBy::class, \Google\Analytics\Admin\V1beta\AccessOrderBy_DimensionOrderBy::class); diff --git a/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy/OrderType.php b/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy/OrderType.php index b0fbddbb0c0f..a684be7e77e4 100644 --- a/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy/OrderType.php +++ b/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy/OrderType.php @@ -71,6 +71,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OrderType::class, \Google\Analytics\Admin\V1beta\AccessOrderBy_DimensionOrderBy_OrderType::class); diff --git a/AnalyticsAdmin/src/V1beta/AccessOrderBy/MetricOrderBy.php b/AnalyticsAdmin/src/V1beta/AccessOrderBy/MetricOrderBy.php index 0019d3c25daa..4da914a2a5b7 100644 --- a/AnalyticsAdmin/src/V1beta/AccessOrderBy/MetricOrderBy.php +++ b/AnalyticsAdmin/src/V1beta/AccessOrderBy/MetricOrderBy.php @@ -20,7 +20,7 @@ class MetricOrderBy extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string metric_name = 1; */ - private $metric_name = ''; + protected $metric_name = ''; /** * Constructor. @@ -65,6 +65,4 @@ public function setMetricName($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetricOrderBy::class, \Google\Analytics\Admin\V1beta\AccessOrderBy_MetricOrderBy::class); diff --git a/AnalyticsAdmin/src/V1beta/AccessQuota.php b/AnalyticsAdmin/src/V1beta/AccessQuota.php index a0c5b9593352..6da0417338d0 100644 --- a/AnalyticsAdmin/src/V1beta/AccessQuota.php +++ b/AnalyticsAdmin/src/V1beta/AccessQuota.php @@ -23,7 +23,7 @@ class AccessQuota extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_day = 1; */ - private $tokens_per_day = null; + protected $tokens_per_day = null; /** * Properties can use 50,000 tokens per hour. An API request consumes a single * number of tokens, and that number is deducted from all of the hourly, @@ -31,20 +31,20 @@ class AccessQuota extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_hour = 2; */ - private $tokens_per_hour = null; + protected $tokens_per_hour = null; /** * Properties can use up to 50 concurrent requests. * * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus concurrent_requests = 3; */ - private $concurrent_requests = null; + protected $concurrent_requests = null; /** * Properties and cloud project pairs can have up to 50 server errors per * hour. * * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus server_errors_per_project_per_hour = 4; */ - private $server_errors_per_project_per_hour = null; + protected $server_errors_per_project_per_hour = null; /** * Properties can use up to 25% of their tokens per project per hour. This * amounts to Analytics 360 Properties can use 12,500 tokens per project per @@ -53,7 +53,7 @@ class AccessQuota extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_project_per_hour = 5; */ - private $tokens_per_project_per_hour = null; + protected $tokens_per_project_per_hour = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessQuotaStatus.php b/AnalyticsAdmin/src/V1beta/AccessQuotaStatus.php index 8035178d2d56..7b4a1d173763 100644 --- a/AnalyticsAdmin/src/V1beta/AccessQuotaStatus.php +++ b/AnalyticsAdmin/src/V1beta/AccessQuotaStatus.php @@ -20,13 +20,13 @@ class AccessQuotaStatus extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 consumed = 1; */ - private $consumed = 0; + protected $consumed = 0; /** * Quota remaining after this request. * * Generated from protobuf field int32 remaining = 2; */ - private $remaining = 0; + protected $remaining = 0; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessStringFilter.php b/AnalyticsAdmin/src/V1beta/AccessStringFilter.php index 33da913c46dc..0ccae2352c66 100644 --- a/AnalyticsAdmin/src/V1beta/AccessStringFilter.php +++ b/AnalyticsAdmin/src/V1beta/AccessStringFilter.php @@ -20,19 +20,19 @@ class AccessStringFilter extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.AccessStringFilter.MatchType match_type = 1; */ - private $match_type = 0; + protected $match_type = 0; /** * The string value used for the matching. * * Generated from protobuf field string value = 2; */ - private $value = ''; + protected $value = ''; /** * If true, the string value is case sensitive. * * Generated from protobuf field bool case_sensitive = 3; */ - private $case_sensitive = false; + protected $case_sensitive = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccessStringFilter/MatchType.php b/AnalyticsAdmin/src/V1beta/AccessStringFilter/MatchType.php index 1160ce4dab8a..4e7b3061f3ad 100644 --- a/AnalyticsAdmin/src/V1beta/AccessStringFilter/MatchType.php +++ b/AnalyticsAdmin/src/V1beta/AccessStringFilter/MatchType.php @@ -87,6 +87,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MatchType::class, \Google\Analytics\Admin\V1beta\AccessStringFilter_MatchType::class); diff --git a/AnalyticsAdmin/src/V1beta/Account.php b/AnalyticsAdmin/src/V1beta/Account.php index cd8e20a53530..5425f6fae525 100644 --- a/AnalyticsAdmin/src/V1beta/Account.php +++ b/AnalyticsAdmin/src/V1beta/Account.php @@ -22,38 +22,38 @@ class Account extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Output only. Time when this account was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. Time when account payload fields were last updated. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $update_time = null; + protected $update_time = null; /** * Required. Human-readable display name for this account. * * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Country of business. Must be a Unicode CLDR region code. * * Generated from protobuf field string region_code = 5; */ - private $region_code = ''; + protected $region_code = ''; /** * Output only. Indicates whether this Account is soft-deleted or not. Deleted * accounts are excluded from List results unless specifically requested. * * Generated from protobuf field bool deleted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $deleted = false; + protected $deleted = false; /** * Output only. The URI for a Google Marketing Platform organization resource. * Only set when this account is connected to a GMP organization. @@ -61,7 +61,7 @@ class Account extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string gmp_organization = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { */ - private $gmp_organization = ''; + protected $gmp_organization = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AccountSummary.php b/AnalyticsAdmin/src/V1beta/AccountSummary.php index 9fd3d17b3069..39f4d4f56c00 100644 --- a/AnalyticsAdmin/src/V1beta/AccountSummary.php +++ b/AnalyticsAdmin/src/V1beta/AccountSummary.php @@ -23,7 +23,7 @@ class AccountSummary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1; */ - private $name = ''; + protected $name = ''; /** * Resource name of account referred to by this account summary * Format: accounts/{account_id} @@ -31,13 +31,13 @@ class AccountSummary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string account = 2 [(.google.api.resource_reference) = { */ - private $account = ''; + protected $account = ''; /** * Display name for the account referred to in this account summary. * * Generated from protobuf field string display_name = 3; */ - private $display_name = ''; + protected $display_name = ''; /** * List of summaries for child accounts of this account. * diff --git a/AnalyticsAdmin/src/V1beta/AcknowledgeUserDataCollectionRequest.php b/AnalyticsAdmin/src/V1beta/AcknowledgeUserDataCollectionRequest.php index 2c435f3b7ff0..0b2c9d56ae7f 100644 --- a/AnalyticsAdmin/src/V1beta/AcknowledgeUserDataCollectionRequest.php +++ b/AnalyticsAdmin/src/V1beta/AcknowledgeUserDataCollectionRequest.php @@ -20,7 +20,7 @@ class AcknowledgeUserDataCollectionRequest extends \Google\Protobuf\Internal\Mes * * Generated from protobuf field string property = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $property = ''; + protected $property = ''; /** * Required. An acknowledgement that the caller of this method understands the * terms of user data collection. @@ -32,7 +32,7 @@ class AcknowledgeUserDataCollectionRequest extends \Google\Protobuf\Internal\Mes * * Generated from protobuf field string acknowledgement = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $acknowledgement = ''; + protected $acknowledgement = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/AnalyticsAdminServiceClient.php b/AnalyticsAdmin/src/V1beta/AnalyticsAdminServiceClient.php deleted file mode 100644 index aa2d2680cb9d..000000000000 --- a/AnalyticsAdmin/src/V1beta/AnalyticsAdminServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ -string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CustomDimension to archive. diff --git a/AnalyticsAdmin/src/V1beta/ArchiveCustomMetricRequest.php b/AnalyticsAdmin/src/V1beta/ArchiveCustomMetricRequest.php index 7a449aafe0a4..00ad8f6cbc3a 100644 --- a/AnalyticsAdmin/src/V1beta/ArchiveCustomMetricRequest.php +++ b/AnalyticsAdmin/src/V1beta/ArchiveCustomMetricRequest.php @@ -21,7 +21,7 @@ class ArchiveCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CustomMetric to archive. diff --git a/AnalyticsAdmin/src/V1beta/ChangeHistoryChange.php b/AnalyticsAdmin/src/V1beta/ChangeHistoryChange.php index 31db55054b66..980584249c8c 100644 --- a/AnalyticsAdmin/src/V1beta/ChangeHistoryChange.php +++ b/AnalyticsAdmin/src/V1beta/ChangeHistoryChange.php @@ -20,27 +20,27 @@ class ChangeHistoryChange extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string resource = 1; */ - private $resource = ''; + protected $resource = ''; /** * The type of action that changed this resource. * * Generated from protobuf field .google.analytics.admin.v1beta.ActionType action = 2; */ - private $action = 0; + protected $action = 0; /** * Resource contents from before the change was made. If this resource was * created in this change, this field will be missing. * * Generated from protobuf field .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_before_change = 3; */ - private $resource_before_change = null; + protected $resource_before_change = null; /** * Resource contents from after the change was made. If this resource was * deleted in this change, this field will be missing. * * Generated from protobuf field .google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource resource_after_change = 4; */ - private $resource_after_change = null; + protected $resource_after_change = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ChangeHistoryChange/ChangeHistoryResource.php b/AnalyticsAdmin/src/V1beta/ChangeHistoryChange/ChangeHistoryResource.php index 19765fee14c8..94086603c72b 100644 --- a/AnalyticsAdmin/src/V1beta/ChangeHistoryChange/ChangeHistoryResource.php +++ b/AnalyticsAdmin/src/V1beta/ChangeHistoryChange/ChangeHistoryResource.php @@ -305,6 +305,4 @@ public function getResource() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ChangeHistoryResource::class, \Google\Analytics\Admin\V1beta\ChangeHistoryChange_ChangeHistoryResource::class); diff --git a/AnalyticsAdmin/src/V1beta/ChangeHistoryEvent.php b/AnalyticsAdmin/src/V1beta/ChangeHistoryEvent.php index cc262644a1ef..92d007549c95 100644 --- a/AnalyticsAdmin/src/V1beta/ChangeHistoryEvent.php +++ b/AnalyticsAdmin/src/V1beta/ChangeHistoryEvent.php @@ -23,19 +23,19 @@ class ChangeHistoryEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string id = 1; */ - private $id = ''; + protected $id = ''; /** * Time when change was made. * * Generated from protobuf field .google.protobuf.Timestamp change_time = 2; */ - private $change_time = null; + protected $change_time = null; /** * The type of actor that made this change. * * Generated from protobuf field .google.analytics.admin.v1beta.ActorType actor_type = 3; */ - private $actor_type = 0; + protected $actor_type = 0; /** * 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. @@ -43,14 +43,14 @@ class ChangeHistoryEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string user_actor_email = 4; */ - private $user_actor_email = ''; + protected $user_actor_email = ''; /** * If true, then the list of changes returned was filtered, and does not * represent all changes that occurred in this event. * * Generated from protobuf field bool changes_filtered = 5; */ - private $changes_filtered = false; + protected $changes_filtered = false; /** * A list of changes made in this change history event that fit the filters * specified in SearchChangeHistoryEventsRequest. diff --git a/AnalyticsAdmin/src/V1beta/Client/AnalyticsAdminServiceClient.php b/AnalyticsAdmin/src/V1beta/Client/AnalyticsAdminServiceClient.php index a358f56bf52e..60544f177da1 100644 --- a/AnalyticsAdmin/src/V1beta/Client/AnalyticsAdminServiceClient.php +++ b/AnalyticsAdmin/src/V1beta/Client/AnalyticsAdminServiceClient.php @@ -1,6 +1,6 @@ render([ 'property' => $property, 'data_stream' => $dataStream, @@ -487,8 +489,8 @@ public static function propertyName(string $property): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * @@ -496,7 +498,7 @@ public static function propertyName(string $property): string * * @experimental */ - public static function parseName(string $formattedName, ?string $template = null): array + public static function parseName(string $formattedName, string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -551,9 +553,6 @@ public static function parseName(string $formattedName, ?string $template = null * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException @@ -605,8 +604,10 @@ public function __call($method, $args) * * @experimental */ - public function acknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest $request, array $callOptions = []): AcknowledgeUserDataCollectionResponse - { + public function acknowledgeUserDataCollection( + AcknowledgeUserDataCollectionRequest $request, + array $callOptions = [] + ): AcknowledgeUserDataCollectionResponse { return $this->startApiCall('AcknowledgeUserDataCollection', $request, $callOptions)->wait(); } @@ -691,8 +692,10 @@ public function archiveCustomMetric(ArchiveCustomMetricRequest $request, array $ * * @deprecated This method will be removed in the next major version update. */ - public function createConversionEvent(CreateConversionEventRequest $request, array $callOptions = []): ConversionEvent - { + public function createConversionEvent( + CreateConversionEventRequest $request, + array $callOptions = [] + ): ConversionEvent { return $this->startApiCall('CreateConversionEvent', $request, $callOptions)->wait(); } @@ -720,8 +723,10 @@ public function createConversionEvent(CreateConversionEventRequest $request, arr * * @experimental */ - public function createCustomDimension(CreateCustomDimensionRequest $request, array $callOptions = []): CustomDimension - { + public function createCustomDimension( + CreateCustomDimensionRequest $request, + array $callOptions = [] + ): CustomDimension { return $this->startApiCall('CreateCustomDimension', $request, $callOptions)->wait(); } @@ -895,8 +900,10 @@ public function createKeyEvent(CreateKeyEventRequest $request, array $callOption * * @experimental */ - public function createMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest $request, array $callOptions = []): MeasurementProtocolSecret - { + public function createMeasurementProtocolSecret( + CreateMeasurementProtocolSecretRequest $request, + array $callOptions = [] + ): MeasurementProtocolSecret { return $this->startApiCall('CreateMeasurementProtocolSecret', $request, $callOptions)->wait(); } @@ -1123,8 +1130,10 @@ public function deleteKeyEvent(DeleteKeyEventRequest $request, array $callOption * * @experimental */ - public function deleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest $request, array $callOptions = []): void - { + public function deleteMeasurementProtocolSecret( + DeleteMeasurementProtocolSecretRequest $request, + array $callOptions = [] + ): void { $this->startApiCall('DeleteMeasurementProtocolSecret', $request, $callOptions)->wait(); } @@ -1308,8 +1317,10 @@ public function getCustomMetric(GetCustomMetricRequest $request, array $callOpti * * @experimental */ - public function getDataRetentionSettings(GetDataRetentionSettingsRequest $request, array $callOptions = []): DataRetentionSettings - { + public function getDataRetentionSettings( + GetDataRetentionSettingsRequest $request, + array $callOptions = [] + ): DataRetentionSettings { return $this->startApiCall('GetDataRetentionSettings', $request, $callOptions)->wait(); } @@ -1338,8 +1349,10 @@ public function getDataRetentionSettings(GetDataRetentionSettingsRequest $reques * * @experimental */ - public function getDataSharingSettings(GetDataSharingSettingsRequest $request, array $callOptions = []): DataSharingSettings - { + public function getDataSharingSettings( + GetDataSharingSettingsRequest $request, + array $callOptions = [] + ): DataSharingSettings { return $this->startApiCall('GetDataSharingSettings', $request, $callOptions)->wait(); } @@ -1423,8 +1436,10 @@ public function getKeyEvent(GetKeyEventRequest $request, array $callOptions = [] * * @experimental */ - public function getMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest $request, array $callOptions = []): MeasurementProtocolSecret - { + public function getMeasurementProtocolSecret( + GetMeasurementProtocolSecretRequest $request, + array $callOptions = [] + ): MeasurementProtocolSecret { return $this->startApiCall('GetMeasurementProtocolSecret', $request, $callOptions)->wait(); } @@ -1480,8 +1495,10 @@ public function getProperty(GetPropertyRequest $request, array $callOptions = [] * * @experimental */ - public function listAccountSummaries(ListAccountSummariesRequest $request, array $callOptions = []): PagedListResponse - { + public function listAccountSummaries( + ListAccountSummariesRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListAccountSummaries', $request, $callOptions); } @@ -1546,8 +1563,10 @@ public function listAccounts(ListAccountsRequest $request, array $callOptions = * * @deprecated This method will be removed in the next major version update. */ - public function listConversionEvents(ListConversionEventsRequest $request, array $callOptions = []): PagedListResponse - { + public function listConversionEvents( + ListConversionEventsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListConversionEvents', $request, $callOptions); } @@ -1575,8 +1594,10 @@ public function listConversionEvents(ListConversionEventsRequest $request, array * * @experimental */ - public function listCustomDimensions(ListCustomDimensionsRequest $request, array $callOptions = []): PagedListResponse - { + public function listCustomDimensions( + ListCustomDimensionsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListCustomDimensions', $request, $callOptions); } @@ -1751,8 +1772,10 @@ public function listKeyEvents(ListKeyEventsRequest $request, array $callOptions * * @experimental */ - public function listMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest $request, array $callOptions = []): PagedListResponse - { + public function listMeasurementProtocolSecrets( + ListMeasurementProtocolSecretsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListMeasurementProtocolSecrets', $request, $callOptions); } @@ -1813,8 +1836,10 @@ public function listProperties(ListPropertiesRequest $request, array $callOption * * @experimental */ - public function provisionAccountTicket(ProvisionAccountTicketRequest $request, array $callOptions = []): ProvisionAccountTicketResponse - { + public function provisionAccountTicket( + ProvisionAccountTicketRequest $request, + array $callOptions = [] + ): ProvisionAccountTicketResponse { return $this->startApiCall('ProvisionAccountTicket', $request, $callOptions)->wait(); } @@ -1886,8 +1911,10 @@ public function runAccessReport(RunAccessReportRequest $request, array $callOpti * * @experimental */ - public function searchChangeHistoryEvents(SearchChangeHistoryEventsRequest $request, array $callOptions = []): PagedListResponse - { + public function searchChangeHistoryEvents( + SearchChangeHistoryEventsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('SearchChangeHistoryEvents', $request, $callOptions); } @@ -1946,8 +1973,10 @@ public function updateAccount(UpdateAccountRequest $request, array $callOptions * * @deprecated This method will be removed in the next major version update. */ - public function updateConversionEvent(UpdateConversionEventRequest $request, array $callOptions = []): ConversionEvent - { + public function updateConversionEvent( + UpdateConversionEventRequest $request, + array $callOptions = [] + ): ConversionEvent { return $this->startApiCall('UpdateConversionEvent', $request, $callOptions)->wait(); } @@ -1975,8 +2004,10 @@ public function updateConversionEvent(UpdateConversionEventRequest $request, arr * * @experimental */ - public function updateCustomDimension(UpdateCustomDimensionRequest $request, array $callOptions = []): CustomDimension - { + public function updateCustomDimension( + UpdateCustomDimensionRequest $request, + array $callOptions = [] + ): CustomDimension { return $this->startApiCall('UpdateCustomDimension', $request, $callOptions)->wait(); } @@ -2033,8 +2064,10 @@ public function updateCustomMetric(UpdateCustomMetricRequest $request, array $ca * * @experimental */ - public function updateDataRetentionSettings(UpdateDataRetentionSettingsRequest $request, array $callOptions = []): DataRetentionSettings - { + public function updateDataRetentionSettings( + UpdateDataRetentionSettingsRequest $request, + array $callOptions = [] + ): DataRetentionSettings { return $this->startApiCall('UpdateDataRetentionSettings', $request, $callOptions)->wait(); } @@ -2148,8 +2181,10 @@ public function updateKeyEvent(UpdateKeyEventRequest $request, array $callOption * * @experimental */ - public function updateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest $request, array $callOptions = []): MeasurementProtocolSecret - { + public function updateMeasurementProtocolSecret( + UpdateMeasurementProtocolSecretRequest $request, + array $callOptions = [] + ): MeasurementProtocolSecret { return $this->startApiCall('UpdateMeasurementProtocolSecret', $request, $callOptions)->wait(); } diff --git a/AnalyticsAdmin/src/V1beta/ConversionEvent.php b/AnalyticsAdmin/src/V1beta/ConversionEvent.php index a233a794cedf..5574fa488333 100644 --- a/AnalyticsAdmin/src/V1beta/ConversionEvent.php +++ b/AnalyticsAdmin/src/V1beta/ConversionEvent.php @@ -21,27 +21,27 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The event name for this conversion event. * Examples: 'click', 'purchase' * * Generated from protobuf field string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $event_name = ''; + protected $event_name = ''; /** * Output only. Time when this conversion event was created in the property. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. If set, this event can currently be deleted with * DeleteConversionEvent. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $deletable = false; + protected $deletable = false; /** * 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 @@ -52,7 +52,7 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $custom = false; + protected $custom = false; /** * Optional. The method by which conversions will be counted across multiple * events within a session. If this value is not provided, it will be set to @@ -60,13 +60,13 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.ConversionEvent.ConversionCountingMethod counting_method = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private $counting_method = 0; + protected $counting_method = 0; /** * Optional. Defines a default value/currency for a conversion event. * * Generated from protobuf field optional .google.analytics.admin.v1beta.ConversionEvent.DefaultConversionValue default_conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - private $default_conversion_value = null; + protected $default_conversion_value = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ConversionEvent/ConversionCountingMethod.php b/AnalyticsAdmin/src/V1beta/ConversionEvent/ConversionCountingMethod.php index 85ec17148b20..117842ba02e9 100644 --- a/AnalyticsAdmin/src/V1beta/ConversionEvent/ConversionCountingMethod.php +++ b/AnalyticsAdmin/src/V1beta/ConversionEvent/ConversionCountingMethod.php @@ -61,6 +61,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConversionCountingMethod::class, \Google\Analytics\Admin\V1beta\ConversionEvent_ConversionCountingMethod::class); diff --git a/AnalyticsAdmin/src/V1beta/ConversionEvent/DefaultConversionValue.php b/AnalyticsAdmin/src/V1beta/ConversionEvent/DefaultConversionValue.php index 687b9c24f257..064d53a301bd 100644 --- a/AnalyticsAdmin/src/V1beta/ConversionEvent/DefaultConversionValue.php +++ b/AnalyticsAdmin/src/V1beta/ConversionEvent/DefaultConversionValue.php @@ -22,7 +22,7 @@ class DefaultConversionValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field optional double value = 1; */ - private $value = null; + protected $value = null; /** * When a conversion event for this event_name has no set currency, * this currency will be applied as the default. Must be in ISO 4217 @@ -31,7 +31,7 @@ class DefaultConversionValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field optional string currency_code = 2; */ - private $currency_code = null; + protected $currency_code = null; /** * Constructor. @@ -136,6 +136,4 @@ public function setCurrencyCode($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DefaultConversionValue::class, \Google\Analytics\Admin\V1beta\ConversionEvent_DefaultConversionValue::class); diff --git a/AnalyticsAdmin/src/V1beta/CreateConversionEventRequest.php b/AnalyticsAdmin/src/V1beta/CreateConversionEventRequest.php index 44fb258f05b8..8831edba86d8 100644 --- a/AnalyticsAdmin/src/V1beta/CreateConversionEventRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreateConversionEventRequest.php @@ -20,14 +20,14 @@ class CreateConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $conversion_event = null; + protected $conversion_event = null; /** * Required. The resource name of the parent property where this conversion * event will be created. Format: properties/123 * * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * @param string $parent Required. The resource name of the parent property where this conversion diff --git a/AnalyticsAdmin/src/V1beta/CreateCustomDimensionRequest.php b/AnalyticsAdmin/src/V1beta/CreateCustomDimensionRequest.php index 939fce1a089d..fa4ccec2cac8 100644 --- a/AnalyticsAdmin/src/V1beta/CreateCustomDimensionRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreateCustomDimensionRequest.php @@ -20,13 +20,13 @@ class CreateCustomDimensionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The CustomDimension to create. * * Generated from protobuf field .google.analytics.admin.v1beta.CustomDimension custom_dimension = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $custom_dimension = null; + protected $custom_dimension = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1beta/CreateCustomMetricRequest.php b/AnalyticsAdmin/src/V1beta/CreateCustomMetricRequest.php index b06f2dc3aa30..9b5fb5068313 100644 --- a/AnalyticsAdmin/src/V1beta/CreateCustomMetricRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreateCustomMetricRequest.php @@ -20,13 +20,13 @@ class CreateCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The CustomMetric to create. * * Generated from protobuf field .google.analytics.admin.v1beta.CustomMetric custom_metric = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $custom_metric = null; + protected $custom_metric = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1beta/CreateDataStreamRequest.php b/AnalyticsAdmin/src/V1beta/CreateDataStreamRequest.php index 421093fb4608..23be6af917a9 100644 --- a/AnalyticsAdmin/src/V1beta/CreateDataStreamRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreateDataStreamRequest.php @@ -20,13 +20,13 @@ class CreateDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The DataStream to create. * * Generated from protobuf field .google.analytics.admin.v1beta.DataStream data_stream = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $data_stream = null; + protected $data_stream = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1beta/CreateFirebaseLinkRequest.php b/AnalyticsAdmin/src/V1beta/CreateFirebaseLinkRequest.php index d7850b9b9fa4..7a697f7de13f 100644 --- a/AnalyticsAdmin/src/V1beta/CreateFirebaseLinkRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreateFirebaseLinkRequest.php @@ -21,13 +21,13 @@ class CreateFirebaseLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The Firebase link to create. * * Generated from protobuf field .google.analytics.admin.v1beta.FirebaseLink firebase_link = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $firebase_link = null; + protected $firebase_link = null; /** * @param string $parent Required. Format: properties/{property_id} diff --git a/AnalyticsAdmin/src/V1beta/CreateGoogleAdsLinkRequest.php b/AnalyticsAdmin/src/V1beta/CreateGoogleAdsLinkRequest.php index 186e947da4f4..ec369830145e 100644 --- a/AnalyticsAdmin/src/V1beta/CreateGoogleAdsLinkRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreateGoogleAdsLinkRequest.php @@ -20,13 +20,13 @@ class CreateGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The GoogleAdsLink to create. * * Generated from protobuf field .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $google_ads_link = null; + protected $google_ads_link = null; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1beta/CreateKeyEventRequest.php b/AnalyticsAdmin/src/V1beta/CreateKeyEventRequest.php index 79440f311443..91c9ec7685be 100644 --- a/AnalyticsAdmin/src/V1beta/CreateKeyEventRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreateKeyEventRequest.php @@ -20,14 +20,14 @@ class CreateKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.KeyEvent key_event = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $key_event = null; + protected $key_event = null; /** * Required. The resource name of the parent property where this Key Event * will be created. Format: properties/123 * * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * @param string $parent Required. The resource name of the parent property where this Key Event diff --git a/AnalyticsAdmin/src/V1beta/CreateMeasurementProtocolSecretRequest.php b/AnalyticsAdmin/src/V1beta/CreateMeasurementProtocolSecretRequest.php index cf3c5b22b9d3..d0df248fba28 100644 --- a/AnalyticsAdmin/src/V1beta/CreateMeasurementProtocolSecretRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreateMeasurementProtocolSecretRequest.php @@ -21,13 +21,13 @@ class CreateMeasurementProtocolSecretRequest extends \Google\Protobuf\Internal\M * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * Required. The measurement protocol secret to create. * * Generated from protobuf field .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $measurement_protocol_secret = null; + protected $measurement_protocol_secret = null; /** * @param string $parent Required. The parent resource where this secret will be created. diff --git a/AnalyticsAdmin/src/V1beta/CreatePropertyRequest.php b/AnalyticsAdmin/src/V1beta/CreatePropertyRequest.php index 990e26f935b2..0d7a9402770c 100644 --- a/AnalyticsAdmin/src/V1beta/CreatePropertyRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreatePropertyRequest.php @@ -21,7 +21,7 @@ class CreatePropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $property = null; + protected $property = null; /** * @param \Google\Analytics\Admin\V1beta\Property $property Required. The property to create. diff --git a/AnalyticsAdmin/src/V1beta/CustomDimension.php b/AnalyticsAdmin/src/V1beta/CustomDimension.php index 1ac224e46367..6d82579f7027 100644 --- a/AnalyticsAdmin/src/V1beta/CustomDimension.php +++ b/AnalyticsAdmin/src/V1beta/CustomDimension.php @@ -21,7 +21,7 @@ class CustomDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. Immutable. Tagging parameter name for this custom dimension. * If this is a user-scoped dimension, then this is the user property name. @@ -35,7 +35,7 @@ class CustomDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $parameter_name = ''; + protected $parameter_name = ''; /** * Required. Display name for this custom dimension as shown in the Analytics * UI. Max length of 82 characters, alphanumeric plus space and underscore @@ -45,20 +45,20 @@ class CustomDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Optional. Description for this custom dimension. Max length of 150 * characters. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; */ - private $description = ''; + protected $description = ''; /** * Required. Immutable. The scope of this dimension. * * Generated from protobuf field .google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $scope = 0; + protected $scope = 0; /** * Optional. If set to true, sets this dimension as NPA and excludes it from * ads personalization. @@ -66,7 +66,7 @@ class CustomDimension extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private $disallow_ads_personalization = false; + protected $disallow_ads_personalization = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/CustomDimension/DimensionScope.php b/AnalyticsAdmin/src/V1beta/CustomDimension/DimensionScope.php index 888ee1bbef8d..f32515155a85 100644 --- a/AnalyticsAdmin/src/V1beta/CustomDimension/DimensionScope.php +++ b/AnalyticsAdmin/src/V1beta/CustomDimension/DimensionScope.php @@ -66,6 +66,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DimensionScope::class, \Google\Analytics\Admin\V1beta\CustomDimension_DimensionScope::class); diff --git a/AnalyticsAdmin/src/V1beta/CustomMetric.php b/AnalyticsAdmin/src/V1beta/CustomMetric.php index c2635d667f9e..d786eb4a8ca0 100644 --- a/AnalyticsAdmin/src/V1beta/CustomMetric.php +++ b/AnalyticsAdmin/src/V1beta/CustomMetric.php @@ -21,7 +21,7 @@ class CustomMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. Immutable. Tagging name for this custom metric. * If this is an event-scoped metric, then this is the event parameter @@ -31,7 +31,7 @@ class CustomMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $parameter_name = ''; + protected $parameter_name = ''; /** * Required. Display name for this custom metric as shown in the Analytics UI. * Max length of 82 characters, alphanumeric plus space and underscore @@ -41,26 +41,26 @@ class CustomMetric extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Optional. Description for this custom dimension. * Max length of 150 characters. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; */ - private $description = ''; + protected $description = ''; /** * Required. The type for the custom metric's value. * * Generated from protobuf field .google.analytics.admin.v1beta.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED]; */ - private $measurement_unit = 0; + protected $measurement_unit = 0; /** * Required. Immutable. The scope of this custom metric. * * Generated from protobuf field .google.analytics.admin.v1beta.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ - private $scope = 0; + protected $scope = 0; /** * Optional. Types of restricted data that this metric may contain. Required * for metrics with CURRENCY measurement unit. Must be empty for metrics with diff --git a/AnalyticsAdmin/src/V1beta/CustomMetric/MeasurementUnit.php b/AnalyticsAdmin/src/V1beta/CustomMetric/MeasurementUnit.php index 1a36e23078f2..e2d0c3dde953 100644 --- a/AnalyticsAdmin/src/V1beta/CustomMetric/MeasurementUnit.php +++ b/AnalyticsAdmin/src/V1beta/CustomMetric/MeasurementUnit.php @@ -117,6 +117,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MeasurementUnit::class, \Google\Analytics\Admin\V1beta\CustomMetric_MeasurementUnit::class); diff --git a/AnalyticsAdmin/src/V1beta/CustomMetric/MetricScope.php b/AnalyticsAdmin/src/V1beta/CustomMetric/MetricScope.php index 4ddabfcd63ec..c00320310eb7 100644 --- a/AnalyticsAdmin/src/V1beta/CustomMetric/MetricScope.php +++ b/AnalyticsAdmin/src/V1beta/CustomMetric/MetricScope.php @@ -52,6 +52,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetricScope::class, \Google\Analytics\Admin\V1beta\CustomMetric_MetricScope::class); diff --git a/AnalyticsAdmin/src/V1beta/CustomMetric/RestrictedMetricType.php b/AnalyticsAdmin/src/V1beta/CustomMetric/RestrictedMetricType.php index 7736c4df629b..c272b65dde60 100644 --- a/AnalyticsAdmin/src/V1beta/CustomMetric/RestrictedMetricType.php +++ b/AnalyticsAdmin/src/V1beta/CustomMetric/RestrictedMetricType.php @@ -60,6 +60,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RestrictedMetricType::class, \Google\Analytics\Admin\V1beta\CustomMetric_RestrictedMetricType::class); diff --git a/AnalyticsAdmin/src/V1beta/DataRetentionSettings.php b/AnalyticsAdmin/src/V1beta/DataRetentionSettings.php index 6e8cb834c8b8..f159622c5654 100644 --- a/AnalyticsAdmin/src/V1beta/DataRetentionSettings.php +++ b/AnalyticsAdmin/src/V1beta/DataRetentionSettings.php @@ -21,20 +21,20 @@ class DataRetentionSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * The length of time that event-level data is retained. * * Generated from protobuf field .google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration event_data_retention = 2; */ - private $event_data_retention = 0; + protected $event_data_retention = 0; /** * If true, reset the retention period for the user identifier with every * event from that user. * * Generated from protobuf field bool reset_user_data_on_new_activity = 3; */ - private $reset_user_data_on_new_activity = false; + protected $reset_user_data_on_new_activity = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/DataRetentionSettings/RetentionDuration.php b/AnalyticsAdmin/src/V1beta/DataRetentionSettings/RetentionDuration.php index 11632b79f46a..f25f3fe64ad8 100644 --- a/AnalyticsAdmin/src/V1beta/DataRetentionSettings/RetentionDuration.php +++ b/AnalyticsAdmin/src/V1beta/DataRetentionSettings/RetentionDuration.php @@ -83,6 +83,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RetentionDuration::class, \Google\Analytics\Admin\V1beta\DataRetentionSettings_RetentionDuration::class); diff --git a/AnalyticsAdmin/src/V1beta/DataSharingSettings.php b/AnalyticsAdmin/src/V1beta/DataSharingSettings.php index f42898e2c5a9..10a5a4775e93 100644 --- a/AnalyticsAdmin/src/V1beta/DataSharingSettings.php +++ b/AnalyticsAdmin/src/V1beta/DataSharingSettings.php @@ -23,14 +23,14 @@ class DataSharingSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Allows Google support to access the data in order to help troubleshoot * issues. * * Generated from protobuf field bool sharing_with_google_support_enabled = 2; */ - private $sharing_with_google_support_enabled = false; + protected $sharing_with_google_support_enabled = false; /** * Allows Google sales teams that are assigned to the customer to access the * data in order to suggest configuration changes to improve results. @@ -38,26 +38,26 @@ class DataSharingSettings extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool sharing_with_google_assigned_sales_enabled = 3; */ - private $sharing_with_google_assigned_sales_enabled = false; + protected $sharing_with_google_assigned_sales_enabled = false; /** * Allows any of Google sales to access the data in order to suggest * configuration changes to improve results. * * Generated from protobuf field bool sharing_with_google_any_sales_enabled = 4; */ - private $sharing_with_google_any_sales_enabled = false; + protected $sharing_with_google_any_sales_enabled = false; /** * Allows Google to use the data to improve other Google products or services. * * Generated from protobuf field bool sharing_with_google_products_enabled = 5; */ - private $sharing_with_google_products_enabled = false; + protected $sharing_with_google_products_enabled = false; /** * Allows Google to share the data anonymously in aggregate form with others. * * Generated from protobuf field bool sharing_with_others_enabled = 6; */ - private $sharing_with_others_enabled = false; + protected $sharing_with_others_enabled = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/DataStream.php b/AnalyticsAdmin/src/V1beta/DataStream.php index 69428dfe957a..eb97eb73d435 100644 --- a/AnalyticsAdmin/src/V1beta/DataStream.php +++ b/AnalyticsAdmin/src/V1beta/DataStream.php @@ -22,13 +22,13 @@ class DataStream extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. Immutable. The type of this DataStream resource. * * Generated from protobuf field .google.analytics.admin.v1beta.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; */ - private $type = 0; + protected $type = 0; /** * Human-readable display name for the Data Stream. * Required for web data streams. @@ -36,19 +36,19 @@ class DataStream extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string display_name = 3; */ - private $display_name = ''; + protected $display_name = ''; /** * Output only. Time when this stream was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. Time when stream payload fields were last updated. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $update_time = null; + protected $update_time = null; protected $stream_data; /** diff --git a/AnalyticsAdmin/src/V1beta/DataStream/AndroidAppStreamData.php b/AnalyticsAdmin/src/V1beta/DataStream/AndroidAppStreamData.php index d840b9581566..95ed59d4e3a2 100644 --- a/AnalyticsAdmin/src/V1beta/DataStream/AndroidAppStreamData.php +++ b/AnalyticsAdmin/src/V1beta/DataStream/AndroidAppStreamData.php @@ -21,14 +21,14 @@ class AndroidAppStreamData extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $firebase_app_id = ''; + protected $firebase_app_id = ''; /** * Immutable. The package name for the app being measured. * Example: "com.example.myandroidapp" * * Generated from protobuf field string package_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $package_name = ''; + protected $package_name = ''; /** * Constructor. @@ -107,6 +107,4 @@ public function setPackageName($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AndroidAppStreamData::class, \Google\Analytics\Admin\V1beta\DataStream_AndroidAppStreamData::class); diff --git a/AnalyticsAdmin/src/V1beta/DataStream/DataStreamType.php b/AnalyticsAdmin/src/V1beta/DataStream/DataStreamType.php index f56bdc100a42..cbfe82eb7c1d 100644 --- a/AnalyticsAdmin/src/V1beta/DataStream/DataStreamType.php +++ b/AnalyticsAdmin/src/V1beta/DataStream/DataStreamType.php @@ -66,6 +66,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataStreamType::class, \Google\Analytics\Admin\V1beta\DataStream_DataStreamType::class); diff --git a/AnalyticsAdmin/src/V1beta/DataStream/IosAppStreamData.php b/AnalyticsAdmin/src/V1beta/DataStream/IosAppStreamData.php index eb94200dee66..dfe17298583c 100644 --- a/AnalyticsAdmin/src/V1beta/DataStream/IosAppStreamData.php +++ b/AnalyticsAdmin/src/V1beta/DataStream/IosAppStreamData.php @@ -21,14 +21,14 @@ class IosAppStreamData extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string firebase_app_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $firebase_app_id = ''; + protected $firebase_app_id = ''; /** * Required. Immutable. The Apple App Store Bundle ID for the app * Example: "com.example.myiosapp" * * Generated from protobuf field string bundle_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; */ - private $bundle_id = ''; + protected $bundle_id = ''; /** * Constructor. @@ -107,6 +107,4 @@ public function setBundleId($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IosAppStreamData::class, \Google\Analytics\Admin\V1beta\DataStream_IosAppStreamData::class); diff --git a/AnalyticsAdmin/src/V1beta/DataStream/WebStreamData.php b/AnalyticsAdmin/src/V1beta/DataStream/WebStreamData.php index 99cf1678bfbb..696076426ff4 100644 --- a/AnalyticsAdmin/src/V1beta/DataStream/WebStreamData.php +++ b/AnalyticsAdmin/src/V1beta/DataStream/WebStreamData.php @@ -21,21 +21,21 @@ class WebStreamData extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string measurement_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $measurement_id = ''; + protected $measurement_id = ''; /** * Output only. ID of the corresponding web app in Firebase, if any. * This ID can change if the web app is deleted and recreated. * * Generated from protobuf field string firebase_app_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $firebase_app_id = ''; + protected $firebase_app_id = ''; /** * Domain name of the web app being measured, or empty. * Example: "http://www.google.com", "https://www.google.com" * * Generated from protobuf field string default_uri = 3; */ - private $default_uri = ''; + protected $default_uri = ''; /** * Constructor. @@ -145,6 +145,4 @@ public function setDefaultUri($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebStreamData::class, \Google\Analytics\Admin\V1beta\DataStream_WebStreamData::class); diff --git a/AnalyticsAdmin/src/V1beta/DeleteAccountRequest.php b/AnalyticsAdmin/src/V1beta/DeleteAccountRequest.php index f8d51d280fb2..4e8c387e03ed 100644 --- a/AnalyticsAdmin/src/V1beta/DeleteAccountRequest.php +++ b/AnalyticsAdmin/src/V1beta/DeleteAccountRequest.php @@ -22,7 +22,7 @@ class DeleteAccountRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the Account to soft-delete. diff --git a/AnalyticsAdmin/src/V1beta/DeleteConversionEventRequest.php b/AnalyticsAdmin/src/V1beta/DeleteConversionEventRequest.php index 072bb140c300..c10da9d7155c 100644 --- a/AnalyticsAdmin/src/V1beta/DeleteConversionEventRequest.php +++ b/AnalyticsAdmin/src/V1beta/DeleteConversionEventRequest.php @@ -22,7 +22,7 @@ class DeleteConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The resource name of the conversion event to delete. diff --git a/AnalyticsAdmin/src/V1beta/DeleteDataStreamRequest.php b/AnalyticsAdmin/src/V1beta/DeleteDataStreamRequest.php index 7be8add91be2..1743a5808221 100644 --- a/AnalyticsAdmin/src/V1beta/DeleteDataStreamRequest.php +++ b/AnalyticsAdmin/src/V1beta/DeleteDataStreamRequest.php @@ -21,7 +21,7 @@ class DeleteDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the DataStream to delete. diff --git a/AnalyticsAdmin/src/V1beta/DeleteFirebaseLinkRequest.php b/AnalyticsAdmin/src/V1beta/DeleteFirebaseLinkRequest.php index 0ccfcdc7164d..56ef0eb223b0 100644 --- a/AnalyticsAdmin/src/V1beta/DeleteFirebaseLinkRequest.php +++ b/AnalyticsAdmin/src/V1beta/DeleteFirebaseLinkRequest.php @@ -21,7 +21,7 @@ class DeleteFirebaseLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} diff --git a/AnalyticsAdmin/src/V1beta/DeleteGoogleAdsLinkRequest.php b/AnalyticsAdmin/src/V1beta/DeleteGoogleAdsLinkRequest.php index 9bf67f24cc20..a0e08a72a199 100644 --- a/AnalyticsAdmin/src/V1beta/DeleteGoogleAdsLinkRequest.php +++ b/AnalyticsAdmin/src/V1beta/DeleteGoogleAdsLinkRequest.php @@ -20,7 +20,7 @@ class DeleteGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. Example format: properties/1234/googleAdsLinks/5678 diff --git a/AnalyticsAdmin/src/V1beta/DeleteKeyEventRequest.php b/AnalyticsAdmin/src/V1beta/DeleteKeyEventRequest.php index c2572a90ba5f..eedbb5780628 100644 --- a/AnalyticsAdmin/src/V1beta/DeleteKeyEventRequest.php +++ b/AnalyticsAdmin/src/V1beta/DeleteKeyEventRequest.php @@ -22,7 +22,7 @@ class DeleteKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The resource name of the Key Event to delete. diff --git a/AnalyticsAdmin/src/V1beta/DeleteMeasurementProtocolSecretRequest.php b/AnalyticsAdmin/src/V1beta/DeleteMeasurementProtocolSecretRequest.php index 8bbe8428d3ab..11d1855ca0c8 100644 --- a/AnalyticsAdmin/src/V1beta/DeleteMeasurementProtocolSecretRequest.php +++ b/AnalyticsAdmin/src/V1beta/DeleteMeasurementProtocolSecretRequest.php @@ -22,7 +22,7 @@ class DeleteMeasurementProtocolSecretRequest extends \Google\Protobuf\Internal\M * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the MeasurementProtocolSecret to delete. diff --git a/AnalyticsAdmin/src/V1beta/DeletePropertyRequest.php b/AnalyticsAdmin/src/V1beta/DeletePropertyRequest.php index 13cdffb757ad..0f1066e9be4c 100644 --- a/AnalyticsAdmin/src/V1beta/DeletePropertyRequest.php +++ b/AnalyticsAdmin/src/V1beta/DeletePropertyRequest.php @@ -22,7 +22,7 @@ class DeletePropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the Property to soft-delete. diff --git a/AnalyticsAdmin/src/V1beta/FirebaseLink.php b/AnalyticsAdmin/src/V1beta/FirebaseLink.php index 645e82c3801e..fb86b8060dc8 100644 --- a/AnalyticsAdmin/src/V1beta/FirebaseLink.php +++ b/AnalyticsAdmin/src/V1beta/FirebaseLink.php @@ -20,7 +20,7 @@ class FirebaseLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. Firebase project resource name. When creating a FirebaseLink, * you may provide this resource name using either a project number or project @@ -31,13 +31,13 @@ class FirebaseLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $project = ''; + protected $project = ''; /** * Output only. Time when this FirebaseLink was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/Gapic/AnalyticsAdminServiceGapicClient.php b/AnalyticsAdmin/src/V1beta/Gapic/AnalyticsAdminServiceGapicClient.php deleted file mode 100644 index 1a5c8fb592db..000000000000 --- a/AnalyticsAdmin/src/V1beta/Gapic/AnalyticsAdminServiceGapicClient.php +++ /dev/null @@ -1,3678 +0,0 @@ -propertyName('[PROPERTY]'); - * $acknowledgement = 'acknowledgement'; - * $response = $analyticsAdminServiceClient->acknowledgeUserDataCollection($formattedProperty, $acknowledgement); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * 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 parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - * - * @deprecated Please use the new service client {@see \Google\Analytics\Admin\V1beta\Client\AnalyticsAdminServiceClient}. - */ -class AnalyticsAdminServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.analytics.admin.v1beta.AnalyticsAdminService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'analyticsadmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'analyticsadmin.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/analytics.edit', - 'https://www.googleapis.com/auth/analytics.readonly', - ]; - - private static $accountNameTemplate; - - private static $conversionEventNameTemplate; - - private static $customDimensionNameTemplate; - - private static $customMetricNameTemplate; - - private static $dataRetentionSettingsNameTemplate; - - private static $dataSharingSettingsNameTemplate; - - private static $dataStreamNameTemplate; - - private static $firebaseLinkNameTemplate; - - private static $googleAdsLinkNameTemplate; - - private static $keyEventNameTemplate; - - private static $measurementProtocolSecretNameTemplate; - - private static $organizationNameTemplate; - - private static $propertyNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/analytics_admin_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/analytics_admin_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/analytics_admin_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/analytics_admin_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAccountNameTemplate() - { - if (self::$accountNameTemplate == null) { - self::$accountNameTemplate = new PathTemplate('accounts/{account}'); - } - - return self::$accountNameTemplate; - } - - private static function getConversionEventNameTemplate() - { - if (self::$conversionEventNameTemplate == null) { - self::$conversionEventNameTemplate = new PathTemplate('properties/{property}/conversionEvents/{conversion_event}'); - } - - return self::$conversionEventNameTemplate; - } - - private static function getCustomDimensionNameTemplate() - { - if (self::$customDimensionNameTemplate == null) { - self::$customDimensionNameTemplate = new PathTemplate('properties/{property}/customDimensions/{custom_dimension}'); - } - - return self::$customDimensionNameTemplate; - } - - private static function getCustomMetricNameTemplate() - { - if (self::$customMetricNameTemplate == null) { - self::$customMetricNameTemplate = new PathTemplate('properties/{property}/customMetrics/{custom_metric}'); - } - - return self::$customMetricNameTemplate; - } - - private static function getDataRetentionSettingsNameTemplate() - { - if (self::$dataRetentionSettingsNameTemplate == null) { - self::$dataRetentionSettingsNameTemplate = new PathTemplate('properties/{property}/dataRetentionSettings'); - } - - return self::$dataRetentionSettingsNameTemplate; - } - - private static function getDataSharingSettingsNameTemplate() - { - if (self::$dataSharingSettingsNameTemplate == null) { - self::$dataSharingSettingsNameTemplate = new PathTemplate('accounts/{account}/dataSharingSettings'); - } - - return self::$dataSharingSettingsNameTemplate; - } - - private static function getDataStreamNameTemplate() - { - if (self::$dataStreamNameTemplate == null) { - self::$dataStreamNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}'); - } - - return self::$dataStreamNameTemplate; - } - - private static function getFirebaseLinkNameTemplate() - { - if (self::$firebaseLinkNameTemplate == null) { - self::$firebaseLinkNameTemplate = new PathTemplate('properties/{property}/firebaseLinks/{firebase_link}'); - } - - return self::$firebaseLinkNameTemplate; - } - - private static function getGoogleAdsLinkNameTemplate() - { - if (self::$googleAdsLinkNameTemplate == null) { - self::$googleAdsLinkNameTemplate = new PathTemplate('properties/{property}/googleAdsLinks/{google_ads_link}'); - } - - return self::$googleAdsLinkNameTemplate; - } - - private static function getKeyEventNameTemplate() - { - if (self::$keyEventNameTemplate == null) { - self::$keyEventNameTemplate = new PathTemplate('properties/{property}/keyEvents/{key_event}'); - } - - return self::$keyEventNameTemplate; - } - - private static function getMeasurementProtocolSecretNameTemplate() - { - if (self::$measurementProtocolSecretNameTemplate == null) { - self::$measurementProtocolSecretNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}'); - } - - return self::$measurementProtocolSecretNameTemplate; - } - - private static function getOrganizationNameTemplate() - { - if (self::$organizationNameTemplate == null) { - self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); - } - - return self::$organizationNameTemplate; - } - - private static function getPropertyNameTemplate() - { - if (self::$propertyNameTemplate == null) { - self::$propertyNameTemplate = new PathTemplate('properties/{property}'); - } - - return self::$propertyNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'account' => self::getAccountNameTemplate(), - 'conversionEvent' => self::getConversionEventNameTemplate(), - 'customDimension' => self::getCustomDimensionNameTemplate(), - 'customMetric' => self::getCustomMetricNameTemplate(), - 'dataRetentionSettings' => self::getDataRetentionSettingsNameTemplate(), - 'dataSharingSettings' => self::getDataSharingSettingsNameTemplate(), - 'dataStream' => self::getDataStreamNameTemplate(), - 'firebaseLink' => self::getFirebaseLinkNameTemplate(), - 'googleAdsLink' => self::getGoogleAdsLinkNameTemplate(), - 'keyEvent' => self::getKeyEventNameTemplate(), - 'measurementProtocolSecret' => self::getMeasurementProtocolSecretNameTemplate(), - 'organization' => self::getOrganizationNameTemplate(), - 'property' => self::getPropertyNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a account - * resource. - * - * @param string $account - * - * @return string The formatted account resource. - * - * @experimental - */ - public static function accountName($account) - { - return self::getAccountNameTemplate()->render([ - 'account' => $account, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * conversion_event resource. - * - * @param string $property - * @param string $conversionEvent - * - * @return string The formatted conversion_event resource. - * - * @experimental - */ - public static function conversionEventName($property, $conversionEvent) - { - return self::getConversionEventNameTemplate()->render([ - 'property' => $property, - 'conversion_event' => $conversionEvent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * custom_dimension resource. - * - * @param string $property - * @param string $customDimension - * - * @return string The formatted custom_dimension resource. - * - * @experimental - */ - public static function customDimensionName($property, $customDimension) - { - return self::getCustomDimensionNameTemplate()->render([ - 'property' => $property, - 'custom_dimension' => $customDimension, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * custom_metric resource. - * - * @param string $property - * @param string $customMetric - * - * @return string The formatted custom_metric resource. - * - * @experimental - */ - public static function customMetricName($property, $customMetric) - { - return self::getCustomMetricNameTemplate()->render([ - 'property' => $property, - 'custom_metric' => $customMetric, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_retention_settings resource. - * - * @param string $property - * - * @return string The formatted data_retention_settings resource. - * - * @experimental - */ - public static function dataRetentionSettingsName($property) - { - return self::getDataRetentionSettingsNameTemplate()->render([ - 'property' => $property, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_sharing_settings resource. - * - * @param string $account - * - * @return string The formatted data_sharing_settings resource. - * - * @experimental - */ - public static function dataSharingSettingsName($account) - { - return self::getDataSharingSettingsNameTemplate()->render([ - 'account' => $account, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a data_stream - * resource. - * - * @param string $property - * @param string $dataStream - * - * @return string The formatted data_stream resource. - * - * @experimental - */ - public static function dataStreamName($property, $dataStream) - { - return self::getDataStreamNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * firebase_link resource. - * - * @param string $property - * @param string $firebaseLink - * - * @return string The formatted firebase_link resource. - * - * @experimental - */ - public static function firebaseLinkName($property, $firebaseLink) - { - return self::getFirebaseLinkNameTemplate()->render([ - 'property' => $property, - 'firebase_link' => $firebaseLink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * google_ads_link resource. - * - * @param string $property - * @param string $googleAdsLink - * - * @return string The formatted google_ads_link resource. - * - * @experimental - */ - public static function googleAdsLinkName($property, $googleAdsLink) - { - return self::getGoogleAdsLinkNameTemplate()->render([ - 'property' => $property, - 'google_ads_link' => $googleAdsLink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a key_event - * resource. - * - * @param string $property - * @param string $keyEvent - * - * @return string The formatted key_event resource. - * - * @experimental - */ - public static function keyEventName($property, $keyEvent) - { - return self::getKeyEventNameTemplate()->render([ - 'property' => $property, - 'key_event' => $keyEvent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * measurement_protocol_secret resource. - * - * @param string $property - * @param string $dataStream - * @param string $measurementProtocolSecret - * - * @return string The formatted measurement_protocol_secret resource. - * - * @experimental - */ - public static function measurementProtocolSecretName($property, $dataStream, $measurementProtocolSecret) - { - return self::getMeasurementProtocolSecretNameTemplate()->render([ - 'property' => $property, - 'data_stream' => $dataStream, - 'measurement_protocol_secret' => $measurementProtocolSecret, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - * - * @experimental - */ - public static function organizationName($organization) - { - return self::getOrganizationNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a property - * resource. - * - * @param string $property - * - * @return string The formatted property resource. - * - * @experimental - */ - public static function propertyName($property) - { - return self::getPropertyNameTemplate()->render([ - 'property' => $property, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - account: accounts/{account} - * - conversionEvent: properties/{property}/conversionEvents/{conversion_event} - * - customDimension: properties/{property}/customDimensions/{custom_dimension} - * - customMetric: properties/{property}/customMetrics/{custom_metric} - * - dataRetentionSettings: properties/{property}/dataRetentionSettings - * - dataSharingSettings: accounts/{account}/dataSharingSettings - * - dataStream: properties/{property}/dataStreams/{data_stream} - * - firebaseLink: properties/{property}/firebaseLinks/{firebase_link} - * - googleAdsLink: properties/{property}/googleAdsLinks/{google_ads_link} - * - keyEvent: properties/{property}/keyEvents/{key_event} - * - measurementProtocolSecret: properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret} - * - organization: organizations/{organization} - * - property: properties/{property} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'analyticsadmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Acknowledges the terms of user data collection for the specified property. - * - * This acknowledgement must be completed (either in the Google Analytics UI - * or through this API) before MeasurementProtocolSecret resources may be - * created. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedProperty = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $acknowledgement = 'acknowledgement'; - * $response = $analyticsAdminServiceClient->acknowledgeUserDataCollection($formattedProperty, $acknowledgement); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $property Required. The property for which to acknowledge user data collection. - * @param string $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." - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\AcknowledgeUserDataCollectionResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function acknowledgeUserDataCollection($property, $acknowledgement, array $optionalArgs = []) - { - $request = new AcknowledgeUserDataCollectionRequest(); - $requestParamHeaders = []; - $request->setProperty($property); - $request->setAcknowledgement($acknowledgement); - $requestParamHeaders['property'] = $property; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AcknowledgeUserDataCollection', AcknowledgeUserDataCollectionResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Archives a CustomDimension on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - * $analyticsAdminServiceClient->archiveCustomDimension($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CustomDimension to archive. - * Example format: properties/1234/customDimensions/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function archiveCustomDimension($name, array $optionalArgs = []) - { - $request = new ArchiveCustomDimensionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ArchiveCustomDimension', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Archives a CustomMetric on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - * $analyticsAdminServiceClient->archiveCustomMetric($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CustomMetric to archive. - * Example format: properties/1234/customMetrics/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function archiveCustomMetric($name, array $optionalArgs = []) - { - $request = new ArchiveCustomMetricRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ArchiveCustomMetric', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deprecated: Use `CreateKeyEvent` instead. - * Creates a conversion event with the specified attributes. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $conversionEvent = new ConversionEvent(); - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->createConversionEvent($conversionEvent, $formattedParent); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param ConversionEvent $conversionEvent Required. The conversion event to create. - * @param string $parent Required. The resource name of the parent property where this conversion - * event will be created. Format: properties/123 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\ConversionEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function createConversionEvent($conversionEvent, $parent, array $optionalArgs = []) - { - $request = new CreateConversionEventRequest(); - $requestParamHeaders = []; - $request->setConversionEvent($conversionEvent); - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateConversionEvent', ConversionEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a CustomDimension. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $customDimension = new CustomDimension(); - * $response = $analyticsAdminServiceClient->createCustomDimension($formattedParent, $customDimension); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param CustomDimension $customDimension Required. The CustomDimension to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\CustomDimension - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createCustomDimension($parent, $customDimension, array $optionalArgs = []) - { - $request = new CreateCustomDimensionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCustomDimension($customDimension); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateCustomDimension', CustomDimension::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a CustomMetric. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $customMetric = new CustomMetric(); - * $response = $analyticsAdminServiceClient->createCustomMetric($formattedParent, $customMetric); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param CustomMetric $customMetric Required. The CustomMetric to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\CustomMetric - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createCustomMetric($parent, $customMetric, array $optionalArgs = []) - { - $request = new CreateCustomMetricRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCustomMetric($customMetric); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateCustomMetric', CustomMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a DataStream. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $dataStream = new DataStream(); - * $response = $analyticsAdminServiceClient->createDataStream($formattedParent, $dataStream); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param DataStream $dataStream Required. The DataStream to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\DataStream - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createDataStream($parent, $dataStream, array $optionalArgs = []) - { - $request = new CreateDataStreamRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataStream($dataStream); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDataStream', DataStream::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a FirebaseLink. - * - * Properties can have at most one FirebaseLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $firebaseLink = new FirebaseLink(); - * $response = $analyticsAdminServiceClient->createFirebaseLink($formattedParent, $firebaseLink); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Format: properties/{property_id} - * - * Example: `properties/1234` - * @param FirebaseLink $firebaseLink Required. The Firebase link to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\FirebaseLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createFirebaseLink($parent, $firebaseLink, array $optionalArgs = []) - { - $request = new CreateFirebaseLinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setFirebaseLink($firebaseLink); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateFirebaseLink', FirebaseLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a GoogleAdsLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $googleAdsLink = new GoogleAdsLink(); - * $response = $analyticsAdminServiceClient->createGoogleAdsLink($formattedParent, $googleAdsLink); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param GoogleAdsLink $googleAdsLink Required. The GoogleAdsLink to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\GoogleAdsLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createGoogleAdsLink($parent, $googleAdsLink, array $optionalArgs = []) - { - $request = new CreateGoogleAdsLinkRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGoogleAdsLink($googleAdsLink); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateGoogleAdsLink', GoogleAdsLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a Key Event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $keyEvent = new KeyEvent(); - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->createKeyEvent($keyEvent, $formattedParent); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param KeyEvent $keyEvent Required. The Key Event to create. - * @param string $parent Required. The resource name of the parent property where this Key Event - * will be created. Format: properties/123 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\KeyEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createKeyEvent($keyEvent, $parent, array $optionalArgs = []) - { - $request = new CreateKeyEventRequest(); - $requestParamHeaders = []; - $request->setKeyEvent($keyEvent); - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateKeyEvent', KeyEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a measurement protocol secret. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $measurementProtocolSecret = new MeasurementProtocolSecret(); - * $response = $analyticsAdminServiceClient->createMeasurementProtocolSecret($formattedParent, $measurementProtocolSecret); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource where this secret will be created. - * Format: properties/{property}/dataStreams/{dataStream} - * @param MeasurementProtocolSecret $measurementProtocolSecret Required. The measurement protocol secret to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\MeasurementProtocolSecret - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createMeasurementProtocolSecret($parent, $measurementProtocolSecret, array $optionalArgs = []) - { - $request = new CreateMeasurementProtocolSecretRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setMeasurementProtocolSecret($measurementProtocolSecret); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateMeasurementProtocolSecret', MeasurementProtocolSecret::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an "GA4" property with the specified location and attributes. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $property = new Property(); - * $response = $analyticsAdminServiceClient->createProperty($property); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param Property $property Required. The property to create. - * Note: the supplied property must specify its parent. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\Property - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createProperty($property, array $optionalArgs = []) - { - $request = new CreatePropertyRequest(); - $request->setProperty($property); - return $this->startCall('CreateProperty', Property::class, $optionalArgs, $request)->wait(); - } - - /** - * 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, - * AccessBindings) will be permanently purged. - * https://support.google.com/analytics/answer/6154772 - * - * Returns an error if the target is not found. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * $analyticsAdminServiceClient->deleteAccount($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the Account to soft-delete. - * Format: accounts/{account} - * Example: "accounts/100" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteAccount($name, array $optionalArgs = []) - { - $request = new DeleteAccountRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAccount', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deprecated: Use `DeleteKeyEvent` instead. - * Deletes a conversion event in a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - * $analyticsAdminServiceClient->deleteConversionEvent($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the conversion event to delete. - * Format: properties/{property}/conversionEvents/{conversion_event} - * Example: "properties/123/conversionEvents/456" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function deleteConversionEvent($name, array $optionalArgs = []) - { - $request = new DeleteConversionEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteConversionEvent', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a DataStream on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $analyticsAdminServiceClient->deleteDataStream($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DataStream to delete. - * Example format: properties/1234/dataStreams/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteDataStream($name, array $optionalArgs = []) - { - $request = new DeleteDataStreamRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteDataStream', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a FirebaseLink on a property - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - * $analyticsAdminServiceClient->deleteFirebaseLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} - * - * Example: `properties/1234/firebaseLinks/5678` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteFirebaseLink($name, array $optionalArgs = []) - { - $request = new DeleteFirebaseLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteFirebaseLink', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a GoogleAdsLink on a property - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - * $analyticsAdminServiceClient->deleteGoogleAdsLink($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Example format: properties/1234/googleAdsLinks/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteGoogleAdsLink($name, array $optionalArgs = []) - { - $request = new DeleteGoogleAdsLinkRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteGoogleAdsLink', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a Key Event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - * $analyticsAdminServiceClient->deleteKeyEvent($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Key Event to delete. - * Format: properties/{property}/keyEvents/{key_event} - * Example: "properties/123/keyEvents/456" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteKeyEvent($name, array $optionalArgs = []) - { - $request = new DeleteKeyEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteKeyEvent', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes target MeasurementProtocolSecret. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - * $analyticsAdminServiceClient->deleteMeasurementProtocolSecret($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the MeasurementProtocolSecret to delete. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteMeasurementProtocolSecret($name, array $optionalArgs = []) - { - $request = new DeleteMeasurementProtocolSecretRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteMeasurementProtocolSecret', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * 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, AccessBindings) - * will be permanently purged. - * https://support.google.com/analytics/answer/6154772 - * - * Returns an error if the target is not found, or is not a GA4 Property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->deleteProperty($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the Property to soft-delete. - * Format: properties/{property_id} - * Example: "properties/1000" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\Property - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteProperty($name, array $optionalArgs = []) - { - $request = new DeletePropertyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteProperty', Property::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single Account. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * $response = $analyticsAdminServiceClient->getAccount($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the account to lookup. - * Format: accounts/{account} - * Example: "accounts/100" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\Account - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getAccount($name, array $optionalArgs = []) - { - $request = new GetAccountRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAccount', Account::class, $optionalArgs, $request)->wait(); - } - - /** - * Deprecated: Use `GetKeyEvent` instead. - * Retrieve a single conversion event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - * $response = $analyticsAdminServiceClient->getConversionEvent($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the conversion event to retrieve. - * Format: properties/{property}/conversionEvents/{conversion_event} - * Example: "properties/123/conversionEvents/456" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\ConversionEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function getConversionEvent($name, array $optionalArgs = []) - { - $request = new GetConversionEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetConversionEvent', ConversionEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single CustomDimension. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - * $response = $analyticsAdminServiceClient->getCustomDimension($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CustomDimension to get. - * Example format: properties/1234/customDimensions/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\CustomDimension - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getCustomDimension($name, array $optionalArgs = []) - { - $request = new GetCustomDimensionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCustomDimension', CustomDimension::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single CustomMetric. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - * $response = $analyticsAdminServiceClient->getCustomMetric($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the CustomMetric to get. - * Example format: properties/1234/customMetrics/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\CustomMetric - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getCustomMetric($name, array $optionalArgs = []) - { - $request = new GetCustomMetricRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCustomMetric', CustomMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the singleton data retention settings for this property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->dataRetentionSettingsName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->getDataRetentionSettings($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the settings to lookup. - * Format: - * properties/{property}/dataRetentionSettings - * Example: "properties/1000/dataRetentionSettings" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\DataRetentionSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDataRetentionSettings($name, array $optionalArgs = []) - { - $request = new GetDataRetentionSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataRetentionSettings', DataRetentionSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Get data sharing settings on an account. - * Data sharing settings are singletons. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->dataSharingSettingsName('[ACCOUNT]'); - * $response = $analyticsAdminServiceClient->getDataSharingSettings($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the settings to lookup. - * Format: accounts/{account}/dataSharingSettings - * - * Example: `accounts/1000/dataSharingSettings` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\DataSharingSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDataSharingSettings($name, array $optionalArgs = []) - { - $request = new GetDataSharingSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataSharingSettings', DataSharingSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single DataStream. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * $response = $analyticsAdminServiceClient->getDataStream($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the DataStream to get. - * Example format: properties/1234/dataStreams/5678 - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\DataStream - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getDataStream($name, array $optionalArgs = []) - { - $request = new GetDataStreamRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataStream', DataStream::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieve a single Key Event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - * $response = $analyticsAdminServiceClient->getKeyEvent($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Key Event to retrieve. - * Format: properties/{property}/keyEvents/{key_event} - * Example: "properties/123/keyEvents/456" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\KeyEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getKeyEvent($name, array $optionalArgs = []) - { - $request = new GetKeyEventRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetKeyEvent', KeyEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single "GA4" MeasurementProtocolSecret. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - * $response = $analyticsAdminServiceClient->getMeasurementProtocolSecret($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the measurement protocol secret to lookup. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\MeasurementProtocolSecret - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getMeasurementProtocolSecret($name, array $optionalArgs = []) - { - $request = new GetMeasurementProtocolSecretRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetMeasurementProtocolSecret', MeasurementProtocolSecret::class, $optionalArgs, $request)->wait(); - } - - /** - * Lookup for a single "GA4" Property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedName = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * $response = $analyticsAdminServiceClient->getProperty($formattedName); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the property to lookup. - * Format: properties/{property_id} - * Example: "properties/1000" - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\Property - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getProperty($name, array $optionalArgs = []) - { - $request = new GetPropertyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetProperty', Property::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns summaries of all accounts accessible by the caller. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listAccountSummaries(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listAccountSummaries(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listAccountSummaries(array $optionalArgs = []) - { - $request = new ListAccountSummariesRequest(); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - return $this->getPagedListResponse('ListAccountSummaries', $optionalArgs, ListAccountSummariesResponse::class, $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. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listAccounts(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listAccounts(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type bool $showDeleted - * Whether to include soft-deleted (ie: "trashed") Accounts in the - * results. Accounts can be inspected to determine whether they are deleted or - * not. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listAccounts(array $optionalArgs = []) - { - $request = new ListAccountsRequest(); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['showDeleted'])) { - $request->setShowDeleted($optionalArgs['showDeleted']); - } - - return $this->getPagedListResponse('ListAccounts', $optionalArgs, ListAccountsResponse::class, $request); - } - - /** - * Deprecated: Use `ListKeyEvents` instead. - * Returns a list of conversion events in the specified parent property. - * - * Returns an empty list if no conversion events are found. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listConversionEvents($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listConversionEvents($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent property. - * Example: 'properties/123' - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function listConversionEvents($parent, array $optionalArgs = []) - { - $request = new ListConversionEventsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListConversionEvents', $optionalArgs, ListConversionEventsResponse::class, $request); - } - - /** - * Lists CustomDimensions on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listCustomDimensions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listCustomDimensions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listCustomDimensions($parent, array $optionalArgs = []) - { - $request = new ListCustomDimensionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCustomDimensions', $optionalArgs, ListCustomDimensionsResponse::class, $request); - } - - /** - * Lists CustomMetrics on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listCustomMetrics($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listCustomMetrics($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listCustomMetrics($parent, array $optionalArgs = []) - { - $request = new ListCustomMetricsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCustomMetrics', $optionalArgs, ListCustomMetricsResponse::class, $request); - } - - /** - * Lists DataStreams on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listDataStreams($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listDataStreams($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listDataStreams($parent, array $optionalArgs = []) - { - $request = new ListDataStreamsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataStreams', $optionalArgs, ListDataStreamsResponse::class, $request); - } - - /** - * Lists FirebaseLinks on a property. - * Properties can have at most one FirebaseLink. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listFirebaseLinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listFirebaseLinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Format: properties/{property_id} - * - * Example: `properties/1234` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listFirebaseLinks($parent, array $optionalArgs = []) - { - $request = new ListFirebaseLinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListFirebaseLinks', $optionalArgs, ListFirebaseLinksResponse::class, $request); - } - - /** - * Lists GoogleAdsLinks on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listGoogleAdsLinks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listGoogleAdsLinks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Example format: properties/1234 - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listGoogleAdsLinks($parent, array $optionalArgs = []) - { - $request = new ListGoogleAdsLinksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGoogleAdsLinks', $optionalArgs, ListGoogleAdsLinksResponse::class, $request); - } - - /** - * Returns a list of Key Events in the specified parent property. - * Returns an empty list if no Key Events are found. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->propertyName('[PROPERTY]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listKeyEvents($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listKeyEvents($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent property. - * Example: 'properties/123' - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listKeyEvents($parent, array $optionalArgs = []) - { - $request = new ListKeyEventsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListKeyEvents', $optionalArgs, ListKeyEventsResponse::class, $request); - } - - /** - * Returns child MeasurementProtocolSecrets under the specified parent - * Property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedParent = $analyticsAdminServiceClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listMeasurementProtocolSecrets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listMeasurementProtocolSecrets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent stream. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listMeasurementProtocolSecrets($parent, array $optionalArgs = []) - { - $request = new ListMeasurementProtocolSecretsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListMeasurementProtocolSecrets', $optionalArgs, ListMeasurementProtocolSecretsResponse::class, $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. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $filter = 'filter'; - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->listProperties($filter); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->listProperties($filter); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $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. | - * ``` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type bool $showDeleted - * Whether to include soft-deleted (ie: "trashed") Properties in the - * results. Properties can be inspected to determine whether they are deleted - * or not. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listProperties($filter, array $optionalArgs = []) - { - $request = new ListPropertiesRequest(); - $request->setFilter($filter); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['showDeleted'])) { - $request->setShowDeleted($optionalArgs['showDeleted']); - } - - return $this->getPagedListResponse('ListProperties', $optionalArgs, ListPropertiesResponse::class, $request); - } - - /** - * Requests a ticket for creating an account. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $response = $analyticsAdminServiceClient->provisionAccountTicket(); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type Account $account - * The account to create. - * @type string $redirectUri - * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Cloud Console as a Redirect URI. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\ProvisionAccountTicketResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function provisionAccountTicket(array $optionalArgs = []) - { - $request = new ProvisionAccountTicketRequest(); - if (isset($optionalArgs['account'])) { - $request->setAccount($optionalArgs['account']); - } - - if (isset($optionalArgs['redirectUri'])) { - $request->setRedirectUri($optionalArgs['redirectUri']); - } - - return $this->startCall('ProvisionAccountTicket', ProvisionAccountTicketResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a customized report of data access records. The report provides - * records of each time a user reads Google Analytics reporting data. Access - * records are retained for up to 2 years. - * - * Data Access Reports can be requested for a property. Reports may be - * requested for any property, but dimensions that aren't related to quota can - * only be requested on Google Analytics 360 properties. This method is only - * available to Administrators. - * - * These data access records include GA4 UI Reporting, GA4 UI Explorations, - * GA4 Data API, and other products like Firebase & Admob that can retrieve - * data from Google Analytics through a linkage. These records don't include - * property configuration changes like adding a stream or changing a - * property's time zone. For configuration change history, see - * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $response = $analyticsAdminServiceClient->runAccessReport(); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $entity - * The Data Access Report supports requesting at the property level or account - * level. If requested at the account level, Data Access Reports include all - * access for all properties under that account. - * - * To request at the property level, entity should be for example - * 'properties/123' if "123" is your GA4 property ID. To request at the - * account level, entity should be for example 'accounts/1234' if "1234" is - * your GA4 Account ID. - * @type AccessDimension[] $dimensions - * The dimensions requested and displayed in the response. Requests are - * allowed up to 9 dimensions. - * @type AccessMetric[] $metrics - * The metrics requested and displayed in the response. Requests are allowed - * up to 10 metrics. - * @type AccessDateRange[] $dateRanges - * Date ranges of access records to read. If multiple date ranges are - * requested, each response row will contain a zero based date range index. If - * two date ranges overlap, the access records for the overlapping days is - * included in the response rows for both date ranges. Requests are allowed up - * to 2 date ranges. - * @type AccessFilterExpression $dimensionFilter - * Dimension filters let you restrict report response to specific - * dimension values which match the filter. For example, filtering on access - * records of a single user. To learn more, see [Fundamentals of Dimension - * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) - * for examples. Metrics cannot be used in this filter. - * @type AccessFilterExpression $metricFilter - * Metric filters allow you to restrict report response to specific metric - * values which match the filter. Metric filters are applied after aggregating - * the report's rows, similar to SQL having-clause. Dimensions cannot be used - * in this filter. - * @type int $offset - * The row count of the start row. The first row is counted as row 0. If - * offset is unspecified, it is treated as 0. If offset is zero, then this - * method will return the first page of results with `limit` entries. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @type int $limit - * The number of rows to return. If unspecified, 10,000 rows are returned. The - * API returns a maximum of 100,000 rows per request, no matter how many you - * ask for. `limit` must be positive. - * - * The API may return fewer rows than the requested `limit`, if there aren't - * as many remaining rows as the `limit`. For instance, there are fewer than - * 300 possible values for the dimension `country`, so when reporting on only - * `country`, you can't get more than 300 rows, even if you set `limit` to a - * higher value. - * - * To learn more about this pagination parameter, see - * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). - * @type string $timeZone - * This request's time zone if specified. If unspecified, the property's time - * zone is used. The request's time zone is used to interpret the start & end - * dates of the report. - * - * Formatted as strings from the IANA Time Zone database - * (https://www.iana.org/time-zones); for example "America/New_York" or - * "Asia/Tokyo". - * @type AccessOrderBy[] $orderBys - * Specifies how rows are ordered in the response. - * @type bool $returnEntityQuota - * Toggles whether to return the current state of this Analytics Property's - * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level - * requests, this field must be false. - * @type bool $includeAllUsers - * Optional. Determines whether to include users who have never made an API - * call in the response. If true, all users with access to the specified - * property or account are included in the response, regardless of whether - * they have made an API call or not. If false, only the users who have made - * an API call will be included. - * @type bool $expandGroups - * Optional. Decides whether to return the users within user groups. This - * field works only when include_all_users is set to true. If true, it will - * return all users with access to the specified property or account. - * If false, only the users with direct access will be returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\RunAccessReportResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function runAccessReport(array $optionalArgs = []) - { - $request = new RunAccessReportRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['entity'])) { - $request->setEntity($optionalArgs['entity']); - $requestParamHeaders['entity'] = $optionalArgs['entity']; - } - - if (isset($optionalArgs['dimensions'])) { - $request->setDimensions($optionalArgs['dimensions']); - } - - if (isset($optionalArgs['metrics'])) { - $request->setMetrics($optionalArgs['metrics']); - } - - if (isset($optionalArgs['dateRanges'])) { - $request->setDateRanges($optionalArgs['dateRanges']); - } - - if (isset($optionalArgs['dimensionFilter'])) { - $request->setDimensionFilter($optionalArgs['dimensionFilter']); - } - - if (isset($optionalArgs['metricFilter'])) { - $request->setMetricFilter($optionalArgs['metricFilter']); - } - - if (isset($optionalArgs['offset'])) { - $request->setOffset($optionalArgs['offset']); - } - - if (isset($optionalArgs['limit'])) { - $request->setLimit($optionalArgs['limit']); - } - - if (isset($optionalArgs['timeZone'])) { - $request->setTimeZone($optionalArgs['timeZone']); - } - - if (isset($optionalArgs['orderBys'])) { - $request->setOrderBys($optionalArgs['orderBys']); - } - - if (isset($optionalArgs['returnEntityQuota'])) { - $request->setReturnEntityQuota($optionalArgs['returnEntityQuota']); - } - - if (isset($optionalArgs['includeAllUsers'])) { - $request->setIncludeAllUsers($optionalArgs['includeAllUsers']); - } - - if (isset($optionalArgs['expandGroups'])) { - $request->setExpandGroups($optionalArgs['expandGroups']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunAccessReport', RunAccessReportResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Searches through all changes to an account or its children given the - * specified set of filters. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $formattedAccount = $analyticsAdminServiceClient->accountName('[ACCOUNT]'); - * // Iterate over pages of elements - * $pagedResponse = $analyticsAdminServiceClient->searchChangeHistoryEvents($formattedAccount); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $analyticsAdminServiceClient->searchChangeHistoryEvents($formattedAccount); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param string $account Required. The account resource for which to return change history - * resources. Format: accounts/{account} - * - * Example: `accounts/100` - * @param array $optionalArgs { - * Optional. - * - * @type string $property - * Optional. Resource name for a child property. If set, only return changes - * made to this property or its child resources. - * Format: properties/{propertyId} - * - * Example: `properties/100` - * @type int[] $resourceType - * Optional. If set, only return changes if they are for a resource that - * matches at least one of these types. - * For allowed values, use constants defined on {@see \Google\Analytics\Admin\V1beta\ChangeHistoryResourceType} - * @type int[] $action - * Optional. If set, only return changes that match one or more of these types - * of actions. - * For allowed values, use constants defined on {@see \Google\Analytics\Admin\V1beta\ActionType} - * @type string[] $actorEmail - * Optional. If set, only return changes if they are made by a user in this - * list. - * @type Timestamp $earliestChangeTime - * Optional. If set, only return changes made after this time (inclusive). - * @type Timestamp $latestChangeTime - * Optional. If set, only return changes made before this time (inclusive). - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function searchChangeHistoryEvents($account, array $optionalArgs = []) - { - $request = new SearchChangeHistoryEventsRequest(); - $requestParamHeaders = []; - $request->setAccount($account); - $requestParamHeaders['account'] = $account; - if (isset($optionalArgs['property'])) { - $request->setProperty($optionalArgs['property']); - } - - if (isset($optionalArgs['resourceType'])) { - $request->setResourceType($optionalArgs['resourceType']); - } - - if (isset($optionalArgs['action'])) { - $request->setAction($optionalArgs['action']); - } - - if (isset($optionalArgs['actorEmail'])) { - $request->setActorEmail($optionalArgs['actorEmail']); - } - - if (isset($optionalArgs['earliestChangeTime'])) { - $request->setEarliestChangeTime($optionalArgs['earliestChangeTime']); - } - - if (isset($optionalArgs['latestChangeTime'])) { - $request->setLatestChangeTime($optionalArgs['latestChangeTime']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('SearchChangeHistoryEvents', $optionalArgs, SearchChangeHistoryEventsResponse::class, $request); - } - - /** - * Updates an account. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $account = new Account(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateAccount($account, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param Account $account Required. The account to update. - * The account's `name` field is used to identify the account. - * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake - * case (for example, "field_to_update"). Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match all - * fields. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\Account - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateAccount($account, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAccountRequest(); - $requestParamHeaders = []; - $request->setAccount($account); - $request->setUpdateMask($updateMask); - $requestParamHeaders['account.name'] = $account->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateAccount', Account::class, $optionalArgs, $request)->wait(); - } - - /** - * Deprecated: Use `UpdateKeyEvent` instead. - * Updates a conversion event with the specified attributes. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $conversionEvent = new ConversionEvent(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateConversionEvent($conversionEvent, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param ConversionEvent $conversionEvent Required. The conversion event to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\ConversionEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - * - * @deprecated This method will be removed in the next major version update. - */ - public function updateConversionEvent($conversionEvent, $updateMask, array $optionalArgs = []) - { - $request = new UpdateConversionEventRequest(); - $requestParamHeaders = []; - $request->setConversionEvent($conversionEvent); - $request->setUpdateMask($updateMask); - $requestParamHeaders['conversion_event.name'] = $conversionEvent->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateConversionEvent', ConversionEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a CustomDimension on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateCustomDimension($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type CustomDimension $customDimension - * The CustomDimension to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\CustomDimension - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateCustomDimension($updateMask, array $optionalArgs = []) - { - $request = new UpdateCustomDimensionRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['customDimension'])) { - $request->setCustomDimension($optionalArgs['customDimension']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateCustomDimension', CustomDimension::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a CustomMetric on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateCustomMetric($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type CustomMetric $customMetric - * The CustomMetric to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\CustomMetric - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateCustomMetric($updateMask, array $optionalArgs = []) - { - $request = new UpdateCustomMetricRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['customMetric'])) { - $request->setCustomMetric($optionalArgs['customMetric']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateCustomMetric', CustomMetric::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the singleton data retention settings for this property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $dataRetentionSettings = new DataRetentionSettings(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateDataRetentionSettings($dataRetentionSettings, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param DataRetentionSettings $dataRetentionSettings Required. The settings to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\DataRetentionSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateDataRetentionSettings($dataRetentionSettings, $updateMask, array $optionalArgs = []) - { - $request = new UpdateDataRetentionSettingsRequest(); - $requestParamHeaders = []; - $request->setDataRetentionSettings($dataRetentionSettings); - $request->setUpdateMask($updateMask); - $requestParamHeaders['data_retention_settings.name'] = $dataRetentionSettings->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDataRetentionSettings', DataRetentionSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a DataStream on a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateDataStream($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type DataStream $dataStream - * The DataStream to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\DataStream - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateDataStream($updateMask, array $optionalArgs = []) - { - $request = new UpdateDataStreamRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['dataStream'])) { - $request->setDataStream($optionalArgs['dataStream']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDataStream', DataStream::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a GoogleAdsLink on a property - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateGoogleAdsLink($updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type GoogleAdsLink $googleAdsLink - * The GoogleAdsLink to update - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\GoogleAdsLink - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateGoogleAdsLink($updateMask, array $optionalArgs = []) - { - $request = new UpdateGoogleAdsLinkRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['googleAdsLink'])) { - $request->setGoogleAdsLink($optionalArgs['googleAdsLink']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateGoogleAdsLink', GoogleAdsLink::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a Key Event. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $keyEvent = new KeyEvent(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateKeyEvent($keyEvent, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param KeyEvent $keyEvent Required. The Key Event to update. - * The `name` field is used to identify the settings to be updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\KeyEvent - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateKeyEvent($keyEvent, $updateMask, array $optionalArgs = []) - { - $request = new UpdateKeyEventRequest(); - $requestParamHeaders = []; - $request->setKeyEvent($keyEvent); - $request->setUpdateMask($updateMask); - $requestParamHeaders['key_event.name'] = $keyEvent->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateKeyEvent', KeyEvent::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a measurement protocol secret. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $measurementProtocolSecret = new MeasurementProtocolSecret(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateMeasurementProtocolSecret($measurementProtocolSecret, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param MeasurementProtocolSecret $measurementProtocolSecret Required. The measurement protocol secret to update. - * @param FieldMask $updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\MeasurementProtocolSecret - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateMeasurementProtocolSecret($measurementProtocolSecret, $updateMask, array $optionalArgs = []) - { - $request = new UpdateMeasurementProtocolSecretRequest(); - $requestParamHeaders = []; - $request->setMeasurementProtocolSecret($measurementProtocolSecret); - $request->setUpdateMask($updateMask); - $requestParamHeaders['measurement_protocol_secret.name'] = $measurementProtocolSecret->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateMeasurementProtocolSecret', MeasurementProtocolSecret::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a property. - * - * Sample code: - * ``` - * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); - * try { - * $property = new Property(); - * $updateMask = new FieldMask(); - * $response = $analyticsAdminServiceClient->updateProperty($property, $updateMask); - * } finally { - * $analyticsAdminServiceClient->close(); - * } - * ``` - * - * @param Property $property Required. The property to update. - * The property's `name` field is used to identify the property to be - * updated. - * @param 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. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Analytics\Admin\V1beta\Property - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateProperty($property, $updateMask, array $optionalArgs = []) - { - $request = new UpdatePropertyRequest(); - $requestParamHeaders = []; - $request->setProperty($property); - $request->setUpdateMask($updateMask); - $requestParamHeaders['property.name'] = $property->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateProperty', Property::class, $optionalArgs, $request)->wait(); - } -} diff --git a/AnalyticsAdmin/src/V1beta/GetAccountRequest.php b/AnalyticsAdmin/src/V1beta/GetAccountRequest.php index 1223024ffe18..2d2dff0d7814 100644 --- a/AnalyticsAdmin/src/V1beta/GetAccountRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetAccountRequest.php @@ -22,7 +22,7 @@ class GetAccountRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the account to lookup. diff --git a/AnalyticsAdmin/src/V1beta/GetConversionEventRequest.php b/AnalyticsAdmin/src/V1beta/GetConversionEventRequest.php index 0f3f6e1ada88..d93e93e1f55a 100644 --- a/AnalyticsAdmin/src/V1beta/GetConversionEventRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetConversionEventRequest.php @@ -22,7 +22,7 @@ class GetConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The resource name of the conversion event to retrieve. diff --git a/AnalyticsAdmin/src/V1beta/GetCustomDimensionRequest.php b/AnalyticsAdmin/src/V1beta/GetCustomDimensionRequest.php index 716fe7da6290..94a2b1021792 100644 --- a/AnalyticsAdmin/src/V1beta/GetCustomDimensionRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetCustomDimensionRequest.php @@ -21,7 +21,7 @@ class GetCustomDimensionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CustomDimension to get. diff --git a/AnalyticsAdmin/src/V1beta/GetCustomMetricRequest.php b/AnalyticsAdmin/src/V1beta/GetCustomMetricRequest.php index f4a5b32b8e55..6610662810be 100644 --- a/AnalyticsAdmin/src/V1beta/GetCustomMetricRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetCustomMetricRequest.php @@ -21,7 +21,7 @@ class GetCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the CustomMetric to get. diff --git a/AnalyticsAdmin/src/V1beta/GetDataRetentionSettingsRequest.php b/AnalyticsAdmin/src/V1beta/GetDataRetentionSettingsRequest.php index ee8613fe7850..15828be733b6 100644 --- a/AnalyticsAdmin/src/V1beta/GetDataRetentionSettingsRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetDataRetentionSettingsRequest.php @@ -23,7 +23,7 @@ class GetDataRetentionSettingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the settings to lookup. diff --git a/AnalyticsAdmin/src/V1beta/GetDataSharingSettingsRequest.php b/AnalyticsAdmin/src/V1beta/GetDataSharingSettingsRequest.php index 9ce593ecfbe1..87917ab19209 100644 --- a/AnalyticsAdmin/src/V1beta/GetDataSharingSettingsRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetDataSharingSettingsRequest.php @@ -22,7 +22,7 @@ class GetDataSharingSettingsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the settings to lookup. diff --git a/AnalyticsAdmin/src/V1beta/GetDataStreamRequest.php b/AnalyticsAdmin/src/V1beta/GetDataStreamRequest.php index 00730054344e..aab7f2686212 100644 --- a/AnalyticsAdmin/src/V1beta/GetDataStreamRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetDataStreamRequest.php @@ -21,7 +21,7 @@ class GetDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the DataStream to get. diff --git a/AnalyticsAdmin/src/V1beta/GetKeyEventRequest.php b/AnalyticsAdmin/src/V1beta/GetKeyEventRequest.php index e200ae64e4f1..9c12dc01c080 100644 --- a/AnalyticsAdmin/src/V1beta/GetKeyEventRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetKeyEventRequest.php @@ -22,7 +22,7 @@ class GetKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The resource name of the Key Event to retrieve. diff --git a/AnalyticsAdmin/src/V1beta/GetMeasurementProtocolSecretRequest.php b/AnalyticsAdmin/src/V1beta/GetMeasurementProtocolSecretRequest.php index e88977919015..5a1c207ba97a 100644 --- a/AnalyticsAdmin/src/V1beta/GetMeasurementProtocolSecretRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetMeasurementProtocolSecretRequest.php @@ -22,7 +22,7 @@ class GetMeasurementProtocolSecretRequest extends \Google\Protobuf\Internal\Mess * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the measurement protocol secret to lookup. diff --git a/AnalyticsAdmin/src/V1beta/GetPropertyRequest.php b/AnalyticsAdmin/src/V1beta/GetPropertyRequest.php index bc11a23be273..50ce00257946 100644 --- a/AnalyticsAdmin/src/V1beta/GetPropertyRequest.php +++ b/AnalyticsAdmin/src/V1beta/GetPropertyRequest.php @@ -22,7 +22,7 @@ class GetPropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $name = ''; + protected $name = ''; /** * @param string $name Required. The name of the property to lookup. diff --git a/AnalyticsAdmin/src/V1beta/GoogleAdsLink.php b/AnalyticsAdmin/src/V1beta/GoogleAdsLink.php index 9c9b51d840e6..85e6f6f829ea 100644 --- a/AnalyticsAdmin/src/V1beta/GoogleAdsLink.php +++ b/AnalyticsAdmin/src/V1beta/GoogleAdsLink.php @@ -22,19 +22,19 @@ class GoogleAdsLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. Google Ads customer ID. * * Generated from protobuf field string customer_id = 3 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $customer_id = ''; + protected $customer_id = ''; /** * Output only. If true, this link is for a Google Ads manager account. * * Generated from protobuf field bool can_manage_clients = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $can_manage_clients = false; + protected $can_manage_clients = false; /** * Enable personalized advertising features with this integration. * Automatically publish my Google Analytics audience lists and Google @@ -43,26 +43,26 @@ class GoogleAdsLink extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 5; */ - private $ads_personalization_enabled = null; + protected $ads_personalization_enabled = null; /** * Output only. Time when this link was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. Time when this link was last updated. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $update_time = null; + protected $update_time = null; /** * 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. * * Generated from protobuf field string creator_email_address = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $creator_email_address = ''; + protected $creator_email_address = ''; /** * Constructor. @@ -214,7 +214,7 @@ public function clearAdsPersonalizationEnabled() * Generated from protobuf field .google.protobuf.BoolValue ads_personalization_enabled = 5; * @return bool|null */ - public function getAdsPersonalizationEnabledValue() + public function getAdsPersonalizationEnabledUnwrapped() { return $this->readWrapperValue("ads_personalization_enabled"); } @@ -249,7 +249,7 @@ public function setAdsPersonalizationEnabled($var) * @param bool|null $var * @return $this */ - public function setAdsPersonalizationEnabledValue($var) + public function setAdsPersonalizationEnabledUnwrapped($var) { $this->writeWrapperValue("ads_personalization_enabled", $var); return $this;} diff --git a/AnalyticsAdmin/src/V1beta/KeyEvent.php b/AnalyticsAdmin/src/V1beta/KeyEvent.php index eb205a6714f6..9b7d818e3abb 100644 --- a/AnalyticsAdmin/src/V1beta/KeyEvent.php +++ b/AnalyticsAdmin/src/V1beta/KeyEvent.php @@ -21,26 +21,26 @@ class KeyEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The event name for this key event. * Examples: 'click', 'purchase' * * Generated from protobuf field string event_name = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $event_name = ''; + protected $event_name = ''; /** * Output only. Time when this key event was created in the property. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. If set to true, this event can be deleted. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $deletable = false; + protected $deletable = false; /** * Output only. If set to true, this key event refers to a custom event. If * set to false, this key event refers to a default event in GA. Default @@ -51,20 +51,20 @@ class KeyEvent extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $custom = false; + protected $custom = false; /** * Required. The method by which Key Events will be counted across multiple * events within a session. * * Generated from protobuf field .google.analytics.admin.v1beta.KeyEvent.CountingMethod counting_method = 6 [(.google.api.field_behavior) = REQUIRED]; */ - private $counting_method = 0; + protected $counting_method = 0; /** * Optional. Defines a default value/currency for a key event. * * Generated from protobuf field .google.analytics.admin.v1beta.KeyEvent.DefaultValue default_value = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - private $default_value = null; + protected $default_value = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/KeyEvent/CountingMethod.php b/AnalyticsAdmin/src/V1beta/KeyEvent/CountingMethod.php index 15e03f561ab0..9ec6002540bf 100644 --- a/AnalyticsAdmin/src/V1beta/KeyEvent/CountingMethod.php +++ b/AnalyticsAdmin/src/V1beta/KeyEvent/CountingMethod.php @@ -61,6 +61,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CountingMethod::class, \Google\Analytics\Admin\V1beta\KeyEvent_CountingMethod::class); diff --git a/AnalyticsAdmin/src/V1beta/KeyEvent/DefaultValue.php b/AnalyticsAdmin/src/V1beta/KeyEvent/DefaultValue.php index 3238b565ba96..4e1d13278767 100644 --- a/AnalyticsAdmin/src/V1beta/KeyEvent/DefaultValue.php +++ b/AnalyticsAdmin/src/V1beta/KeyEvent/DefaultValue.php @@ -22,7 +22,7 @@ class DefaultValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field double numeric_value = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $numeric_value = 0.0; + protected $numeric_value = 0.0; /** * Required. When an occurrence of this Key Event (specified by event_name) * has no set currency this currency will be applied as the default. Must be @@ -31,7 +31,7 @@ class DefaultValue extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string currency_code = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $currency_code = ''; + protected $currency_code = ''; /** * Constructor. @@ -119,6 +119,4 @@ public function setCurrencyCode($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DefaultValue::class, \Google\Analytics\Admin\V1beta\KeyEvent_DefaultValue::class); diff --git a/AnalyticsAdmin/src/V1beta/ListAccountSummariesRequest.php b/AnalyticsAdmin/src/V1beta/ListAccountSummariesRequest.php index 0e0cf687f69f..5a9b57747f11 100644 --- a/AnalyticsAdmin/src/V1beta/ListAccountSummariesRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListAccountSummariesRequest.php @@ -23,7 +23,7 @@ class ListAccountSummariesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 1; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListAccountSummaries` call. * Provide this to retrieve the subsequent page. @@ -32,7 +32,7 @@ class ListAccountSummariesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 2; */ - private $page_token = ''; + protected $page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListAccountSummariesResponse.php b/AnalyticsAdmin/src/V1beta/ListAccountSummariesResponse.php index 03fed5f02102..134ce7115217 100644 --- a/AnalyticsAdmin/src/V1beta/ListAccountSummariesResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListAccountSummariesResponse.php @@ -27,7 +27,7 @@ class ListAccountSummariesResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListAccountsRequest.php b/AnalyticsAdmin/src/V1beta/ListAccountsRequest.php index 5371a274e203..ad5ace2c52d0 100644 --- a/AnalyticsAdmin/src/V1beta/ListAccountsRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListAccountsRequest.php @@ -23,7 +23,7 @@ class ListAccountsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 1; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListAccounts` call. * Provide this to retrieve the subsequent page. @@ -32,7 +32,7 @@ class ListAccountsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 2; */ - private $page_token = ''; + protected $page_token = ''; /** * Whether to include soft-deleted (ie: "trashed") Accounts in the * results. Accounts can be inspected to determine whether they are deleted or @@ -40,7 +40,7 @@ class ListAccountsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool show_deleted = 3; */ - private $show_deleted = false; + protected $show_deleted = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListAccountsResponse.php b/AnalyticsAdmin/src/V1beta/ListAccountsResponse.php index 63c13a6f81e7..e6172f138b63 100644 --- a/AnalyticsAdmin/src/V1beta/ListAccountsResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListAccountsResponse.php @@ -27,7 +27,7 @@ class ListAccountsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListConversionEventsRequest.php b/AnalyticsAdmin/src/V1beta/ListConversionEventsRequest.php index b4f9937c561f..33bf19c74838 100644 --- a/AnalyticsAdmin/src/V1beta/ListConversionEventsRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListConversionEventsRequest.php @@ -21,7 +21,7 @@ class ListConversionEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -29,7 +29,7 @@ class ListConversionEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListConversionEvents` call. * Provide this to retrieve the subsequent page. @@ -38,7 +38,7 @@ class ListConversionEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The resource name of the parent property. diff --git a/AnalyticsAdmin/src/V1beta/ListConversionEventsResponse.php b/AnalyticsAdmin/src/V1beta/ListConversionEventsResponse.php index e4bc7b48bd84..8c2c55e646f6 100644 --- a/AnalyticsAdmin/src/V1beta/ListConversionEventsResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListConversionEventsResponse.php @@ -27,7 +27,7 @@ class ListConversionEventsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListCustomDimensionsRequest.php b/AnalyticsAdmin/src/V1beta/ListCustomDimensionsRequest.php index d834420fa90a..b0a3860f8064 100644 --- a/AnalyticsAdmin/src/V1beta/ListCustomDimensionsRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListCustomDimensionsRequest.php @@ -20,7 +20,7 @@ class ListCustomDimensionsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListCustomDimensionsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListCustomDimensions` call. * Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListCustomDimensionsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1beta/ListCustomDimensionsResponse.php b/AnalyticsAdmin/src/V1beta/ListCustomDimensionsResponse.php index 219b80d303cd..94d2a87c2a86 100644 --- a/AnalyticsAdmin/src/V1beta/ListCustomDimensionsResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListCustomDimensionsResponse.php @@ -27,7 +27,7 @@ class ListCustomDimensionsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListCustomMetricsRequest.php b/AnalyticsAdmin/src/V1beta/ListCustomMetricsRequest.php index dd040330c2a5..5020f949e437 100644 --- a/AnalyticsAdmin/src/V1beta/ListCustomMetricsRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListCustomMetricsRequest.php @@ -20,7 +20,7 @@ class ListCustomMetricsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListCustomMetricsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListCustomMetrics` call. * Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListCustomMetricsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1beta/ListCustomMetricsResponse.php b/AnalyticsAdmin/src/V1beta/ListCustomMetricsResponse.php index a207ae270532..595e81384613 100644 --- a/AnalyticsAdmin/src/V1beta/ListCustomMetricsResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListCustomMetricsResponse.php @@ -27,7 +27,7 @@ class ListCustomMetricsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListDataStreamsRequest.php b/AnalyticsAdmin/src/V1beta/ListDataStreamsRequest.php index 332099ae30a1..a7fd9dae8a76 100644 --- a/AnalyticsAdmin/src/V1beta/ListDataStreamsRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListDataStreamsRequest.php @@ -20,7 +20,7 @@ class ListDataStreamsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListDataStreamsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListDataStreams` call. * Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListDataStreamsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1beta/ListDataStreamsResponse.php b/AnalyticsAdmin/src/V1beta/ListDataStreamsResponse.php index 7d590b173eb3..5ccce411e91d 100644 --- a/AnalyticsAdmin/src/V1beta/ListDataStreamsResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListDataStreamsResponse.php @@ -27,7 +27,7 @@ class ListDataStreamsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListFirebaseLinksRequest.php b/AnalyticsAdmin/src/V1beta/ListFirebaseLinksRequest.php index 50026f5f4efd..bd603d00055a 100644 --- a/AnalyticsAdmin/src/V1beta/ListFirebaseLinksRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListFirebaseLinksRequest.php @@ -21,7 +21,7 @@ class ListFirebaseLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. @@ -30,7 +30,7 @@ class ListFirebaseLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. @@ -39,7 +39,7 @@ class ListFirebaseLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Format: properties/{property_id} diff --git a/AnalyticsAdmin/src/V1beta/ListFirebaseLinksResponse.php b/AnalyticsAdmin/src/V1beta/ListFirebaseLinksResponse.php index 6813e3ab37e5..b320bb008f5c 100644 --- a/AnalyticsAdmin/src/V1beta/ListFirebaseLinksResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListFirebaseLinksResponse.php @@ -29,7 +29,7 @@ class ListFirebaseLinksResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListGoogleAdsLinksRequest.php b/AnalyticsAdmin/src/V1beta/ListGoogleAdsLinksRequest.php index 4314ba7b0150..5db7e835bc8e 100644 --- a/AnalyticsAdmin/src/V1beta/ListGoogleAdsLinksRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListGoogleAdsLinksRequest.php @@ -20,7 +20,7 @@ class ListGoogleAdsLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -28,7 +28,7 @@ class ListGoogleAdsLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. @@ -37,7 +37,7 @@ class ListGoogleAdsLinksRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. Example format: properties/1234 diff --git a/AnalyticsAdmin/src/V1beta/ListGoogleAdsLinksResponse.php b/AnalyticsAdmin/src/V1beta/ListGoogleAdsLinksResponse.php index eaca87744f5b..83af6ed59375 100644 --- a/AnalyticsAdmin/src/V1beta/ListGoogleAdsLinksResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListGoogleAdsLinksResponse.php @@ -27,7 +27,7 @@ class ListGoogleAdsLinksResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListKeyEventsRequest.php b/AnalyticsAdmin/src/V1beta/ListKeyEventsRequest.php index 47d226572a8c..d2a4dfa83287 100644 --- a/AnalyticsAdmin/src/V1beta/ListKeyEventsRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListKeyEventsRequest.php @@ -21,7 +21,7 @@ class ListKeyEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 50 resources will be returned. @@ -29,7 +29,7 @@ class ListKeyEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListKeyEvents` call. * Provide this to retrieve the subsequent page. @@ -38,7 +38,7 @@ class ListKeyEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The resource name of the parent property. diff --git a/AnalyticsAdmin/src/V1beta/ListKeyEventsResponse.php b/AnalyticsAdmin/src/V1beta/ListKeyEventsResponse.php index 88a54b6184cf..ac7d7c5f4941 100644 --- a/AnalyticsAdmin/src/V1beta/ListKeyEventsResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListKeyEventsResponse.php @@ -27,7 +27,7 @@ class ListKeyEventsResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListMeasurementProtocolSecretsRequest.php b/AnalyticsAdmin/src/V1beta/ListMeasurementProtocolSecretsRequest.php index 2b00131cb0d7..7b63fb17d190 100644 --- a/AnalyticsAdmin/src/V1beta/ListMeasurementProtocolSecretsRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListMeasurementProtocolSecretsRequest.php @@ -22,7 +22,7 @@ class ListMeasurementProtocolSecretsRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $parent = ''; + protected $parent = ''; /** * The maximum number of resources to return. * If unspecified, at most 10 resources will be returned. @@ -30,7 +30,7 @@ class ListMeasurementProtocolSecretsRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListMeasurementProtocolSecrets` * call. Provide this to retrieve the subsequent page. When paginating, all @@ -39,7 +39,7 @@ class ListMeasurementProtocolSecretsRequest extends \Google\Protobuf\Internal\Me * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * @param string $parent Required. The resource name of the parent stream. diff --git a/AnalyticsAdmin/src/V1beta/ListMeasurementProtocolSecretsResponse.php b/AnalyticsAdmin/src/V1beta/ListMeasurementProtocolSecretsResponse.php index 78dc1eefa713..0a841ff0b82c 100644 --- a/AnalyticsAdmin/src/V1beta/ListMeasurementProtocolSecretsResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListMeasurementProtocolSecretsResponse.php @@ -27,7 +27,7 @@ class ListMeasurementProtocolSecretsResponse extends \Google\Protobuf\Internal\M * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListPropertiesRequest.php b/AnalyticsAdmin/src/V1beta/ListPropertiesRequest.php index 99c77e8b5c7a..66946ecd9fb9 100644 --- a/AnalyticsAdmin/src/V1beta/ListPropertiesRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListPropertiesRequest.php @@ -34,7 +34,7 @@ class ListPropertiesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $filter = ''; + protected $filter = ''; /** * The maximum number of resources to return. The service may return * fewer than this value, even if there are additional pages. @@ -43,7 +43,7 @@ class ListPropertiesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 2; */ - private $page_size = 0; + protected $page_size = 0; /** * A page token, received from a previous `ListProperties` call. * Provide this to retrieve the subsequent page. @@ -52,7 +52,7 @@ class ListPropertiesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 3; */ - private $page_token = ''; + protected $page_token = ''; /** * Whether to include soft-deleted (ie: "trashed") Properties in the * results. Properties can be inspected to determine whether they are deleted @@ -60,7 +60,7 @@ class ListPropertiesRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool show_deleted = 4; */ - private $show_deleted = false; + protected $show_deleted = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ListPropertiesResponse.php b/AnalyticsAdmin/src/V1beta/ListPropertiesResponse.php index 9e0329128425..f0bf255bc083 100644 --- a/AnalyticsAdmin/src/V1beta/ListPropertiesResponse.php +++ b/AnalyticsAdmin/src/V1beta/ListPropertiesResponse.php @@ -27,7 +27,7 @@ class ListPropertiesResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/MeasurementProtocolSecret.php b/AnalyticsAdmin/src/V1beta/MeasurementProtocolSecret.php index e7fe21099e33..79a409a5548e 100644 --- a/AnalyticsAdmin/src/V1beta/MeasurementProtocolSecret.php +++ b/AnalyticsAdmin/src/V1beta/MeasurementProtocolSecret.php @@ -22,13 +22,13 @@ class MeasurementProtocolSecret extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Required. Human-readable display name for this secret. * * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * 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 @@ -36,7 +36,7 @@ class MeasurementProtocolSecret extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $secret_value = ''; + protected $secret_value = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/Property.php b/AnalyticsAdmin/src/V1beta/Property.php index 846cf2bc3621..a7570b8db524 100644 --- a/AnalyticsAdmin/src/V1beta/Property.php +++ b/AnalyticsAdmin/src/V1beta/Property.php @@ -22,7 +22,7 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $name = ''; + protected $name = ''; /** * Immutable. The property type for this Property resource. When creating a * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then @@ -30,19 +30,19 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $property_type = 0; + protected $property_type = 0; /** * Output only. Time when the entity was originally created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $create_time = null; + protected $create_time = null; /** * Output only. Time when entity payload fields were last updated. * * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $update_time = null; + protected $update_time = null; /** * Immutable. Resource name of this property's logical parent. * Note: The Property-Moving UI can be used to change the parent. @@ -51,21 +51,21 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; */ - private $parent = ''; + protected $parent = ''; /** * Required. Human-readable display name for this property. * The max allowed display name length is 100 UTF-16 code units. * * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; */ - private $display_name = ''; + protected $display_name = ''; /** * Industry associated with this property * Example: AUTOMOTIVE, FOOD_AND_DRINK * * Generated from protobuf field .google.analytics.admin.v1beta.IndustryCategory industry_category = 6; */ - private $industry_category = 0; + protected $industry_category = 0; /** * Required. Reporting Time Zone, used as the day boundary for reports, * regardless of where the data originates. If the time zone honors DST, @@ -77,7 +77,7 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string time_zone = 7 [(.google.api.field_behavior) = REQUIRED]; */ - private $time_zone = ''; + protected $time_zone = ''; /** * The currency type used in reports involving monetary values. * Format: https://en.wikipedia.org/wiki/ISO_4217 @@ -85,21 +85,21 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string currency_code = 8; */ - private $currency_code = ''; + protected $currency_code = ''; /** * Output only. The Google Analytics service level that applies to this * property. * * Generated from protobuf field .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $service_level = 0; + protected $service_level = 0; /** * 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. * * Generated from protobuf field .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $delete_time = null; + protected $delete_time = 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 @@ -107,7 +107,7 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - private $expire_time = null; + protected $expire_time = null; /** * Immutable. The resource name of the parent account * Format: accounts/{account_id} @@ -115,7 +115,7 @@ class Property extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string account = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { */ - private $account = ''; + protected $account = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/PropertySummary.php b/AnalyticsAdmin/src/V1beta/PropertySummary.php index 9cc5a0b50de9..2b198f304695 100644 --- a/AnalyticsAdmin/src/V1beta/PropertySummary.php +++ b/AnalyticsAdmin/src/V1beta/PropertySummary.php @@ -22,19 +22,19 @@ class PropertySummary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string property = 1 [(.google.api.resource_reference) = { */ - private $property = ''; + protected $property = ''; /** * Display name for the property referred to in this property summary. * * Generated from protobuf field string display_name = 2; */ - private $display_name = ''; + protected $display_name = ''; /** * The property's property type. * * Generated from protobuf field .google.analytics.admin.v1beta.PropertyType property_type = 3; */ - private $property_type = 0; + protected $property_type = 0; /** * Resource name of this property's logical parent. * Note: The Property-Moving UI can be used to change the parent. @@ -43,7 +43,7 @@ class PropertySummary extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string parent = 4; */ - private $parent = ''; + protected $parent = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketRequest.php b/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketRequest.php index b2e065aaa3cd..0005e6b70010 100644 --- a/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketRequest.php +++ b/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketRequest.php @@ -20,14 +20,14 @@ class ProvisionAccountTicketRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.Account account = 1; */ - private $account = null; + protected $account = null; /** * Redirect URI where the user will be sent after accepting Terms of Service. * Must be configured in Cloud Console as a Redirect URI. * * Generated from protobuf field string redirect_uri = 2; */ - private $redirect_uri = ''; + protected $redirect_uri = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketResponse.php b/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketResponse.php index 251a03620db3..6a82de170909 100644 --- a/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketResponse.php +++ b/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketResponse.php @@ -20,7 +20,7 @@ class ProvisionAccountTicketResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string account_ticket_id = 1; */ - private $account_ticket_id = ''; + protected $account_ticket_id = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/RunAccessReportRequest.php b/AnalyticsAdmin/src/V1beta/RunAccessReportRequest.php index 9cf69e83a0a6..d7dda45520de 100644 --- a/AnalyticsAdmin/src/V1beta/RunAccessReportRequest.php +++ b/AnalyticsAdmin/src/V1beta/RunAccessReportRequest.php @@ -26,7 +26,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string entity = 1; */ - private $entity = ''; + protected $entity = ''; /** * The dimensions requested and displayed in the response. Requests are * allowed up to 9 dimensions. @@ -60,7 +60,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression dimension_filter = 5; */ - private $dimension_filter = null; + protected $dimension_filter = null; /** * Metric filters allow you to restrict report response to specific metric * values which match the filter. Metric filters are applied after aggregating @@ -69,7 +69,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression metric_filter = 6; */ - private $metric_filter = null; + protected $metric_filter = null; /** * The row count of the start row. The first row is counted as row 0. If * offset is unspecified, it is treated as 0. If offset is zero, then this @@ -79,7 +79,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int64 offset = 7; */ - private $offset = 0; + protected $offset = 0; /** * The number of rows to return. If unspecified, 10,000 rows are returned. The * API returns a maximum of 100,000 rows per request, no matter how many you @@ -94,7 +94,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int64 limit = 8; */ - private $limit = 0; + protected $limit = 0; /** * This request's time zone if specified. If unspecified, the property's time * zone is used. The request's time zone is used to interpret the start & end @@ -105,7 +105,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string time_zone = 9; */ - private $time_zone = ''; + protected $time_zone = ''; /** * Specifies how rows are ordered in the response. * @@ -119,7 +119,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool return_entity_quota = 11; */ - private $return_entity_quota = false; + protected $return_entity_quota = false; /** * Optional. Determines whether to include users who have never made an API * call in the response. If true, all users with access to the specified @@ -129,7 +129,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool include_all_users = 12 [(.google.api.field_behavior) = OPTIONAL]; */ - private $include_all_users = false; + protected $include_all_users = false; /** * Optional. Decides whether to return the users within user groups. This * field works only when include_all_users is set to true. If true, it will @@ -138,7 +138,7 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field bool expand_groups = 13 [(.google.api.field_behavior) = OPTIONAL]; */ - private $expand_groups = false; + protected $expand_groups = false; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/RunAccessReportResponse.php b/AnalyticsAdmin/src/V1beta/RunAccessReportResponse.php index f7d585bbb4a7..32d64a075493 100644 --- a/AnalyticsAdmin/src/V1beta/RunAccessReportResponse.php +++ b/AnalyticsAdmin/src/V1beta/RunAccessReportResponse.php @@ -48,14 +48,14 @@ class RunAccessReportResponse extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 row_count = 4; */ - private $row_count = 0; + protected $row_count = 0; /** * The quota state for this Analytics property including this request. This * field doesn't work with account-level requests. * * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuota quota = 5; */ - private $quota = null; + protected $quota = null; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsRequest.php b/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsRequest.php index d3f69b090c9c..b8d57e6282d3 100644 --- a/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsRequest.php +++ b/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsRequest.php @@ -22,7 +22,7 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - private $account = ''; + protected $account = ''; /** * Optional. Resource name for a child property. If set, only return changes * made to this property or its child resources. @@ -31,7 +31,7 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string property = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ - private $property = ''; + protected $property = ''; /** * Optional. If set, only return changes if they are for a resource that * matches at least one of these types. @@ -58,13 +58,13 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.Timestamp earliest_change_time = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private $earliest_change_time = null; + protected $earliest_change_time = null; /** * Optional. If set, only return changes made before this time (inclusive). * * Generated from protobuf field .google.protobuf.Timestamp latest_change_time = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - private $latest_change_time = null; + protected $latest_change_time = null; /** * Optional. The maximum number of ChangeHistoryEvent items to return. * The service may return fewer than this value, even if there are additional @@ -73,7 +73,7 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field int32 page_size = 8 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_size = 0; + protected $page_size = 0; /** * Optional. A page token, received from a previous * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent @@ -83,7 +83,7 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string page_token = 9 [(.google.api.field_behavior) = OPTIONAL]; */ - private $page_token = ''; + protected $page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsResponse.php b/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsResponse.php index 88eb2a5d1ba3..446954be0938 100644 --- a/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsResponse.php +++ b/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsResponse.php @@ -27,7 +27,7 @@ class SearchChangeHistoryEventsResponse extends \Google\Protobuf\Internal\Messag * * Generated from protobuf field string next_page_token = 2; */ - private $next_page_token = ''; + protected $next_page_token = ''; /** * Constructor. diff --git a/AnalyticsAdmin/src/V1beta/UpdateAccountRequest.php b/AnalyticsAdmin/src/V1beta/UpdateAccountRequest.php index fc57cbe840bc..26003ae8efe1 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateAccountRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateAccountRequest.php @@ -21,7 +21,7 @@ class UpdateAccountRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.Account account = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $account = null; + protected $account = null; /** * Required. The list of fields to be updated. Field names must be in snake * case (for example, "field_to_update"). Omitted fields will not be updated. @@ -30,7 +30,7 @@ class UpdateAccountRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\Account $account Required. The account to update. diff --git a/AnalyticsAdmin/src/V1beta/UpdateConversionEventRequest.php b/AnalyticsAdmin/src/V1beta/UpdateConversionEventRequest.php index 729b2f98327e..7446a39035e8 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateConversionEventRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateConversionEventRequest.php @@ -21,7 +21,7 @@ class UpdateConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.ConversionEvent conversion_event = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $conversion_event = null; + protected $conversion_event = 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 @@ -30,7 +30,7 @@ class UpdateConversionEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\ConversionEvent $conversionEvent Required. The conversion event to update. diff --git a/AnalyticsAdmin/src/V1beta/UpdateCustomDimensionRequest.php b/AnalyticsAdmin/src/V1beta/UpdateCustomDimensionRequest.php index 4e2c2a82b9b0..8f5570a83572 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateCustomDimensionRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateCustomDimensionRequest.php @@ -20,7 +20,7 @@ class UpdateCustomDimensionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.CustomDimension custom_dimension = 1; */ - private $custom_dimension = null; + protected $custom_dimension = 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 @@ -28,7 +28,7 @@ class UpdateCustomDimensionRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\CustomDimension $customDimension The CustomDimension to update diff --git a/AnalyticsAdmin/src/V1beta/UpdateCustomMetricRequest.php b/AnalyticsAdmin/src/V1beta/UpdateCustomMetricRequest.php index 3f66eb66402a..2a6a68a15fbe 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateCustomMetricRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateCustomMetricRequest.php @@ -20,7 +20,7 @@ class UpdateCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.CustomMetric custom_metric = 1; */ - private $custom_metric = null; + protected $custom_metric = 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 @@ -28,7 +28,7 @@ class UpdateCustomMetricRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\CustomMetric $customMetric The CustomMetric to update diff --git a/AnalyticsAdmin/src/V1beta/UpdateDataRetentionSettingsRequest.php b/AnalyticsAdmin/src/V1beta/UpdateDataRetentionSettingsRequest.php index 506472bf89f4..62465168648e 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateDataRetentionSettingsRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateDataRetentionSettingsRequest.php @@ -21,7 +21,7 @@ class UpdateDataRetentionSettingsRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field .google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $data_retention_settings = null; + protected $data_retention_settings = 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 @@ -30,7 +30,7 @@ class UpdateDataRetentionSettingsRequest extends \Google\Protobuf\Internal\Messa * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\DataRetentionSettings $dataRetentionSettings Required. The settings to update. diff --git a/AnalyticsAdmin/src/V1beta/UpdateDataStreamRequest.php b/AnalyticsAdmin/src/V1beta/UpdateDataStreamRequest.php index b1b32682b9c6..75f89f3ac6b9 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateDataStreamRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateDataStreamRequest.php @@ -20,7 +20,7 @@ class UpdateDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.DataStream data_stream = 1; */ - private $data_stream = null; + protected $data_stream = 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 @@ -28,7 +28,7 @@ class UpdateDataStreamRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\DataStream $dataStream The DataStream to update diff --git a/AnalyticsAdmin/src/V1beta/UpdateGoogleAdsLinkRequest.php b/AnalyticsAdmin/src/V1beta/UpdateGoogleAdsLinkRequest.php index ebf16da86ad6..74207c5be17f 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateGoogleAdsLinkRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateGoogleAdsLinkRequest.php @@ -20,7 +20,7 @@ class UpdateGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 1; */ - private $google_ads_link = null; + protected $google_ads_link = 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 @@ -29,7 +29,7 @@ class UpdateGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\GoogleAdsLink $googleAdsLink The GoogleAdsLink to update diff --git a/AnalyticsAdmin/src/V1beta/UpdateKeyEventRequest.php b/AnalyticsAdmin/src/V1beta/UpdateKeyEventRequest.php index 3cb22723b7d7..3f42572f10bc 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateKeyEventRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateKeyEventRequest.php @@ -21,7 +21,7 @@ class UpdateKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.KeyEvent key_event = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $key_event = null; + protected $key_event = 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 @@ -30,7 +30,7 @@ class UpdateKeyEventRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\KeyEvent $keyEvent Required. The Key Event to update. diff --git a/AnalyticsAdmin/src/V1beta/UpdateMeasurementProtocolSecretRequest.php b/AnalyticsAdmin/src/V1beta/UpdateMeasurementProtocolSecretRequest.php index 191523a5de64..ea5707e1ccd1 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateMeasurementProtocolSecretRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateMeasurementProtocolSecretRequest.php @@ -20,14 +20,14 @@ class UpdateMeasurementProtocolSecretRequest extends \Google\Protobuf\Internal\M * * Generated from protobuf field .google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $measurement_protocol_secret = null; + protected $measurement_protocol_secret = null; /** * Required. The list of fields to be updated. Omitted fields will not be * updated. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\MeasurementProtocolSecret $measurementProtocolSecret Required. The measurement protocol secret to update. diff --git a/AnalyticsAdmin/src/V1beta/UpdatePropertyRequest.php b/AnalyticsAdmin/src/V1beta/UpdatePropertyRequest.php index b379bc984f20..f876aa7fa4c8 100644 --- a/AnalyticsAdmin/src/V1beta/UpdatePropertyRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdatePropertyRequest.php @@ -22,7 +22,7 @@ class UpdatePropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.analytics.admin.v1beta.Property property = 1 [(.google.api.field_behavior) = REQUIRED]; */ - private $property = null; + protected $property = 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 @@ -31,7 +31,7 @@ class UpdatePropertyRequest extends \Google\Protobuf\Internal\Message * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ - private $update_mask = null; + protected $update_mask = null; /** * @param \Google\Analytics\Admin\V1beta\Property $property Required. The property to update. diff --git a/AnalyticsAdmin/tests/Unit/V1alpha/AnalyticsAdminServiceClientTest.php b/AnalyticsAdmin/tests/Unit/V1alpha/AnalyticsAdminServiceClientTest.php deleted file mode 100644 index cd18d16ecd48..000000000000 --- a/AnalyticsAdmin/tests/Unit/V1alpha/AnalyticsAdminServiceClientTest.php +++ /dev/null @@ -1,10132 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AnalyticsAdminServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AnalyticsAdminServiceClient($options); - } - - /** @test */ - public function acknowledgeUserDataCollectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AcknowledgeUserDataCollectionResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); - $acknowledgement = 'acknowledgement1769490938'; - $response = $gapicClient->acknowledgeUserDataCollection($formattedProperty, $acknowledgement); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection', $actualFuncCall); - $actualValue = $actualRequestObject->getProperty(); - $this->assertProtobufEquals($formattedProperty, $actualValue); - $actualValue = $actualRequestObject->getAcknowledgement(); - $this->assertProtobufEquals($acknowledgement, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function acknowledgeUserDataCollectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); - $acknowledgement = 'acknowledgement1769490938'; - try { - $gapicClient->acknowledgeUserDataCollection($formattedProperty, $acknowledgement); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function approveDisplayVideo360AdvertiserLinkProposalTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ApproveDisplayVideo360AdvertiserLinkProposalResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $response = $gapicClient->approveDisplayVideo360AdvertiserLinkProposal($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ApproveDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function approveDisplayVideo360AdvertiserLinkProposalExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - try { - $gapicClient->approveDisplayVideo360AdvertiserLinkProposal($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveAudienceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $gapicClient->archiveAudience($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveAudience', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveAudienceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->archiveAudience($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveCustomDimensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $gapicClient->archiveCustomDimension($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomDimension', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveCustomDimensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - try { - $gapicClient->archiveCustomDimension($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveCustomMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $gapicClient->archiveCustomMetric($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveCustomMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - try { - $gapicClient->archiveCustomMetric($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateAccessBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateAccessBindingsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $requests = []; - $response = $gapicClient->batchCreateAccessBindings($formattedParent, $requests); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateAccessBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateAccessBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $requests = []; - try { - $gapicClient->batchCreateAccessBindings($formattedParent, $requests); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchDeleteAccessBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $requests = []; - $gapicClient->batchDeleteAccessBindings($formattedParent, $requests); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteAccessBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchDeleteAccessBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $requests = []; - try { - $gapicClient->batchDeleteAccessBindings($formattedParent, $requests); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchGetAccessBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchGetAccessBindingsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $formattedNames = [ - $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'), - ]; - $response = $gapicClient->batchGetAccessBindings($formattedParent, $formattedNames); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetAccessBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNames(); - $this->assertProtobufEquals($formattedNames, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchGetAccessBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $formattedNames = [ - $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'), - ]; - try { - $gapicClient->batchGetAccessBindings($formattedParent, $formattedNames); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchUpdateAccessBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchUpdateAccessBindingsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $requests = []; - $response = $gapicClient->batchUpdateAccessBindings($formattedParent, $requests); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateAccessBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchUpdateAccessBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $requests = []; - try { - $gapicClient->batchUpdateAccessBindings($formattedParent, $requests); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelDisplayVideo360AdvertiserLinkProposalTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $advertiserId = 'advertiserId-127926097'; - $advertiserDisplayName = 'advertiserDisplayName-674771332'; - $validationEmail = 'validationEmail2105669718'; - $expectedResponse = new DisplayVideo360AdvertiserLinkProposal(); - $expectedResponse->setName($name2); - $expectedResponse->setAdvertiserId($advertiserId); - $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); - $expectedResponse->setValidationEmail($validationEmail); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $response = $gapicClient->cancelDisplayVideo360AdvertiserLinkProposal($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CancelDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelDisplayVideo360AdvertiserLinkProposalExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - try { - $gapicClient->cancelDisplayVideo360AdvertiserLinkProposal($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAccessBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $user = 'user3599307'; - $name = 'name3373707'; - $expectedResponse = new AccessBinding(); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $accessBinding = new AccessBinding(); - $response = $gapicClient->createAccessBinding($formattedParent, $accessBinding); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAccessBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAccessBinding(); - $this->assertProtobufEquals($accessBinding, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAccessBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $accessBinding = new AccessBinding(); - try { - $gapicClient->createAccessBinding($formattedParent, $accessBinding); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAdSenseLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $adClientCode = 'adClientCode-1866307643'; - $expectedResponse = new AdSenseLink(); - $expectedResponse->setName($name); - $expectedResponse->setAdClientCode($adClientCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $adsenseLink = new AdSenseLink(); - $response = $gapicClient->createAdSenseLink($formattedParent, $adsenseLink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAdSenseLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAdsenseLink(); - $this->assertProtobufEquals($adsenseLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAdSenseLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $adsenseLink = new AdSenseLink(); - try { - $gapicClient->createAdSenseLink($formattedParent, $adsenseLink); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAudienceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $membershipDurationDays = 1702404985; - $adsPersonalizationEnabled = false; - $expectedResponse = new Audience(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setMembershipDurationDays($membershipDurationDays); - $expectedResponse->setAdsPersonalizationEnabled($adsPersonalizationEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $audience = new Audience(); - $audienceDisplayName = 'audienceDisplayName1537141193'; - $audience->setDisplayName($audienceDisplayName); - $audienceDescription = 'audienceDescription-1901553832'; - $audience->setDescription($audienceDescription); - $audienceMembershipDurationDays = 1530655195; - $audience->setMembershipDurationDays($audienceMembershipDurationDays); - $audienceFilterClauses = []; - $audience->setFilterClauses($audienceFilterClauses); - $response = $gapicClient->createAudience($formattedParent, $audience); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAudience', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAudience(); - $this->assertProtobufEquals($audience, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAudienceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $audience = new Audience(); - $audienceDisplayName = 'audienceDisplayName1537141193'; - $audience->setDisplayName($audienceDisplayName); - $audienceDescription = 'audienceDescription-1901553832'; - $audience->setDescription($audienceDescription); - $audienceMembershipDurationDays = 1530655195; - $audience->setMembershipDurationDays($audienceMembershipDurationDays); - $audienceFilterClauses = []; - $audience->setFilterClauses($audienceFilterClauses); - try { - $gapicClient->createAudience($formattedParent, $audience); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBigQueryLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $project = 'project-309310695'; - $dailyExportEnabled = true; - $streamingExportEnabled = false; - $freshDailyExportEnabled = false; - $includeAdvertisingId = false; - $datasetLocation = 'datasetLocation1011262364'; - $expectedResponse = new BigQueryLink(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $expectedResponse->setDailyExportEnabled($dailyExportEnabled); - $expectedResponse->setStreamingExportEnabled($streamingExportEnabled); - $expectedResponse->setFreshDailyExportEnabled($freshDailyExportEnabled); - $expectedResponse->setIncludeAdvertisingId($includeAdvertisingId); - $expectedResponse->setDatasetLocation($datasetLocation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $bigqueryLink = new BigQueryLink(); - $bigqueryLinkDatasetLocation = 'bigqueryLinkDatasetLocation714488843'; - $bigqueryLink->setDatasetLocation($bigqueryLinkDatasetLocation); - $response = $gapicClient->createBigQueryLink($formattedParent, $bigqueryLink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateBigQueryLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBigqueryLink(); - $this->assertProtobufEquals($bigqueryLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBigQueryLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $bigqueryLink = new BigQueryLink(); - $bigqueryLinkDatasetLocation = 'bigqueryLinkDatasetLocation714488843'; - $bigqueryLink->setDatasetLocation($bigqueryLinkDatasetLocation); - try { - $gapicClient->createBigQueryLink($formattedParent, $bigqueryLink); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCalculatedMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $calculatedMetricId2 = 'calculatedMetricId2-706401732'; - $formula = 'formula-677424794'; - $invalidMetricReference = true; - $expectedResponse = new CalculatedMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setCalculatedMetricId($calculatedMetricId2); - $expectedResponse->setFormula($formula); - $expectedResponse->setInvalidMetricReference($invalidMetricReference); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $calculatedMetricId = 'calculatedMetricId8203465'; - $calculatedMetric = new CalculatedMetric(); - $calculatedMetricDisplayName = 'calculatedMetricDisplayName-1927551873'; - $calculatedMetric->setDisplayName($calculatedMetricDisplayName); - $calculatedMetricMetricUnit = MetricUnit::METRIC_UNIT_UNSPECIFIED; - $calculatedMetric->setMetricUnit($calculatedMetricMetricUnit); - $calculatedMetricFormula = 'calculatedMetricFormula752695416'; - $calculatedMetric->setFormula($calculatedMetricFormula); - $response = $gapicClient->createCalculatedMetric($formattedParent, $calculatedMetricId, $calculatedMetric); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCalculatedMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCalculatedMetricId(); - $this->assertProtobufEquals($calculatedMetricId, $actualValue); - $actualValue = $actualRequestObject->getCalculatedMetric(); - $this->assertProtobufEquals($calculatedMetric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCalculatedMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $calculatedMetricId = 'calculatedMetricId8203465'; - $calculatedMetric = new CalculatedMetric(); - $calculatedMetricDisplayName = 'calculatedMetricDisplayName-1927551873'; - $calculatedMetric->setDisplayName($calculatedMetricDisplayName); - $calculatedMetricMetricUnit = MetricUnit::METRIC_UNIT_UNSPECIFIED; - $calculatedMetric->setMetricUnit($calculatedMetricMetricUnit); - $calculatedMetricFormula = 'calculatedMetricFormula752695416'; - $calculatedMetric->setFormula($calculatedMetricFormula); - try { - $gapicClient->createCalculatedMetric($formattedParent, $calculatedMetricId, $calculatedMetric); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createChannelGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $systemDefined = false; - $primary = true; - $expectedResponse = new ChannelGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSystemDefined($systemDefined); - $expectedResponse->setPrimary($primary); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $channelGroup = new ChannelGroup(); - $channelGroupDisplayName = 'channelGroupDisplayName1156787601'; - $channelGroup->setDisplayName($channelGroupDisplayName); - $channelGroupGroupingRule = []; - $channelGroup->setGroupingRule($channelGroupGroupingRule); - $response = $gapicClient->createChannelGroup($formattedParent, $channelGroup); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateChannelGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getChannelGroup(); - $this->assertProtobufEquals($channelGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createChannelGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $channelGroup = new ChannelGroup(); - $channelGroupDisplayName = 'channelGroupDisplayName1156787601'; - $channelGroup->setDisplayName($channelGroupDisplayName); - $channelGroupGroupingRule = []; - $channelGroup->setGroupingRule($channelGroupGroupingRule); - try { - $gapicClient->createChannelGroup($formattedParent, $channelGroup); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConnectedSiteTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CreateConnectedSiteTagResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $connectedSiteTag = new ConnectedSiteTag(); - $connectedSiteTagDisplayName = 'connectedSiteTagDisplayName-1608704893'; - $connectedSiteTag->setDisplayName($connectedSiteTagDisplayName); - $connectedSiteTagTagId = 'connectedSiteTagTagId-937600789'; - $connectedSiteTag->setTagId($connectedSiteTagTagId); - $response = $gapicClient->createConnectedSiteTag($connectedSiteTag); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConnectedSiteTag', $actualFuncCall); - $actualValue = $actualRequestObject->getConnectedSiteTag(); - $this->assertProtobufEquals($connectedSiteTag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConnectedSiteTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $connectedSiteTag = new ConnectedSiteTag(); - $connectedSiteTagDisplayName = 'connectedSiteTagDisplayName-1608704893'; - $connectedSiteTag->setDisplayName($connectedSiteTagDisplayName); - $connectedSiteTagTagId = 'connectedSiteTagTagId-937600789'; - $connectedSiteTag->setTagId($connectedSiteTagTagId); - try { - $gapicClient->createConnectedSiteTag($connectedSiteTag); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConversionEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new ConversionEvent(); - $expectedResponse->setName($name); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $conversionEvent = new ConversionEvent(); - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->createConversionEvent($conversionEvent, $formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConversionEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getConversionEvent(); - $this->assertProtobufEquals($conversionEvent, $actualValue); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConversionEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $conversionEvent = new ConversionEvent(); - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->createConversionEvent($conversionEvent, $formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomDimensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $disallowAdsPersonalization = false; - $expectedResponse = new CustomDimension(); - $expectedResponse->setName($name); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setDisallowAdsPersonalization($disallowAdsPersonalization); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $customDimension = new CustomDimension(); - $customDimensionParameterName = 'customDimensionParameterName-405505313'; - $customDimension->setParameterName($customDimensionParameterName); - $customDimensionDisplayName = 'customDimensionDisplayName2102948408'; - $customDimension->setDisplayName($customDimensionDisplayName); - $customDimensionScope = DimensionScope::DIMENSION_SCOPE_UNSPECIFIED; - $customDimension->setScope($customDimensionScope); - $response = $gapicClient->createCustomDimension($formattedParent, $customDimension); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomDimension', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCustomDimension(); - $this->assertProtobufEquals($customDimension, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomDimensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $customDimension = new CustomDimension(); - $customDimensionParameterName = 'customDimensionParameterName-405505313'; - $customDimension->setParameterName($customDimensionParameterName); - $customDimensionDisplayName = 'customDimensionDisplayName2102948408'; - $customDimension->setDisplayName($customDimensionDisplayName); - $customDimensionScope = DimensionScope::DIMENSION_SCOPE_UNSPECIFIED; - $customDimension->setScope($customDimensionScope); - try { - $gapicClient->createCustomDimension($formattedParent, $customDimension); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomMetric(); - $expectedResponse->setName($name); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $customMetric = new CustomMetric(); - $customMetricParameterName = 'customMetricParameterName1627167443'; - $customMetric->setParameterName($customMetricParameterName); - $customMetricDisplayName = 'customMetricDisplayName-835715284'; - $customMetric->setDisplayName($customMetricDisplayName); - $customMetricMeasurementUnit = MeasurementUnit::MEASUREMENT_UNIT_UNSPECIFIED; - $customMetric->setMeasurementUnit($customMetricMeasurementUnit); - $customMetricScope = MetricScope::METRIC_SCOPE_UNSPECIFIED; - $customMetric->setScope($customMetricScope); - $response = $gapicClient->createCustomMetric($formattedParent, $customMetric); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCustomMetric(); - $this->assertProtobufEquals($customMetric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $customMetric = new CustomMetric(); - $customMetricParameterName = 'customMetricParameterName1627167443'; - $customMetric->setParameterName($customMetricParameterName); - $customMetricDisplayName = 'customMetricDisplayName-835715284'; - $customMetric->setDisplayName($customMetricDisplayName); - $customMetricMeasurementUnit = MeasurementUnit::MEASUREMENT_UNIT_UNSPECIFIED; - $customMetric->setMeasurementUnit($customMetricMeasurementUnit); - $customMetricScope = MetricScope::METRIC_SCOPE_UNSPECIFIED; - $customMetric->setScope($customMetricScope); - try { - $gapicClient->createCustomMetric($formattedParent, $customMetric); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataStream(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $dataStream = new DataStream(); - $dataStreamType = DataStreamType::DATA_STREAM_TYPE_UNSPECIFIED; - $dataStream->setType($dataStreamType); - $response = $gapicClient->createDataStream($formattedParent, $dataStream); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDataStream', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataStream(); - $this->assertProtobufEquals($dataStream, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $dataStream = new DataStream(); - $dataStreamType = DataStreamType::DATA_STREAM_TYPE_UNSPECIFIED; - $dataStream->setType($dataStreamType); - try { - $gapicClient->createDataStream($formattedParent, $dataStream); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDisplayVideo360AdvertiserLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $advertiserId = 'advertiserId-127926097'; - $advertiserDisplayName = 'advertiserDisplayName-674771332'; - $expectedResponse = new DisplayVideo360AdvertiserLink(); - $expectedResponse->setName($name); - $expectedResponse->setAdvertiserId($advertiserId); - $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $displayVideo360AdvertiserLink = new DisplayVideo360AdvertiserLink(); - $response = $gapicClient->createDisplayVideo360AdvertiserLink($formattedParent, $displayVideo360AdvertiserLink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDisplayVideo360AdvertiserLink(); - $this->assertProtobufEquals($displayVideo360AdvertiserLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDisplayVideo360AdvertiserLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $displayVideo360AdvertiserLink = new DisplayVideo360AdvertiserLink(); - try { - $gapicClient->createDisplayVideo360AdvertiserLink($formattedParent, $displayVideo360AdvertiserLink); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDisplayVideo360AdvertiserLinkProposalTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $advertiserId = 'advertiserId-127926097'; - $advertiserDisplayName = 'advertiserDisplayName-674771332'; - $validationEmail = 'validationEmail2105669718'; - $expectedResponse = new DisplayVideo360AdvertiserLinkProposal(); - $expectedResponse->setName($name); - $expectedResponse->setAdvertiserId($advertiserId); - $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); - $expectedResponse->setValidationEmail($validationEmail); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $displayVideo360AdvertiserLinkProposal = new DisplayVideo360AdvertiserLinkProposal(); - $response = $gapicClient->createDisplayVideo360AdvertiserLinkProposal($formattedParent, $displayVideo360AdvertiserLinkProposal); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDisplayVideo360AdvertiserLinkProposal(); - $this->assertProtobufEquals($displayVideo360AdvertiserLinkProposal, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDisplayVideo360AdvertiserLinkProposalExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $displayVideo360AdvertiserLinkProposal = new DisplayVideo360AdvertiserLinkProposal(); - try { - $gapicClient->createDisplayVideo360AdvertiserLinkProposal($formattedParent, $displayVideo360AdvertiserLinkProposal); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEventCreateRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destinationEvent = 'destinationEvent-1300408535'; - $sourceCopyParameters = true; - $expectedResponse = new EventCreateRule(); - $expectedResponse->setName($name); - $expectedResponse->setDestinationEvent($destinationEvent); - $expectedResponse->setSourceCopyParameters($sourceCopyParameters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $eventCreateRule = new EventCreateRule(); - $eventCreateRuleDestinationEvent = 'eventCreateRuleDestinationEvent598875038'; - $eventCreateRule->setDestinationEvent($eventCreateRuleDestinationEvent); - $eventCreateRuleEventConditions = []; - $eventCreateRule->setEventConditions($eventCreateRuleEventConditions); - $response = $gapicClient->createEventCreateRule($formattedParent, $eventCreateRule); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateEventCreateRule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEventCreateRule(); - $this->assertProtobufEquals($eventCreateRule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEventCreateRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $eventCreateRule = new EventCreateRule(); - $eventCreateRuleDestinationEvent = 'eventCreateRuleDestinationEvent598875038'; - $eventCreateRule->setDestinationEvent($eventCreateRuleDestinationEvent); - $eventCreateRuleEventConditions = []; - $eventCreateRule->setEventConditions($eventCreateRuleEventConditions); - try { - $gapicClient->createEventCreateRule($formattedParent, $eventCreateRule); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEventEditRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $processingOrder = 334545118; - $expectedResponse = new EventEditRule(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setProcessingOrder($processingOrder); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $eventEditRule = new EventEditRule(); - $eventEditRuleDisplayName = 'eventEditRuleDisplayName160444781'; - $eventEditRule->setDisplayName($eventEditRuleDisplayName); - $eventEditRuleEventConditions = []; - $eventEditRule->setEventConditions($eventEditRuleEventConditions); - $eventEditRuleParameterMutations = []; - $eventEditRule->setParameterMutations($eventEditRuleParameterMutations); - $response = $gapicClient->createEventEditRule($formattedParent, $eventEditRule); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateEventEditRule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEventEditRule(); - $this->assertProtobufEquals($eventEditRule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEventEditRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $eventEditRule = new EventEditRule(); - $eventEditRuleDisplayName = 'eventEditRuleDisplayName160444781'; - $eventEditRule->setDisplayName($eventEditRuleDisplayName); - $eventEditRuleEventConditions = []; - $eventEditRule->setEventConditions($eventEditRuleEventConditions); - $eventEditRuleParameterMutations = []; - $eventEditRule->setParameterMutations($eventEditRuleParameterMutations); - try { - $gapicClient->createEventEditRule($formattedParent, $eventEditRule); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createExpandedDataSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new ExpandedDataSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $expandedDataSet = new ExpandedDataSet(); - $expandedDataSetDisplayName = 'expandedDataSetDisplayName629188494'; - $expandedDataSet->setDisplayName($expandedDataSetDisplayName); - $response = $gapicClient->createExpandedDataSet($formattedParent, $expandedDataSet); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateExpandedDataSet', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getExpandedDataSet(); - $this->assertProtobufEquals($expandedDataSet, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createExpandedDataSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $expandedDataSet = new ExpandedDataSet(); - $expandedDataSetDisplayName = 'expandedDataSetDisplayName629188494'; - $expandedDataSet->setDisplayName($expandedDataSetDisplayName); - try { - $gapicClient->createExpandedDataSet($formattedParent, $expandedDataSet); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFirebaseLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $project = 'project-309310695'; - $expectedResponse = new FirebaseLink(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $firebaseLink = new FirebaseLink(); - $response = $gapicClient->createFirebaseLink($formattedParent, $firebaseLink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateFirebaseLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFirebaseLink(); - $this->assertProtobufEquals($firebaseLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFirebaseLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $firebaseLink = new FirebaseLink(); - try { - $gapicClient->createFirebaseLink($formattedParent, $firebaseLink); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGoogleAdsLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $customerId = 'customerId-1772061412'; - $canManageClients = false; - $creatorEmailAddress = 'creatorEmailAddress-1491810434'; - $expectedResponse = new GoogleAdsLink(); - $expectedResponse->setName($name); - $expectedResponse->setCustomerId($customerId); - $expectedResponse->setCanManageClients($canManageClients); - $expectedResponse->setCreatorEmailAddress($creatorEmailAddress); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $googleAdsLink = new GoogleAdsLink(); - $response = $gapicClient->createGoogleAdsLink($formattedParent, $googleAdsLink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateGoogleAdsLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGoogleAdsLink(); - $this->assertProtobufEquals($googleAdsLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGoogleAdsLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $googleAdsLink = new GoogleAdsLink(); - try { - $gapicClient->createGoogleAdsLink($formattedParent, $googleAdsLink); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new KeyEvent(); - $expectedResponse->setName($name); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $keyEvent = new KeyEvent(); - $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; - $keyEvent->setCountingMethod($keyEventCountingMethod); - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->createKeyEvent($keyEvent, $formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateKeyEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getKeyEvent(); - $this->assertProtobufEquals($keyEvent, $actualValue); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $keyEvent = new KeyEvent(); - $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; - $keyEvent->setCountingMethod($keyEventCountingMethod); - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->createKeyEvent($keyEvent, $formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMeasurementProtocolSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $secretValue = 'secretValue1322942242'; - $expectedResponse = new MeasurementProtocolSecret(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSecretValue($secretValue); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $measurementProtocolSecret = new MeasurementProtocolSecret(); - $measurementProtocolSecretDisplayName = 'measurementProtocolSecretDisplayName1279116681'; - $measurementProtocolSecret->setDisplayName($measurementProtocolSecretDisplayName); - $response = $gapicClient->createMeasurementProtocolSecret($formattedParent, $measurementProtocolSecret); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateMeasurementProtocolSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMeasurementProtocolSecret(); - $this->assertProtobufEquals($measurementProtocolSecret, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMeasurementProtocolSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $measurementProtocolSecret = new MeasurementProtocolSecret(); - $measurementProtocolSecretDisplayName = 'measurementProtocolSecretDisplayName1279116681'; - $measurementProtocolSecret->setDisplayName($measurementProtocolSecretDisplayName); - try { - $gapicClient->createMeasurementProtocolSecret($formattedParent, $measurementProtocolSecret); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $timeZone = 'timeZone36848094'; - $currencyCode = 'currencyCode1108728155'; - $account = 'account-1177318867'; - $expectedResponse = new Property(); - $expectedResponse->setName($name); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setCurrencyCode($currencyCode); - $expectedResponse->setAccount($account); - $transport->addResponse($expectedResponse); - // Mock request - $property = new Property(); - $propertyDisplayName = 'propertyDisplayName-1254483624'; - $property->setDisplayName($propertyDisplayName); - $propertyTimeZone = 'propertyTimeZone-1600366322'; - $property->setTimeZone($propertyTimeZone); - $response = $gapicClient->createProperty($property); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateProperty', $actualFuncCall); - $actualValue = $actualRequestObject->getProperty(); - $this->assertProtobufEquals($property, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $property = new Property(); - $propertyDisplayName = 'propertyDisplayName-1254483624'; - $property->setDisplayName($propertyDisplayName); - $propertyTimeZone = 'propertyTimeZone-1600366322'; - $property->setTimeZone($propertyTimeZone); - try { - $gapicClient->createProperty($property); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createRollupPropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CreateRollupPropertyResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $rollupProperty = new Property(); - $rollupPropertyDisplayName = 'rollupPropertyDisplayName1210744416'; - $rollupProperty->setDisplayName($rollupPropertyDisplayName); - $rollupPropertyTimeZone = 'rollupPropertyTimeZone1768247558'; - $rollupProperty->setTimeZone($rollupPropertyTimeZone); - $response = $gapicClient->createRollupProperty($rollupProperty); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupProperty', $actualFuncCall); - $actualValue = $actualRequestObject->getRollupProperty(); - $this->assertProtobufEquals($rollupProperty, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createRollupPropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $rollupProperty = new Property(); - $rollupPropertyDisplayName = 'rollupPropertyDisplayName1210744416'; - $rollupProperty->setDisplayName($rollupPropertyDisplayName); - $rollupPropertyTimeZone = 'rollupPropertyTimeZone1768247558'; - $rollupProperty->setTimeZone($rollupPropertyTimeZone); - try { - $gapicClient->createRollupProperty($rollupProperty); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createRollupPropertySourceLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $sourceProperty = 'sourceProperty2069271929'; - $expectedResponse = new RollupPropertySourceLink(); - $expectedResponse->setName($name); - $expectedResponse->setSourceProperty($sourceProperty); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $rollupPropertySourceLink = new RollupPropertySourceLink(); - $response = $gapicClient->createRollupPropertySourceLink($formattedParent, $rollupPropertySourceLink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupPropertySourceLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRollupPropertySourceLink(); - $this->assertProtobufEquals($rollupPropertySourceLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createRollupPropertySourceLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $rollupPropertySourceLink = new RollupPropertySourceLink(); - try { - $gapicClient->createRollupPropertySourceLink($formattedParent, $rollupPropertySourceLink); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSKAdNetworkConversionValueSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $applyConversionValues = true; - $expectedResponse = new SKAdNetworkConversionValueSchema(); - $expectedResponse->setName($name); - $expectedResponse->setApplyConversionValues($applyConversionValues); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $skadnetworkConversionValueSchema = new SKAdNetworkConversionValueSchema(); - $skadnetworkConversionValueSchemaPostbackWindowOne = new PostbackWindow(); - $skadnetworkConversionValueSchema->setPostbackWindowOne($skadnetworkConversionValueSchemaPostbackWindowOne); - $response = $gapicClient->createSKAdNetworkConversionValueSchema($formattedParent, $skadnetworkConversionValueSchema); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSKAdNetworkConversionValueSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSkadnetworkConversionValueSchema(); - $this->assertProtobufEquals($skadnetworkConversionValueSchema, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSKAdNetworkConversionValueSchemaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $skadnetworkConversionValueSchema = new SKAdNetworkConversionValueSchema(); - $skadnetworkConversionValueSchemaPostbackWindowOne = new PostbackWindow(); - $skadnetworkConversionValueSchema->setPostbackWindowOne($skadnetworkConversionValueSchemaPostbackWindowOne); - try { - $gapicClient->createSKAdNetworkConversionValueSchema($formattedParent, $skadnetworkConversionValueSchema); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSearchAds360LinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $advertiserId = 'advertiserId-127926097'; - $advertiserDisplayName = 'advertiserDisplayName-674771332'; - $expectedResponse = new SearchAds360Link(); - $expectedResponse->setName($name); - $expectedResponse->setAdvertiserId($advertiserId); - $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $searchAds360Link = new SearchAds360Link(); - $response = $gapicClient->createSearchAds360Link($formattedParent, $searchAds360Link); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSearchAds360Link', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSearchAds360Link(); - $this->assertProtobufEquals($searchAds360Link, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSearchAds360LinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $searchAds360Link = new SearchAds360Link(); - try { - $gapicClient->createSearchAds360Link($formattedParent, $searchAds360Link); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSubpropertyEventFilterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $applyToProperty = 'applyToProperty-1639692344'; - $expectedResponse = new SubpropertyEventFilter(); - $expectedResponse->setName($name); - $expectedResponse->setApplyToProperty($applyToProperty); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $subpropertyEventFilter = new SubpropertyEventFilter(); - $subpropertyEventFilterFilterClauses = []; - $subpropertyEventFilter->setFilterClauses($subpropertyEventFilterFilterClauses); - $response = $gapicClient->createSubpropertyEventFilter($formattedParent, $subpropertyEventFilter); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSubpropertyEventFilter', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSubpropertyEventFilter(); - $this->assertProtobufEquals($subpropertyEventFilter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSubpropertyEventFilterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $subpropertyEventFilter = new SubpropertyEventFilter(); - $subpropertyEventFilterFilterClauses = []; - $subpropertyEventFilter->setFilterClauses($subpropertyEventFilterFilterClauses); - try { - $gapicClient->createSubpropertyEventFilter($formattedParent, $subpropertyEventFilter); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAccessBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - $gapicClient->deleteAccessBinding($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAccessBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAccessBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - try { - $gapicClient->deleteAccessBinding($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $gapicClient->deleteAccount($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->accountName('[ACCOUNT]'); - try { - $gapicClient->deleteAccount($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAdSenseLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - $gapicClient->deleteAdSenseLink($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAdSenseLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAdSenseLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - try { - $gapicClient->deleteAdSenseLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBigQueryLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - $gapicClient->deleteBigQueryLink($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteBigQueryLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBigQueryLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - try { - $gapicClient->deleteBigQueryLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCalculatedMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - $gapicClient->deleteCalculatedMetric($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteCalculatedMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCalculatedMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - try { - $gapicClient->deleteCalculatedMetric($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteChannelGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - $gapicClient->deleteChannelGroup($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteChannelGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteChannelGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - try { - $gapicClient->deleteChannelGroup($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConnectedSiteTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - $gapicClient->deleteConnectedSiteTag(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConnectedSiteTag', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConnectedSiteTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->deleteConnectedSiteTag(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConversionEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $gapicClient->deleteConversionEvent($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConversionEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConversionEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - try { - $gapicClient->deleteConversionEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $gapicClient->deleteDataStream($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDataStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->deleteDataStream($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDisplayVideo360AdvertiserLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - $gapicClient->deleteDisplayVideo360AdvertiserLink($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDisplayVideo360AdvertiserLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - try { - $gapicClient->deleteDisplayVideo360AdvertiserLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDisplayVideo360AdvertiserLinkProposalTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $gapicClient->deleteDisplayVideo360AdvertiserLinkProposal($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDisplayVideo360AdvertiserLinkProposalExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - try { - $gapicClient->deleteDisplayVideo360AdvertiserLinkProposal($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventCreateRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - $gapicClient->deleteEventCreateRule($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteEventCreateRule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventCreateRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - try { - $gapicClient->deleteEventCreateRule($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventEditRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - $gapicClient->deleteEventEditRule($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteEventEditRule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventEditRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - try { - $gapicClient->deleteEventEditRule($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExpandedDataSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - $gapicClient->deleteExpandedDataSet($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteExpandedDataSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExpandedDataSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - try { - $gapicClient->deleteExpandedDataSet($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFirebaseLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - $gapicClient->deleteFirebaseLink($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteFirebaseLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFirebaseLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - try { - $gapicClient->deleteFirebaseLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGoogleAdsLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - $gapicClient->deleteGoogleAdsLink($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteGoogleAdsLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGoogleAdsLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - try { - $gapicClient->deleteGoogleAdsLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteKeyEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $gapicClient->deleteKeyEvent($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteKeyEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteKeyEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - try { - $gapicClient->deleteKeyEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMeasurementProtocolSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $gapicClient->deleteMeasurementProtocolSecret($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteMeasurementProtocolSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMeasurementProtocolSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - try { - $gapicClient->deleteMeasurementProtocolSecret($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $timeZone = 'timeZone36848094'; - $currencyCode = 'currencyCode1108728155'; - $account = 'account-1177318867'; - $expectedResponse = new Property(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setCurrencyCode($currencyCode); - $expectedResponse->setAccount($account); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->deleteProperty($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteProperty', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->deleteProperty($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteRollupPropertySourceLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - $gapicClient->deleteRollupPropertySourceLink($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteRollupPropertySourceLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteRollupPropertySourceLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - try { - $gapicClient->deleteRollupPropertySourceLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSKAdNetworkConversionValueSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - $gapicClient->deleteSKAdNetworkConversionValueSchema($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSKAdNetworkConversionValueSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSKAdNetworkConversionValueSchemaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - try { - $gapicClient->deleteSKAdNetworkConversionValueSchema($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSearchAds360LinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - $gapicClient->deleteSearchAds360Link($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSearchAds360Link', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSearchAds360LinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - try { - $gapicClient->deleteSearchAds360Link($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSubpropertyEventFilterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - $gapicClient->deleteSubpropertyEventFilter($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSubpropertyEventFilter', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSubpropertyEventFilterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - try { - $gapicClient->deleteSubpropertyEventFilter($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchAutomatedGa4ConfigurationOptOutTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $optOut = true; - $expectedResponse = new FetchAutomatedGa4ConfigurationOptOutResponse(); - $expectedResponse->setOptOut($optOut); - $transport->addResponse($expectedResponse); - // Mock request - $property = 'property-993141291'; - $response = $gapicClient->fetchAutomatedGa4ConfigurationOptOut($property); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/FetchAutomatedGa4ConfigurationOptOut', $actualFuncCall); - $actualValue = $actualRequestObject->getProperty(); - $this->assertProtobufEquals($property, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchAutomatedGa4ConfigurationOptOutExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $property = 'property-993141291'; - try { - $gapicClient->fetchAutomatedGa4ConfigurationOptOut($property); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchConnectedGa4PropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $property2 = 'property2-926037944'; - $expectedResponse = new FetchConnectedGa4PropertyResponse(); - $expectedResponse->setProperty($property2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->fetchConnectedGa4Property($formattedProperty); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/FetchConnectedGa4Property', $actualFuncCall); - $actualValue = $actualRequestObject->getProperty(); - $this->assertProtobufEquals($formattedProperty, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchConnectedGa4PropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->fetchConnectedGa4Property($formattedProperty); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAccessBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $user = 'user3599307'; - $name2 = 'name2-1052831874'; - $expectedResponse = new AccessBinding(); - $expectedResponse->setUser($user); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - $response = $gapicClient->getAccessBinding($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAccessBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAccessBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - try { - $gapicClient->getAccessBinding($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $regionCode = 'regionCode-1566082984'; - $deleted = false; - $gmpOrganization = 'gmpOrganization-1643573496'; - $expectedResponse = new Account(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRegionCode($regionCode); - $expectedResponse->setDeleted($deleted); - $expectedResponse->setGmpOrganization($gmpOrganization); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $response = $gapicClient->getAccount($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->accountName('[ACCOUNT]'); - try { - $gapicClient->getAccount($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAdSenseLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $adClientCode = 'adClientCode-1866307643'; - $expectedResponse = new AdSenseLink(); - $expectedResponse->setName($name2); - $expectedResponse->setAdClientCode($adClientCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - $response = $gapicClient->getAdSenseLink($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAdSenseLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAdSenseLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - try { - $gapicClient->getAdSenseLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttributionSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new AttributionSettings(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attributionSettingsName('[PROPERTY]'); - $response = $gapicClient->getAttributionSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAttributionSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttributionSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->attributionSettingsName('[PROPERTY]'); - try { - $gapicClient->getAttributionSettings($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAudienceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $membershipDurationDays = 1702404985; - $adsPersonalizationEnabled = false; - $expectedResponse = new Audience(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setMembershipDurationDays($membershipDurationDays); - $expectedResponse->setAdsPersonalizationEnabled($adsPersonalizationEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->audienceName('[PROPERTY]', '[AUDIENCE]'); - $response = $gapicClient->getAudience($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAudience', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAudienceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->audienceName('[PROPERTY]', '[AUDIENCE]'); - try { - $gapicClient->getAudience($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBigQueryLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $project = 'project-309310695'; - $dailyExportEnabled = true; - $streamingExportEnabled = false; - $freshDailyExportEnabled = false; - $includeAdvertisingId = false; - $datasetLocation = 'datasetLocation1011262364'; - $expectedResponse = new BigQueryLink(); - $expectedResponse->setName($name2); - $expectedResponse->setProject($project); - $expectedResponse->setDailyExportEnabled($dailyExportEnabled); - $expectedResponse->setStreamingExportEnabled($streamingExportEnabled); - $expectedResponse->setFreshDailyExportEnabled($freshDailyExportEnabled); - $expectedResponse->setIncludeAdvertisingId($includeAdvertisingId); - $expectedResponse->setDatasetLocation($datasetLocation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - $response = $gapicClient->getBigQueryLink($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetBigQueryLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBigQueryLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - try { - $gapicClient->getBigQueryLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCalculatedMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $calculatedMetricId = 'calculatedMetricId8203465'; - $formula = 'formula-677424794'; - $invalidMetricReference = true; - $expectedResponse = new CalculatedMetric(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setCalculatedMetricId($calculatedMetricId); - $expectedResponse->setFormula($formula); - $expectedResponse->setInvalidMetricReference($invalidMetricReference); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - $response = $gapicClient->getCalculatedMetric($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetCalculatedMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCalculatedMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - try { - $gapicClient->getCalculatedMetric($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getChannelGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $systemDefined = false; - $primary = true; - $expectedResponse = new ChannelGroup(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSystemDefined($systemDefined); - $expectedResponse->setPrimary($primary); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - $response = $gapicClient->getChannelGroup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetChannelGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getChannelGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - try { - $gapicClient->getChannelGroup($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversionEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new ConversionEvent(); - $expectedResponse->setName($name2); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $response = $gapicClient->getConversionEvent($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetConversionEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversionEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - try { - $gapicClient->getConversionEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomDimensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $disallowAdsPersonalization = false; - $expectedResponse = new CustomDimension(); - $expectedResponse->setName($name2); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setDisallowAdsPersonalization($disallowAdsPersonalization); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $response = $gapicClient->getCustomDimension($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomDimension', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomDimensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - try { - $gapicClient->getCustomDimension($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomMetric(); - $expectedResponse->setName($name2); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $response = $gapicClient->getCustomMetric($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - try { - $gapicClient->getCustomMetric($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataRedactionSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $emailRedactionEnabled = true; - $queryParameterRedactionEnabled = true; - $expectedResponse = new DataRedactionSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setEmailRedactionEnabled($emailRedactionEnabled); - $expectedResponse->setQueryParameterRedactionEnabled($queryParameterRedactionEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataRedactionSettingsName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->getDataRedactionSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRedactionSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataRedactionSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataRedactionSettingsName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->getDataRedactionSettings($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataRetentionSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $resetUserDataOnNewActivity = false; - $expectedResponse = new DataRetentionSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setResetUserDataOnNewActivity($resetUserDataOnNewActivity); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataRetentionSettingsName('[PROPERTY]'); - $response = $gapicClient->getDataRetentionSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRetentionSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataRetentionSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataRetentionSettingsName('[PROPERTY]'); - try { - $gapicClient->getDataRetentionSettings($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataSharingSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sharingWithGoogleSupportEnabled = false; - $sharingWithGoogleAssignedSalesEnabled = false; - $sharingWithGoogleAnySalesEnabled = false; - $sharingWithGoogleProductsEnabled = true; - $sharingWithOthersEnabled = false; - $expectedResponse = new DataSharingSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setSharingWithGoogleSupportEnabled($sharingWithGoogleSupportEnabled); - $expectedResponse->setSharingWithGoogleAssignedSalesEnabled($sharingWithGoogleAssignedSalesEnabled); - $expectedResponse->setSharingWithGoogleAnySalesEnabled($sharingWithGoogleAnySalesEnabled); - $expectedResponse->setSharingWithGoogleProductsEnabled($sharingWithGoogleProductsEnabled); - $expectedResponse->setSharingWithOthersEnabled($sharingWithOthersEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataSharingSettingsName('[ACCOUNT]'); - $response = $gapicClient->getDataSharingSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataSharingSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataSharingSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataSharingSettingsName('[ACCOUNT]'); - try { - $gapicClient->getDataSharingSettings($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataStream(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->getDataStream($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->getDataStream($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDisplayVideo360AdvertiserLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $advertiserId = 'advertiserId-127926097'; - $advertiserDisplayName = 'advertiserDisplayName-674771332'; - $expectedResponse = new DisplayVideo360AdvertiserLink(); - $expectedResponse->setName($name2); - $expectedResponse->setAdvertiserId($advertiserId); - $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - $response = $gapicClient->getDisplayVideo360AdvertiserLink($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDisplayVideo360AdvertiserLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - try { - $gapicClient->getDisplayVideo360AdvertiserLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDisplayVideo360AdvertiserLinkProposalTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $advertiserId = 'advertiserId-127926097'; - $advertiserDisplayName = 'advertiserDisplayName-674771332'; - $validationEmail = 'validationEmail2105669718'; - $expectedResponse = new DisplayVideo360AdvertiserLinkProposal(); - $expectedResponse->setName($name2); - $expectedResponse->setAdvertiserId($advertiserId); - $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); - $expectedResponse->setValidationEmail($validationEmail); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $response = $gapicClient->getDisplayVideo360AdvertiserLinkProposal($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDisplayVideo360AdvertiserLinkProposalExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - try { - $gapicClient->getDisplayVideo360AdvertiserLinkProposal($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnhancedMeasurementSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $streamEnabled = true; - $scrollsEnabled = true; - $outboundClicksEnabled = true; - $siteSearchEnabled = true; - $videoEngagementEnabled = false; - $fileDownloadsEnabled = true; - $pageChangesEnabled = false; - $formInteractionsEnabled = true; - $searchQueryParameter = 'searchQueryParameter638048347'; - $uriQueryParameter = 'uriQueryParameter964636703'; - $expectedResponse = new EnhancedMeasurementSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setStreamEnabled($streamEnabled); - $expectedResponse->setScrollsEnabled($scrollsEnabled); - $expectedResponse->setOutboundClicksEnabled($outboundClicksEnabled); - $expectedResponse->setSiteSearchEnabled($siteSearchEnabled); - $expectedResponse->setVideoEngagementEnabled($videoEngagementEnabled); - $expectedResponse->setFileDownloadsEnabled($fileDownloadsEnabled); - $expectedResponse->setPageChangesEnabled($pageChangesEnabled); - $expectedResponse->setFormInteractionsEnabled($formInteractionsEnabled); - $expectedResponse->setSearchQueryParameter($searchQueryParameter); - $expectedResponse->setUriQueryParameter($uriQueryParameter); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->enhancedMeasurementSettingsName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->getEnhancedMeasurementSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetEnhancedMeasurementSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnhancedMeasurementSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->enhancedMeasurementSettingsName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->getEnhancedMeasurementSettings($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventCreateRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $destinationEvent = 'destinationEvent-1300408535'; - $sourceCopyParameters = true; - $expectedResponse = new EventCreateRule(); - $expectedResponse->setName($name2); - $expectedResponse->setDestinationEvent($destinationEvent); - $expectedResponse->setSourceCopyParameters($sourceCopyParameters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - $response = $gapicClient->getEventCreateRule($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetEventCreateRule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventCreateRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - try { - $gapicClient->getEventCreateRule($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventEditRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $processingOrder = 334545118; - $expectedResponse = new EventEditRule(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setProcessingOrder($processingOrder); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - $response = $gapicClient->getEventEditRule($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetEventEditRule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventEditRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - try { - $gapicClient->getEventEditRule($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExpandedDataSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new ExpandedDataSet(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - $response = $gapicClient->getExpandedDataSet($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetExpandedDataSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExpandedDataSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - try { - $gapicClient->getExpandedDataSet($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlobalSiteTagTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $snippet = 'snippet-2061635299'; - $expectedResponse = new GlobalSiteTag(); - $expectedResponse->setName($name2); - $expectedResponse->setSnippet($snippet); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->globalSiteTagName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->getGlobalSiteTag($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGlobalSiteTag', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlobalSiteTagExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->globalSiteTagName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->getGlobalSiteTag($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGoogleSignalsSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new GoogleSignalsSettings(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->googleSignalsSettingsName('[PROPERTY]'); - $response = $gapicClient->getGoogleSignalsSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGoogleSignalsSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGoogleSignalsSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->googleSignalsSettingsName('[PROPERTY]'); - try { - $gapicClient->getGoogleSignalsSettings($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new KeyEvent(); - $expectedResponse->setName($name2); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $response = $gapicClient->getKeyEvent($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetKeyEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - try { - $gapicClient->getKeyEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMeasurementProtocolSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $secretValue = 'secretValue1322942242'; - $expectedResponse = new MeasurementProtocolSecret(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSecretValue($secretValue); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $response = $gapicClient->getMeasurementProtocolSecret($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetMeasurementProtocolSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMeasurementProtocolSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - try { - $gapicClient->getMeasurementProtocolSecret($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $timeZone = 'timeZone36848094'; - $currencyCode = 'currencyCode1108728155'; - $account = 'account-1177318867'; - $expectedResponse = new Property(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setCurrencyCode($currencyCode); - $expectedResponse->setAccount($account); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->getProperty($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetProperty', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->getProperty($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRollupPropertySourceLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceProperty = 'sourceProperty2069271929'; - $expectedResponse = new RollupPropertySourceLink(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceProperty($sourceProperty); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - $response = $gapicClient->getRollupPropertySourceLink($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetRollupPropertySourceLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRollupPropertySourceLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - try { - $gapicClient->getRollupPropertySourceLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSKAdNetworkConversionValueSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $applyConversionValues = true; - $expectedResponse = new SKAdNetworkConversionValueSchema(); - $expectedResponse->setName($name2); - $expectedResponse->setApplyConversionValues($applyConversionValues); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - $response = $gapicClient->getSKAdNetworkConversionValueSchema($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetSKAdNetworkConversionValueSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSKAdNetworkConversionValueSchemaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - try { - $gapicClient->getSKAdNetworkConversionValueSchema($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSearchAds360LinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $advertiserId = 'advertiserId-127926097'; - $advertiserDisplayName = 'advertiserDisplayName-674771332'; - $expectedResponse = new SearchAds360Link(); - $expectedResponse->setName($name2); - $expectedResponse->setAdvertiserId($advertiserId); - $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - $response = $gapicClient->getSearchAds360Link($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetSearchAds360Link', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSearchAds360LinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - try { - $gapicClient->getSearchAds360Link($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSubpropertyEventFilterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $applyToProperty = 'applyToProperty-1639692344'; - $expectedResponse = new SubpropertyEventFilter(); - $expectedResponse->setName($name2); - $expectedResponse->setApplyToProperty($applyToProperty); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - $response = $gapicClient->getSubpropertyEventFilter($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetSubpropertyEventFilter', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSubpropertyEventFilterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - try { - $gapicClient->getSubpropertyEventFilter($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccessBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $accessBindingsElement = new AccessBinding(); - $accessBindings = [ - $accessBindingsElement, - ]; - $expectedResponse = new ListAccessBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAccessBindings($accessBindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $response = $gapicClient->listAccessBindings($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAccessBindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccessBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccessBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - try { - $gapicClient->listAccessBindings($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccountSummariesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $accountSummariesElement = new AccountSummary(); - $accountSummaries = [ - $accountSummariesElement, - ]; - $expectedResponse = new ListAccountSummariesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAccountSummaries($accountSummaries); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listAccountSummaries(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAccountSummaries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccountSummaries', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccountSummariesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listAccountSummaries(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccountsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $accountsElement = new Account(); - $accounts = [ - $accountsElement, - ]; - $expectedResponse = new ListAccountsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAccounts($accounts); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listAccounts(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAccounts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccounts', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccountsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listAccounts(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdSenseLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $adsenseLinksElement = new AdSenseLink(); - $adsenseLinks = [ - $adsenseLinksElement, - ]; - $expectedResponse = new ListAdSenseLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAdsenseLinks($adsenseLinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listAdSenseLinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAdsenseLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAdSenseLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdSenseLinksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listAdSenseLinks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAudiencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $audiencesElement = new Audience(); - $audiences = [ - $audiencesElement, - ]; - $expectedResponse = new ListAudiencesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAudiences($audiences); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listAudiences($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAudiences()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAudiences', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAudiencesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listAudiences($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBigQueryLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $bigqueryLinksElement = new BigQueryLink(); - $bigqueryLinks = [ - $bigqueryLinksElement, - ]; - $expectedResponse = new ListBigQueryLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBigqueryLinks($bigqueryLinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listBigQueryLinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBigqueryLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListBigQueryLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBigQueryLinksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listBigQueryLinks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCalculatedMetricsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $calculatedMetricsElement = new CalculatedMetric(); - $calculatedMetrics = [ - $calculatedMetricsElement, - ]; - $expectedResponse = new ListCalculatedMetricsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCalculatedMetrics($calculatedMetrics); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listCalculatedMetrics($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCalculatedMetrics()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCalculatedMetrics', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCalculatedMetricsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listCalculatedMetrics($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChannelGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $channelGroupsElement = new ChannelGroup(); - $channelGroups = [ - $channelGroupsElement, - ]; - $expectedResponse = new ListChannelGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChannelGroups($channelGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listChannelGroups($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChannelGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListChannelGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChannelGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listChannelGroups($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectedSiteTagsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListConnectedSiteTagsResponse(); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listConnectedSiteTags(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConnectedSiteTags', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectedSiteTagsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listConnectedSiteTags(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversionEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $conversionEventsElement = new ConversionEvent(); - $conversionEvents = [ - $conversionEventsElement, - ]; - $expectedResponse = new ListConversionEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConversionEvents($conversionEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listConversionEvents($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConversionEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConversionEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversionEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listConversionEvents($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomDimensionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $customDimensionsElement = new CustomDimension(); - $customDimensions = [ - $customDimensionsElement, - ]; - $expectedResponse = new ListCustomDimensionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCustomDimensions($customDimensions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listCustomDimensions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCustomDimensions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomDimensions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomDimensionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listCustomDimensions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomMetricsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $customMetricsElement = new CustomMetric(); - $customMetrics = [ - $customMetricsElement, - ]; - $expectedResponse = new ListCustomMetricsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCustomMetrics($customMetrics); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listCustomMetrics($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCustomMetrics()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomMetrics', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomMetricsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listCustomMetrics($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataStreamsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataStreamsElement = new DataStream(); - $dataStreams = [ - $dataStreamsElement, - ]; - $expectedResponse = new ListDataStreamsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataStreams($dataStreams); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listDataStreams($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataStreams()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDataStreams', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataStreamsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listDataStreams($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDisplayVideo360AdvertiserLinkProposalsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $displayVideo360AdvertiserLinkProposalsElement = new DisplayVideo360AdvertiserLinkProposal(); - $displayVideo360AdvertiserLinkProposals = [ - $displayVideo360AdvertiserLinkProposalsElement, - ]; - $expectedResponse = new ListDisplayVideo360AdvertiserLinkProposalsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDisplayVideo360AdvertiserLinkProposals($displayVideo360AdvertiserLinkProposals); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listDisplayVideo360AdvertiserLinkProposals($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDisplayVideo360AdvertiserLinkProposals()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinkProposals', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDisplayVideo360AdvertiserLinkProposalsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listDisplayVideo360AdvertiserLinkProposals($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDisplayVideo360AdvertiserLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $displayVideo360AdvertiserLinksElement = new DisplayVideo360AdvertiserLink(); - $displayVideo360AdvertiserLinks = [ - $displayVideo360AdvertiserLinksElement, - ]; - $expectedResponse = new ListDisplayVideo360AdvertiserLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDisplayVideo360AdvertiserLinks($displayVideo360AdvertiserLinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listDisplayVideo360AdvertiserLinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDisplayVideo360AdvertiserLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDisplayVideo360AdvertiserLinksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listDisplayVideo360AdvertiserLinks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventCreateRulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $eventCreateRulesElement = new EventCreateRule(); - $eventCreateRules = [ - $eventCreateRulesElement, - ]; - $expectedResponse = new ListEventCreateRulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEventCreateRules($eventCreateRules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->listEventCreateRules($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEventCreateRules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListEventCreateRules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventCreateRulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->listEventCreateRules($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventEditRulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $eventEditRulesElement = new EventEditRule(); - $eventEditRules = [ - $eventEditRulesElement, - ]; - $expectedResponse = new ListEventEditRulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEventEditRules($eventEditRules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->listEventEditRules($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEventEditRules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListEventEditRules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventEditRulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->listEventEditRules($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExpandedDataSetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $expandedDataSetsElement = new ExpandedDataSet(); - $expandedDataSets = [ - $expandedDataSetsElement, - ]; - $expectedResponse = new ListExpandedDataSetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExpandedDataSets($expandedDataSets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listExpandedDataSets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExpandedDataSets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListExpandedDataSets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExpandedDataSetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listExpandedDataSets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFirebaseLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $firebaseLinksElement = new FirebaseLink(); - $firebaseLinks = [ - $firebaseLinksElement, - ]; - $expectedResponse = new ListFirebaseLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFirebaseLinks($firebaseLinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listFirebaseLinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFirebaseLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListFirebaseLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFirebaseLinksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listFirebaseLinks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGoogleAdsLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $googleAdsLinksElement = new GoogleAdsLink(); - $googleAdsLinks = [ - $googleAdsLinksElement, - ]; - $expectedResponse = new ListGoogleAdsLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGoogleAdsLinks($googleAdsLinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listGoogleAdsLinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGoogleAdsLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListGoogleAdsLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGoogleAdsLinksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listGoogleAdsLinks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeyEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $keyEventsElement = new KeyEvent(); - $keyEvents = [ - $keyEventsElement, - ]; - $expectedResponse = new ListKeyEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setKeyEvents($keyEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listKeyEvents($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getKeyEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListKeyEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeyEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listKeyEvents($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMeasurementProtocolSecretsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $measurementProtocolSecretsElement = new MeasurementProtocolSecret(); - $measurementProtocolSecrets = [ - $measurementProtocolSecretsElement, - ]; - $expectedResponse = new ListMeasurementProtocolSecretsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMeasurementProtocolSecrets($measurementProtocolSecrets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->listMeasurementProtocolSecrets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMeasurementProtocolSecrets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListMeasurementProtocolSecrets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMeasurementProtocolSecretsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->listMeasurementProtocolSecrets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPropertiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $propertiesElement = new Property(); - $properties = [ - $propertiesElement, - ]; - $expectedResponse = new ListPropertiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProperties($properties); - $transport->addResponse($expectedResponse); - // Mock request - $filter = 'filter-1274492040'; - $response = $gapicClient->listProperties($filter); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProperties()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListProperties', $actualFuncCall); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPropertiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $filter = 'filter-1274492040'; - try { - $gapicClient->listProperties($filter); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRollupPropertySourceLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $rollupPropertySourceLinksElement = new RollupPropertySourceLink(); - $rollupPropertySourceLinks = [ - $rollupPropertySourceLinksElement, - ]; - $expectedResponse = new ListRollupPropertySourceLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRollupPropertySourceLinks($rollupPropertySourceLinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listRollupPropertySourceLinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRollupPropertySourceLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListRollupPropertySourceLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRollupPropertySourceLinksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listRollupPropertySourceLinks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSKAdNetworkConversionValueSchemasTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $skadnetworkConversionValueSchemasElement = new SKAdNetworkConversionValueSchema(); - $skadnetworkConversionValueSchemas = [ - $skadnetworkConversionValueSchemasElement, - ]; - $expectedResponse = new ListSKAdNetworkConversionValueSchemasResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSkadnetworkConversionValueSchemas($skadnetworkConversionValueSchemas); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->listSKAdNetworkConversionValueSchemas($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSkadnetworkConversionValueSchemas()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSKAdNetworkConversionValueSchemas', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSKAdNetworkConversionValueSchemasExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->listSKAdNetworkConversionValueSchemas($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSearchAds360LinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $searchAds360LinksElement = new SearchAds360Link(); - $searchAds360Links = [ - $searchAds360LinksElement, - ]; - $expectedResponse = new ListSearchAds360LinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSearchAds360Links($searchAds360Links); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listSearchAds360Links($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSearchAds360Links()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSearchAds360Links', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSearchAds360LinksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listSearchAds360Links($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubpropertyEventFiltersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $subpropertyEventFiltersElement = new SubpropertyEventFilter(); - $subpropertyEventFilters = [ - $subpropertyEventFiltersElement, - ]; - $expectedResponse = new ListSubpropertyEventFiltersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSubpropertyEventFilters($subpropertyEventFilters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listSubpropertyEventFilters($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSubpropertyEventFilters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSubpropertyEventFilters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubpropertyEventFiltersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listSubpropertyEventFilters($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function provisionAccountTicketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accountTicketId = 'accountTicketId-442102884'; - $expectedResponse = new ProvisionAccountTicketResponse(); - $expectedResponse->setAccountTicketId($accountTicketId); - $transport->addResponse($expectedResponse); - $response = $gapicClient->provisionAccountTicket(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ProvisionAccountTicket', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function provisionAccountTicketExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->provisionAccountTicket(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function provisionSubpropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ProvisionSubpropertyResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $subproperty = new Property(); - $subpropertyDisplayName = 'subpropertyDisplayName-1859570920'; - $subproperty->setDisplayName($subpropertyDisplayName); - $subpropertyTimeZone = 'subpropertyTimeZone-1143367858'; - $subproperty->setTimeZone($subpropertyTimeZone); - $response = $gapicClient->provisionSubproperty($subproperty); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ProvisionSubproperty', $actualFuncCall); - $actualValue = $actualRequestObject->getSubproperty(); - $this->assertProtobufEquals($subproperty, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function provisionSubpropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $subproperty = new Property(); - $subpropertyDisplayName = 'subpropertyDisplayName-1859570920'; - $subproperty->setDisplayName($subpropertyDisplayName); - $subpropertyTimeZone = 'subpropertyTimeZone-1143367858'; - $subproperty->setTimeZone($subpropertyTimeZone); - try { - $gapicClient->provisionSubproperty($subproperty); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reorderEventEditRulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $eventEditRules = []; - $gapicClient->reorderEventEditRules($formattedParent, $eventEditRules); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ReorderEventEditRules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEventEditRules(); - $this->assertProtobufEquals($eventEditRules, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reorderEventEditRulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $eventEditRules = []; - try { - $gapicClient->reorderEventEditRules($formattedParent, $eventEditRules); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAccessReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $rowCount = 1340416618; - $expectedResponse = new RunAccessReportResponse(); - $expectedResponse->setRowCount($rowCount); - $transport->addResponse($expectedResponse); - $response = $gapicClient->runAccessReport(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/RunAccessReport', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAccessReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->runAccessReport(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchChangeHistoryEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $changeHistoryEventsElement = new ChangeHistoryEvent(); - $changeHistoryEvents = [ - $changeHistoryEventsElement, - ]; - $expectedResponse = new SearchChangeHistoryEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChangeHistoryEvents($changeHistoryEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAccount = $gapicClient->accountName('[ACCOUNT]'); - $response = $gapicClient->searchChangeHistoryEvents($formattedAccount); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChangeHistoryEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/SearchChangeHistoryEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getAccount(); - $this->assertProtobufEquals($formattedAccount, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchChangeHistoryEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAccount = $gapicClient->accountName('[ACCOUNT]'); - try { - $gapicClient->searchChangeHistoryEvents($formattedAccount); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setAutomatedGa4ConfigurationOptOutTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SetAutomatedGa4ConfigurationOptOutResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $property = 'property-993141291'; - $response = $gapicClient->setAutomatedGa4ConfigurationOptOut($property); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/SetAutomatedGa4ConfigurationOptOut', $actualFuncCall); - $actualValue = $actualRequestObject->getProperty(); - $this->assertProtobufEquals($property, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setAutomatedGa4ConfigurationOptOutExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $property = 'property-993141291'; - try { - $gapicClient->setAutomatedGa4ConfigurationOptOut($property); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAccessBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $user = 'user3599307'; - $name = 'name3373707'; - $expectedResponse = new AccessBinding(); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $accessBinding = new AccessBinding(); - $response = $gapicClient->updateAccessBinding($accessBinding); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAccessBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getAccessBinding(); - $this->assertProtobufEquals($accessBinding, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAccessBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $accessBinding = new AccessBinding(); - try { - $gapicClient->updateAccessBinding($accessBinding); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $regionCode = 'regionCode-1566082984'; - $deleted = false; - $gmpOrganization = 'gmpOrganization-1643573496'; - $expectedResponse = new Account(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRegionCode($regionCode); - $expectedResponse->setDeleted($deleted); - $expectedResponse->setGmpOrganization($gmpOrganization); - $transport->addResponse($expectedResponse); - // Mock request - $account = new Account(); - $accountDisplayName = 'accountDisplayName-616446464'; - $account->setDisplayName($accountDisplayName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAccount($account, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getAccount(); - $this->assertProtobufEquals($account, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $account = new Account(); - $accountDisplayName = 'accountDisplayName-616446464'; - $account->setDisplayName($accountDisplayName); - $updateMask = new FieldMask(); - try { - $gapicClient->updateAccount($account, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAttributionSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new AttributionSettings(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $attributionSettings = new AttributionSettings(); - $attributionSettingsAcquisitionConversionEventLookbackWindow = AcquisitionConversionEventLookbackWindow::ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; - $attributionSettings->setAcquisitionConversionEventLookbackWindow($attributionSettingsAcquisitionConversionEventLookbackWindow); - $attributionSettingsOtherConversionEventLookbackWindow = OtherConversionEventLookbackWindow::OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; - $attributionSettings->setOtherConversionEventLookbackWindow($attributionSettingsOtherConversionEventLookbackWindow); - $attributionSettingsReportingAttributionModel = ReportingAttributionModel::REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED; - $attributionSettings->setReportingAttributionModel($attributionSettingsReportingAttributionModel); - $attributionSettingsAdsWebConversionDataExportScope = AdsWebConversionDataExportScope::ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED; - $attributionSettings->setAdsWebConversionDataExportScope($attributionSettingsAdsWebConversionDataExportScope); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAttributionSettings($attributionSettings, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAttributionSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getAttributionSettings(); - $this->assertProtobufEquals($attributionSettings, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAttributionSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $attributionSettings = new AttributionSettings(); - $attributionSettingsAcquisitionConversionEventLookbackWindow = AcquisitionConversionEventLookbackWindow::ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; - $attributionSettings->setAcquisitionConversionEventLookbackWindow($attributionSettingsAcquisitionConversionEventLookbackWindow); - $attributionSettingsOtherConversionEventLookbackWindow = OtherConversionEventLookbackWindow::OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; - $attributionSettings->setOtherConversionEventLookbackWindow($attributionSettingsOtherConversionEventLookbackWindow); - $attributionSettingsReportingAttributionModel = ReportingAttributionModel::REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED; - $attributionSettings->setReportingAttributionModel($attributionSettingsReportingAttributionModel); - $attributionSettingsAdsWebConversionDataExportScope = AdsWebConversionDataExportScope::ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED; - $attributionSettings->setAdsWebConversionDataExportScope($attributionSettingsAdsWebConversionDataExportScope); - $updateMask = new FieldMask(); - try { - $gapicClient->updateAttributionSettings($attributionSettings, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAudienceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $membershipDurationDays = 1702404985; - $adsPersonalizationEnabled = false; - $expectedResponse = new Audience(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setMembershipDurationDays($membershipDurationDays); - $expectedResponse->setAdsPersonalizationEnabled($adsPersonalizationEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $audience = new Audience(); - $audienceDisplayName = 'audienceDisplayName1537141193'; - $audience->setDisplayName($audienceDisplayName); - $audienceDescription = 'audienceDescription-1901553832'; - $audience->setDescription($audienceDescription); - $audienceMembershipDurationDays = 1530655195; - $audience->setMembershipDurationDays($audienceMembershipDurationDays); - $audienceFilterClauses = []; - $audience->setFilterClauses($audienceFilterClauses); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAudience($audience, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAudience', $actualFuncCall); - $actualValue = $actualRequestObject->getAudience(); - $this->assertProtobufEquals($audience, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAudienceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $audience = new Audience(); - $audienceDisplayName = 'audienceDisplayName1537141193'; - $audience->setDisplayName($audienceDisplayName); - $audienceDescription = 'audienceDescription-1901553832'; - $audience->setDescription($audienceDescription); - $audienceMembershipDurationDays = 1530655195; - $audience->setMembershipDurationDays($audienceMembershipDurationDays); - $audienceFilterClauses = []; - $audience->setFilterClauses($audienceFilterClauses); - $updateMask = new FieldMask(); - try { - $gapicClient->updateAudience($audience, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBigQueryLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $project = 'project-309310695'; - $dailyExportEnabled = true; - $streamingExportEnabled = false; - $freshDailyExportEnabled = false; - $includeAdvertisingId = false; - $datasetLocation = 'datasetLocation1011262364'; - $expectedResponse = new BigQueryLink(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $expectedResponse->setDailyExportEnabled($dailyExportEnabled); - $expectedResponse->setStreamingExportEnabled($streamingExportEnabled); - $expectedResponse->setFreshDailyExportEnabled($freshDailyExportEnabled); - $expectedResponse->setIncludeAdvertisingId($includeAdvertisingId); - $expectedResponse->setDatasetLocation($datasetLocation); - $transport->addResponse($expectedResponse); - // Mock request - $bigqueryLink = new BigQueryLink(); - $bigqueryLinkDatasetLocation = 'bigqueryLinkDatasetLocation714488843'; - $bigqueryLink->setDatasetLocation($bigqueryLinkDatasetLocation); - $updateMask = new FieldMask(); - $response = $gapicClient->updateBigQueryLink($bigqueryLink, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateBigQueryLink', $actualFuncCall); - $actualValue = $actualRequestObject->getBigqueryLink(); - $this->assertProtobufEquals($bigqueryLink, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBigQueryLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $bigqueryLink = new BigQueryLink(); - $bigqueryLinkDatasetLocation = 'bigqueryLinkDatasetLocation714488843'; - $bigqueryLink->setDatasetLocation($bigqueryLinkDatasetLocation); - $updateMask = new FieldMask(); - try { - $gapicClient->updateBigQueryLink($bigqueryLink, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCalculatedMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $calculatedMetricId = 'calculatedMetricId8203465'; - $formula = 'formula-677424794'; - $invalidMetricReference = true; - $expectedResponse = new CalculatedMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setCalculatedMetricId($calculatedMetricId); - $expectedResponse->setFormula($formula); - $expectedResponse->setInvalidMetricReference($invalidMetricReference); - $transport->addResponse($expectedResponse); - // Mock request - $calculatedMetric = new CalculatedMetric(); - $calculatedMetricDisplayName = 'calculatedMetricDisplayName-1927551873'; - $calculatedMetric->setDisplayName($calculatedMetricDisplayName); - $calculatedMetricMetricUnit = MetricUnit::METRIC_UNIT_UNSPECIFIED; - $calculatedMetric->setMetricUnit($calculatedMetricMetricUnit); - $calculatedMetricFormula = 'calculatedMetricFormula752695416'; - $calculatedMetric->setFormula($calculatedMetricFormula); - $updateMask = new FieldMask(); - $response = $gapicClient->updateCalculatedMetric($calculatedMetric, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCalculatedMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getCalculatedMetric(); - $this->assertProtobufEquals($calculatedMetric, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCalculatedMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $calculatedMetric = new CalculatedMetric(); - $calculatedMetricDisplayName = 'calculatedMetricDisplayName-1927551873'; - $calculatedMetric->setDisplayName($calculatedMetricDisplayName); - $calculatedMetricMetricUnit = MetricUnit::METRIC_UNIT_UNSPECIFIED; - $calculatedMetric->setMetricUnit($calculatedMetricMetricUnit); - $calculatedMetricFormula = 'calculatedMetricFormula752695416'; - $calculatedMetric->setFormula($calculatedMetricFormula); - $updateMask = new FieldMask(); - try { - $gapicClient->updateCalculatedMetric($calculatedMetric, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateChannelGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $systemDefined = false; - $primary = true; - $expectedResponse = new ChannelGroup(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSystemDefined($systemDefined); - $expectedResponse->setPrimary($primary); - $transport->addResponse($expectedResponse); - // Mock request - $channelGroup = new ChannelGroup(); - $channelGroupDisplayName = 'channelGroupDisplayName1156787601'; - $channelGroup->setDisplayName($channelGroupDisplayName); - $channelGroupGroupingRule = []; - $channelGroup->setGroupingRule($channelGroupGroupingRule); - $updateMask = new FieldMask(); - $response = $gapicClient->updateChannelGroup($channelGroup, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateChannelGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getChannelGroup(); - $this->assertProtobufEquals($channelGroup, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateChannelGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $channelGroup = new ChannelGroup(); - $channelGroupDisplayName = 'channelGroupDisplayName1156787601'; - $channelGroup->setDisplayName($channelGroupDisplayName); - $channelGroupGroupingRule = []; - $channelGroup->setGroupingRule($channelGroupGroupingRule); - $updateMask = new FieldMask(); - try { - $gapicClient->updateChannelGroup($channelGroup, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateConversionEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new ConversionEvent(); - $expectedResponse->setName($name); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $conversionEvent = new ConversionEvent(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateConversionEvent($conversionEvent, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateConversionEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getConversionEvent(); - $this->assertProtobufEquals($conversionEvent, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateConversionEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $conversionEvent = new ConversionEvent(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateConversionEvent($conversionEvent, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomDimensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $disallowAdsPersonalization = false; - $expectedResponse = new CustomDimension(); - $expectedResponse->setName($name); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setDisallowAdsPersonalization($disallowAdsPersonalization); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateCustomDimension($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomDimension', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomDimensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateCustomDimension($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomMetric(); - $expectedResponse->setName($name); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateCustomMetric($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateCustomMetric($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataRedactionSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $emailRedactionEnabled = true; - $queryParameterRedactionEnabled = true; - $expectedResponse = new DataRedactionSettings(); - $expectedResponse->setName($name); - $expectedResponse->setEmailRedactionEnabled($emailRedactionEnabled); - $expectedResponse->setQueryParameterRedactionEnabled($queryParameterRedactionEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $dataRedactionSettings = new DataRedactionSettings(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateDataRedactionSettings($dataRedactionSettings, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRedactionSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getDataRedactionSettings(); - $this->assertProtobufEquals($dataRedactionSettings, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataRedactionSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $dataRedactionSettings = new DataRedactionSettings(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateDataRedactionSettings($dataRedactionSettings, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataRetentionSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $resetUserDataOnNewActivity = false; - $expectedResponse = new DataRetentionSettings(); - $expectedResponse->setName($name); - $expectedResponse->setResetUserDataOnNewActivity($resetUserDataOnNewActivity); - $transport->addResponse($expectedResponse); - // Mock request - $dataRetentionSettings = new DataRetentionSettings(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateDataRetentionSettings($dataRetentionSettings, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRetentionSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getDataRetentionSettings(); - $this->assertProtobufEquals($dataRetentionSettings, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataRetentionSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $dataRetentionSettings = new DataRetentionSettings(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateDataRetentionSettings($dataRetentionSettings, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataStream(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateDataStream($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataStream', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateDataStream($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDisplayVideo360AdvertiserLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $advertiserId = 'advertiserId-127926097'; - $advertiserDisplayName = 'advertiserDisplayName-674771332'; - $expectedResponse = new DisplayVideo360AdvertiserLink(); - $expectedResponse->setName($name); - $expectedResponse->setAdvertiserId($advertiserId); - $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateDisplayVideo360AdvertiserLink($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDisplayVideo360AdvertiserLink', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDisplayVideo360AdvertiserLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateDisplayVideo360AdvertiserLink($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEnhancedMeasurementSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $streamEnabled = true; - $scrollsEnabled = true; - $outboundClicksEnabled = true; - $siteSearchEnabled = true; - $videoEngagementEnabled = false; - $fileDownloadsEnabled = true; - $pageChangesEnabled = false; - $formInteractionsEnabled = true; - $searchQueryParameter = 'searchQueryParameter638048347'; - $uriQueryParameter = 'uriQueryParameter964636703'; - $expectedResponse = new EnhancedMeasurementSettings(); - $expectedResponse->setName($name); - $expectedResponse->setStreamEnabled($streamEnabled); - $expectedResponse->setScrollsEnabled($scrollsEnabled); - $expectedResponse->setOutboundClicksEnabled($outboundClicksEnabled); - $expectedResponse->setSiteSearchEnabled($siteSearchEnabled); - $expectedResponse->setVideoEngagementEnabled($videoEngagementEnabled); - $expectedResponse->setFileDownloadsEnabled($fileDownloadsEnabled); - $expectedResponse->setPageChangesEnabled($pageChangesEnabled); - $expectedResponse->setFormInteractionsEnabled($formInteractionsEnabled); - $expectedResponse->setSearchQueryParameter($searchQueryParameter); - $expectedResponse->setUriQueryParameter($uriQueryParameter); - $transport->addResponse($expectedResponse); - // Mock request - $enhancedMeasurementSettings = new EnhancedMeasurementSettings(); - $enhancedMeasurementSettingsSearchQueryParameter = 'enhancedMeasurementSettingsSearchQueryParameter1139945938'; - $enhancedMeasurementSettings->setSearchQueryParameter($enhancedMeasurementSettingsSearchQueryParameter); - $updateMask = new FieldMask(); - $response = $gapicClient->updateEnhancedMeasurementSettings($enhancedMeasurementSettings, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEnhancedMeasurementSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getEnhancedMeasurementSettings(); - $this->assertProtobufEquals($enhancedMeasurementSettings, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEnhancedMeasurementSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $enhancedMeasurementSettings = new EnhancedMeasurementSettings(); - $enhancedMeasurementSettingsSearchQueryParameter = 'enhancedMeasurementSettingsSearchQueryParameter1139945938'; - $enhancedMeasurementSettings->setSearchQueryParameter($enhancedMeasurementSettingsSearchQueryParameter); - $updateMask = new FieldMask(); - try { - $gapicClient->updateEnhancedMeasurementSettings($enhancedMeasurementSettings, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEventCreateRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destinationEvent = 'destinationEvent-1300408535'; - $sourceCopyParameters = true; - $expectedResponse = new EventCreateRule(); - $expectedResponse->setName($name); - $expectedResponse->setDestinationEvent($destinationEvent); - $expectedResponse->setSourceCopyParameters($sourceCopyParameters); - $transport->addResponse($expectedResponse); - // Mock request - $eventCreateRule = new EventCreateRule(); - $eventCreateRuleDestinationEvent = 'eventCreateRuleDestinationEvent598875038'; - $eventCreateRule->setDestinationEvent($eventCreateRuleDestinationEvent); - $eventCreateRuleEventConditions = []; - $eventCreateRule->setEventConditions($eventCreateRuleEventConditions); - $updateMask = new FieldMask(); - $response = $gapicClient->updateEventCreateRule($eventCreateRule, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEventCreateRule', $actualFuncCall); - $actualValue = $actualRequestObject->getEventCreateRule(); - $this->assertProtobufEquals($eventCreateRule, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEventCreateRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $eventCreateRule = new EventCreateRule(); - $eventCreateRuleDestinationEvent = 'eventCreateRuleDestinationEvent598875038'; - $eventCreateRule->setDestinationEvent($eventCreateRuleDestinationEvent); - $eventCreateRuleEventConditions = []; - $eventCreateRule->setEventConditions($eventCreateRuleEventConditions); - $updateMask = new FieldMask(); - try { - $gapicClient->updateEventCreateRule($eventCreateRule, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEventEditRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $processingOrder = 334545118; - $expectedResponse = new EventEditRule(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setProcessingOrder($processingOrder); - $transport->addResponse($expectedResponse); - // Mock request - $eventEditRule = new EventEditRule(); - $eventEditRuleDisplayName = 'eventEditRuleDisplayName160444781'; - $eventEditRule->setDisplayName($eventEditRuleDisplayName); - $eventEditRuleEventConditions = []; - $eventEditRule->setEventConditions($eventEditRuleEventConditions); - $eventEditRuleParameterMutations = []; - $eventEditRule->setParameterMutations($eventEditRuleParameterMutations); - $updateMask = new FieldMask(); - $response = $gapicClient->updateEventEditRule($eventEditRule, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEventEditRule', $actualFuncCall); - $actualValue = $actualRequestObject->getEventEditRule(); - $this->assertProtobufEquals($eventEditRule, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEventEditRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $eventEditRule = new EventEditRule(); - $eventEditRuleDisplayName = 'eventEditRuleDisplayName160444781'; - $eventEditRule->setDisplayName($eventEditRuleDisplayName); - $eventEditRuleEventConditions = []; - $eventEditRule->setEventConditions($eventEditRuleEventConditions); - $eventEditRuleParameterMutations = []; - $eventEditRule->setParameterMutations($eventEditRuleParameterMutations); - $updateMask = new FieldMask(); - try { - $gapicClient->updateEventEditRule($eventEditRule, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExpandedDataSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new ExpandedDataSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $expandedDataSet = new ExpandedDataSet(); - $expandedDataSetDisplayName = 'expandedDataSetDisplayName629188494'; - $expandedDataSet->setDisplayName($expandedDataSetDisplayName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateExpandedDataSet($expandedDataSet, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateExpandedDataSet', $actualFuncCall); - $actualValue = $actualRequestObject->getExpandedDataSet(); - $this->assertProtobufEquals($expandedDataSet, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExpandedDataSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $expandedDataSet = new ExpandedDataSet(); - $expandedDataSetDisplayName = 'expandedDataSetDisplayName629188494'; - $expandedDataSet->setDisplayName($expandedDataSetDisplayName); - $updateMask = new FieldMask(); - try { - $gapicClient->updateExpandedDataSet($expandedDataSet, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGoogleAdsLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $customerId = 'customerId-1772061412'; - $canManageClients = false; - $creatorEmailAddress = 'creatorEmailAddress-1491810434'; - $expectedResponse = new GoogleAdsLink(); - $expectedResponse->setName($name); - $expectedResponse->setCustomerId($customerId); - $expectedResponse->setCanManageClients($canManageClients); - $expectedResponse->setCreatorEmailAddress($creatorEmailAddress); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateGoogleAdsLink($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleAdsLink', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGoogleAdsLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateGoogleAdsLink($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGoogleSignalsSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new GoogleSignalsSettings(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $googleSignalsSettings = new GoogleSignalsSettings(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateGoogleSignalsSettings($googleSignalsSettings, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleSignalsSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getGoogleSignalsSettings(); - $this->assertProtobufEquals($googleSignalsSettings, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGoogleSignalsSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $googleSignalsSettings = new GoogleSignalsSettings(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateGoogleSignalsSettings($googleSignalsSettings, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateKeyEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new KeyEvent(); - $expectedResponse->setName($name); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $keyEvent = new KeyEvent(); - $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; - $keyEvent->setCountingMethod($keyEventCountingMethod); - $updateMask = new FieldMask(); - $response = $gapicClient->updateKeyEvent($keyEvent, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateKeyEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getKeyEvent(); - $this->assertProtobufEquals($keyEvent, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateKeyEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $keyEvent = new KeyEvent(); - $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; - $keyEvent->setCountingMethod($keyEventCountingMethod); - $updateMask = new FieldMask(); - try { - $gapicClient->updateKeyEvent($keyEvent, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateMeasurementProtocolSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $secretValue = 'secretValue1322942242'; - $expectedResponse = new MeasurementProtocolSecret(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSecretValue($secretValue); - $transport->addResponse($expectedResponse); - // Mock request - $measurementProtocolSecret = new MeasurementProtocolSecret(); - $measurementProtocolSecretDisplayName = 'measurementProtocolSecretDisplayName1279116681'; - $measurementProtocolSecret->setDisplayName($measurementProtocolSecretDisplayName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateMeasurementProtocolSecret($measurementProtocolSecret, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateMeasurementProtocolSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getMeasurementProtocolSecret(); - $this->assertProtobufEquals($measurementProtocolSecret, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateMeasurementProtocolSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $measurementProtocolSecret = new MeasurementProtocolSecret(); - $measurementProtocolSecretDisplayName = 'measurementProtocolSecretDisplayName1279116681'; - $measurementProtocolSecret->setDisplayName($measurementProtocolSecretDisplayName); - $updateMask = new FieldMask(); - try { - $gapicClient->updateMeasurementProtocolSecret($measurementProtocolSecret, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $timeZone = 'timeZone36848094'; - $currencyCode = 'currencyCode1108728155'; - $account = 'account-1177318867'; - $expectedResponse = new Property(); - $expectedResponse->setName($name); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setCurrencyCode($currencyCode); - $expectedResponse->setAccount($account); - $transport->addResponse($expectedResponse); - // Mock request - $property = new Property(); - $propertyDisplayName = 'propertyDisplayName-1254483624'; - $property->setDisplayName($propertyDisplayName); - $propertyTimeZone = 'propertyTimeZone-1600366322'; - $property->setTimeZone($propertyTimeZone); - $updateMask = new FieldMask(); - $response = $gapicClient->updateProperty($property, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateProperty', $actualFuncCall); - $actualValue = $actualRequestObject->getProperty(); - $this->assertProtobufEquals($property, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $property = new Property(); - $propertyDisplayName = 'propertyDisplayName-1254483624'; - $property->setDisplayName($propertyDisplayName); - $propertyTimeZone = 'propertyTimeZone-1600366322'; - $property->setTimeZone($propertyTimeZone); - $updateMask = new FieldMask(); - try { - $gapicClient->updateProperty($property, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSKAdNetworkConversionValueSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $applyConversionValues = true; - $expectedResponse = new SKAdNetworkConversionValueSchema(); - $expectedResponse->setName($name); - $expectedResponse->setApplyConversionValues($applyConversionValues); - $transport->addResponse($expectedResponse); - // Mock request - $skadnetworkConversionValueSchema = new SKAdNetworkConversionValueSchema(); - $skadnetworkConversionValueSchemaPostbackWindowOne = new PostbackWindow(); - $skadnetworkConversionValueSchema->setPostbackWindowOne($skadnetworkConversionValueSchemaPostbackWindowOne); - $updateMask = new FieldMask(); - $response = $gapicClient->updateSKAdNetworkConversionValueSchema($skadnetworkConversionValueSchema, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSKAdNetworkConversionValueSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getSkadnetworkConversionValueSchema(); - $this->assertProtobufEquals($skadnetworkConversionValueSchema, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSKAdNetworkConversionValueSchemaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $skadnetworkConversionValueSchema = new SKAdNetworkConversionValueSchema(); - $skadnetworkConversionValueSchemaPostbackWindowOne = new PostbackWindow(); - $skadnetworkConversionValueSchema->setPostbackWindowOne($skadnetworkConversionValueSchemaPostbackWindowOne); - $updateMask = new FieldMask(); - try { - $gapicClient->updateSKAdNetworkConversionValueSchema($skadnetworkConversionValueSchema, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSearchAds360LinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $advertiserId = 'advertiserId-127926097'; - $advertiserDisplayName = 'advertiserDisplayName-674771332'; - $expectedResponse = new SearchAds360Link(); - $expectedResponse->setName($name); - $expectedResponse->setAdvertiserId($advertiserId); - $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateSearchAds360Link($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSearchAds360Link', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSearchAds360LinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateSearchAds360Link($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSubpropertyEventFilterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $applyToProperty = 'applyToProperty-1639692344'; - $expectedResponse = new SubpropertyEventFilter(); - $expectedResponse->setName($name); - $expectedResponse->setApplyToProperty($applyToProperty); - $transport->addResponse($expectedResponse); - // Mock request - $subpropertyEventFilter = new SubpropertyEventFilter(); - $subpropertyEventFilterFilterClauses = []; - $subpropertyEventFilter->setFilterClauses($subpropertyEventFilterFilterClauses); - $updateMask = new FieldMask(); - $response = $gapicClient->updateSubpropertyEventFilter($subpropertyEventFilter, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSubpropertyEventFilter', $actualFuncCall); - $actualValue = $actualRequestObject->getSubpropertyEventFilter(); - $this->assertProtobufEquals($subpropertyEventFilter, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSubpropertyEventFilterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $subpropertyEventFilter = new SubpropertyEventFilter(); - $subpropertyEventFilterFilterClauses = []; - $subpropertyEventFilter->setFilterClauses($subpropertyEventFilterFilterClauses); - $updateMask = new FieldMask(); - try { - $gapicClient->updateSubpropertyEventFilter($subpropertyEventFilter, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/AnalyticsAdmin/tests/Unit/V1alpha/Client/AnalyticsAdminServiceClientTest.php b/AnalyticsAdmin/tests/Unit/V1alpha/Client/AnalyticsAdminServiceClientTest.php index a9fd25499f65..47c8ab4ad3e3 100644 --- a/AnalyticsAdmin/tests/Unit/V1alpha/Client/AnalyticsAdminServiceClientTest.php +++ b/AnalyticsAdmin/tests/Unit/V1alpha/Client/AnalyticsAdminServiceClientTest.php @@ -285,7 +285,9 @@ private function createTransport($deserialize = null) /** @return CredentialsWrapper */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return AnalyticsAdminServiceClient */ @@ -320,7 +322,10 @@ public function acknowledgeUserDataCollectionTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection', + $actualFuncCall + ); $actualValue = $actualRequestObject->getProperty(); $this->assertProtobufEquals($formattedProperty, $actualValue); $actualValue = $actualRequestObject->getAcknowledgement(); @@ -339,12 +344,15 @@ public function acknowledgeUserDataCollectionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); @@ -377,16 +385,21 @@ public function approveDisplayVideo360AdvertiserLinkProposalTest() $expectedResponse = new ApproveDisplayVideo360AdvertiserLinkProposalResponse(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $request = (new ApproveDisplayVideo360AdvertiserLinkProposalRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]' + ); + $request = (new ApproveDisplayVideo360AdvertiserLinkProposalRequest())->setName($formattedName); $response = $gapicClient->approveDisplayVideo360AdvertiserLinkProposal($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ApproveDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ApproveDisplayVideo360AdvertiserLinkProposal', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -403,17 +416,22 @@ public function approveDisplayVideo360AdvertiserLinkProposalExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $request = (new ApproveDisplayVideo360AdvertiserLinkProposalRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]' + ); + $request = (new ApproveDisplayVideo360AdvertiserLinkProposalRequest())->setName($formattedName); try { $gapicClient->approveDisplayVideo360AdvertiserLinkProposal($request); // If the $gapicClient method call did not throw, fail the test @@ -440,8 +458,7 @@ public function archiveAudienceTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ArchiveAudienceRequest()) - ->setName($formattedName); + $request = (new ArchiveAudienceRequest())->setName($formattedName); $gapicClient->archiveAudience($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -464,17 +481,19 @@ public function archiveAudienceExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ArchiveAudienceRequest()) - ->setName($formattedName); + $request = (new ArchiveAudienceRequest())->setName($formattedName); try { $gapicClient->archiveAudience($request); // If the $gapicClient method call did not throw, fail the test @@ -501,14 +520,16 @@ public function archiveCustomDimensionTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $request = (new ArchiveCustomDimensionRequest()) - ->setName($formattedName); + $request = (new ArchiveCustomDimensionRequest())->setName($formattedName); $gapicClient->archiveCustomDimension($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomDimension', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomDimension', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -525,17 +546,19 @@ public function archiveCustomDimensionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $request = (new ArchiveCustomDimensionRequest()) - ->setName($formattedName); + $request = (new ArchiveCustomDimensionRequest())->setName($formattedName); try { $gapicClient->archiveCustomDimension($request); // If the $gapicClient method call did not throw, fail the test @@ -562,8 +585,7 @@ public function archiveCustomMetricTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $request = (new ArchiveCustomMetricRequest()) - ->setName($formattedName); + $request = (new ArchiveCustomMetricRequest())->setName($formattedName); $gapicClient->archiveCustomMetric($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -586,17 +608,19 @@ public function archiveCustomMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $request = (new ArchiveCustomMetricRequest()) - ->setName($formattedName); + $request = (new ArchiveCustomMetricRequest())->setName($formattedName); try { $gapicClient->archiveCustomMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -624,16 +648,17 @@ public function batchCreateAccessBindingsTest() // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); $requests = []; - $request = (new BatchCreateAccessBindingsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BatchCreateAccessBindingsRequest())->setParent($formattedParent)->setRequests($requests); $response = $gapicClient->batchCreateAccessBindings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateAccessBindings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateAccessBindings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getRequests(); @@ -652,19 +677,20 @@ public function batchCreateAccessBindingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); $requests = []; - $request = (new BatchCreateAccessBindingsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BatchCreateAccessBindingsRequest())->setParent($formattedParent)->setRequests($requests); try { $gapicClient->batchCreateAccessBindings($request); // If the $gapicClient method call did not throw, fail the test @@ -692,15 +718,16 @@ public function batchDeleteAccessBindingsTest() // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); $requests = []; - $request = (new BatchDeleteAccessBindingsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BatchDeleteAccessBindingsRequest())->setParent($formattedParent)->setRequests($requests); $gapicClient->batchDeleteAccessBindings($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteAccessBindings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteAccessBindings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getRequests(); @@ -719,19 +746,20 @@ public function batchDeleteAccessBindingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); $requests = []; - $request = (new BatchDeleteAccessBindingsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BatchDeleteAccessBindingsRequest())->setParent($formattedParent)->setRequests($requests); try { $gapicClient->batchDeleteAccessBindings($request); // If the $gapicClient method call did not throw, fail the test @@ -758,19 +786,18 @@ public function batchGetAccessBindingsTest() $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $formattedNames = [ - $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'), - ]; - $request = (new BatchGetAccessBindingsRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); + $formattedNames = [$gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]')]; + $request = (new BatchGetAccessBindingsRequest())->setParent($formattedParent)->setNames($formattedNames); $response = $gapicClient->batchGetAccessBindings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetAccessBindings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetAccessBindings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getNames(); @@ -789,21 +816,20 @@ public function batchGetAccessBindingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $formattedNames = [ - $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'), - ]; - $request = (new BatchGetAccessBindingsRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); + $formattedNames = [$gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]')]; + $request = (new BatchGetAccessBindingsRequest())->setParent($formattedParent)->setNames($formattedNames); try { $gapicClient->batchGetAccessBindings($request); // If the $gapicClient method call did not throw, fail the test @@ -831,16 +857,17 @@ public function batchUpdateAccessBindingsTest() // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); $requests = []; - $request = (new BatchUpdateAccessBindingsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BatchUpdateAccessBindingsRequest())->setParent($formattedParent)->setRequests($requests); $response = $gapicClient->batchUpdateAccessBindings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateAccessBindings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateAccessBindings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getRequests(); @@ -859,19 +886,20 @@ public function batchUpdateAccessBindingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); $requests = []; - $request = (new BatchUpdateAccessBindingsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); + $request = (new BatchUpdateAccessBindingsRequest())->setParent($formattedParent)->setRequests($requests); try { $gapicClient->batchUpdateAccessBindings($request); // If the $gapicClient method call did not throw, fail the test @@ -905,16 +933,21 @@ public function cancelDisplayVideo360AdvertiserLinkProposalTest() $expectedResponse->setValidationEmail($validationEmail); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $request = (new CancelDisplayVideo360AdvertiserLinkProposalRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]' + ); + $request = (new CancelDisplayVideo360AdvertiserLinkProposalRequest())->setName($formattedName); $response = $gapicClient->cancelDisplayVideo360AdvertiserLinkProposal($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CancelDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CancelDisplayVideo360AdvertiserLinkProposal', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -931,17 +964,22 @@ public function cancelDisplayVideo360AdvertiserLinkProposalExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $request = (new CancelDisplayVideo360AdvertiserLinkProposalRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]' + ); + $request = (new CancelDisplayVideo360AdvertiserLinkProposalRequest())->setName($formattedName); try { $gapicClient->cancelDisplayVideo360AdvertiserLinkProposal($request); // If the $gapicClient method call did not throw, fail the test @@ -973,9 +1011,7 @@ public function createAccessBindingTest() // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); $accessBinding = new AccessBinding(); - $request = (new CreateAccessBindingRequest()) - ->setParent($formattedParent) - ->setAccessBinding($accessBinding); + $request = (new CreateAccessBindingRequest())->setParent($formattedParent)->setAccessBinding($accessBinding); $response = $gapicClient->createAccessBinding($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1001,19 +1037,20 @@ public function createAccessBindingExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); $accessBinding = new AccessBinding(); - $request = (new CreateAccessBindingRequest()) - ->setParent($formattedParent) - ->setAccessBinding($accessBinding); + $request = (new CreateAccessBindingRequest())->setParent($formattedParent)->setAccessBinding($accessBinding); try { $gapicClient->createAccessBinding($request); // If the $gapicClient method call did not throw, fail the test @@ -1045,9 +1082,7 @@ public function createAdSenseLinkTest() // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $adsenseLink = new AdSenseLink(); - $request = (new CreateAdSenseLinkRequest()) - ->setParent($formattedParent) - ->setAdsenseLink($adsenseLink); + $request = (new CreateAdSenseLinkRequest())->setParent($formattedParent)->setAdsenseLink($adsenseLink); $response = $gapicClient->createAdSenseLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1073,19 +1108,20 @@ public function createAdSenseLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $adsenseLink = new AdSenseLink(); - $request = (new CreateAdSenseLinkRequest()) - ->setParent($formattedParent) - ->setAdsenseLink($adsenseLink); + $request = (new CreateAdSenseLinkRequest())->setParent($formattedParent)->setAdsenseLink($adsenseLink); try { $gapicClient->createAdSenseLink($request); // If the $gapicClient method call did not throw, fail the test @@ -1131,9 +1167,7 @@ public function createAudienceTest() $audience->setMembershipDurationDays($audienceMembershipDurationDays); $audienceFilterClauses = []; $audience->setFilterClauses($audienceFilterClauses); - $request = (new CreateAudienceRequest()) - ->setParent($formattedParent) - ->setAudience($audience); + $request = (new CreateAudienceRequest())->setParent($formattedParent)->setAudience($audience); $response = $gapicClient->createAudience($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1159,12 +1193,15 @@ public function createAudienceExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -1177,9 +1214,7 @@ public function createAudienceExceptionTest() $audience->setMembershipDurationDays($audienceMembershipDurationDays); $audienceFilterClauses = []; $audience->setFilterClauses($audienceFilterClauses); - $request = (new CreateAudienceRequest()) - ->setParent($formattedParent) - ->setAudience($audience); + $request = (new CreateAudienceRequest())->setParent($formattedParent)->setAudience($audience); try { $gapicClient->createAudience($request); // If the $gapicClient method call did not throw, fail the test @@ -1223,9 +1258,7 @@ public function createBigQueryLinkTest() $bigqueryLink = new BigQueryLink(); $bigqueryLinkDatasetLocation = 'bigqueryLinkDatasetLocation714488843'; $bigqueryLink->setDatasetLocation($bigqueryLinkDatasetLocation); - $request = (new CreateBigQueryLinkRequest()) - ->setParent($formattedParent) - ->setBigqueryLink($bigqueryLink); + $request = (new CreateBigQueryLinkRequest())->setParent($formattedParent)->setBigqueryLink($bigqueryLink); $response = $gapicClient->createBigQueryLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1251,21 +1284,22 @@ public function createBigQueryLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $bigqueryLink = new BigQueryLink(); $bigqueryLinkDatasetLocation = 'bigqueryLinkDatasetLocation714488843'; $bigqueryLink->setDatasetLocation($bigqueryLinkDatasetLocation); - $request = (new CreateBigQueryLinkRequest()) - ->setParent($formattedParent) - ->setBigqueryLink($bigqueryLink); + $request = (new CreateBigQueryLinkRequest())->setParent($formattedParent)->setBigqueryLink($bigqueryLink); try { $gapicClient->createBigQueryLink($request); // If the $gapicClient method call did not throw, fail the test @@ -1322,7 +1356,10 @@ public function createCalculatedMetricTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCalculatedMetric', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCalculatedMetric', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getCalculatedMetricId(); @@ -1343,12 +1380,15 @@ public function createCalculatedMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -1405,9 +1445,7 @@ public function createChannelGroupTest() $channelGroup->setDisplayName($channelGroupDisplayName); $channelGroupGroupingRule = []; $channelGroup->setGroupingRule($channelGroupGroupingRule); - $request = (new CreateChannelGroupRequest()) - ->setParent($formattedParent) - ->setChannelGroup($channelGroup); + $request = (new CreateChannelGroupRequest())->setParent($formattedParent)->setChannelGroup($channelGroup); $response = $gapicClient->createChannelGroup($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1433,12 +1471,15 @@ public function createChannelGroupExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -1447,9 +1488,7 @@ public function createChannelGroupExceptionTest() $channelGroup->setDisplayName($channelGroupDisplayName); $channelGroupGroupingRule = []; $channelGroup->setGroupingRule($channelGroupGroupingRule); - $request = (new CreateChannelGroupRequest()) - ->setParent($formattedParent) - ->setChannelGroup($channelGroup); + $request = (new CreateChannelGroupRequest())->setParent($formattedParent)->setChannelGroup($channelGroup); try { $gapicClient->createChannelGroup($request); // If the $gapicClient method call did not throw, fail the test @@ -1480,15 +1519,17 @@ public function createConnectedSiteTagTest() $connectedSiteTag->setDisplayName($connectedSiteTagDisplayName); $connectedSiteTagTagId = 'connectedSiteTagTagId-937600789'; $connectedSiteTag->setTagId($connectedSiteTagTagId); - $request = (new CreateConnectedSiteTagRequest()) - ->setConnectedSiteTag($connectedSiteTag); + $request = (new CreateConnectedSiteTagRequest())->setConnectedSiteTag($connectedSiteTag); $response = $gapicClient->createConnectedSiteTag($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConnectedSiteTag', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConnectedSiteTag', + $actualFuncCall + ); $actualValue = $actualRequestObject->getConnectedSiteTag(); $this->assertProtobufEquals($connectedSiteTag, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -1505,12 +1546,15 @@ public function createConnectedSiteTagExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $connectedSiteTag = new ConnectedSiteTag(); @@ -1518,8 +1562,7 @@ public function createConnectedSiteTagExceptionTest() $connectedSiteTag->setDisplayName($connectedSiteTagDisplayName); $connectedSiteTagTagId = 'connectedSiteTagTagId-937600789'; $connectedSiteTag->setTagId($connectedSiteTagTagId); - $request = (new CreateConnectedSiteTagRequest()) - ->setConnectedSiteTag($connectedSiteTag); + $request = (new CreateConnectedSiteTagRequest())->setConnectedSiteTag($connectedSiteTag); try { $gapicClient->createConnectedSiteTag($request); // If the $gapicClient method call did not throw, fail the test @@ -1564,7 +1607,10 @@ public function createConversionEventTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConversionEvent', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConversionEvent', + $actualFuncCall + ); $actualValue = $actualRequestObject->getConversionEvent(); $this->assertProtobufEquals($conversionEvent, $actualValue); $actualValue = $actualRequestObject->getParent(); @@ -1583,12 +1629,15 @@ public function createConversionEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $conversionEvent = new ConversionEvent(); @@ -1648,7 +1697,10 @@ public function createCustomDimensionTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomDimension', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomDimension', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getCustomDimension(); @@ -1667,12 +1719,15 @@ public function createCustomDimensionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -1729,9 +1784,7 @@ public function createCustomMetricTest() $customMetric->setMeasurementUnit($customMetricMeasurementUnit); $customMetricScope = MetricScope::METRIC_SCOPE_UNSPECIFIED; $customMetric->setScope($customMetricScope); - $request = (new CreateCustomMetricRequest()) - ->setParent($formattedParent) - ->setCustomMetric($customMetric); + $request = (new CreateCustomMetricRequest())->setParent($formattedParent)->setCustomMetric($customMetric); $response = $gapicClient->createCustomMetric($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1757,12 +1810,15 @@ public function createCustomMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -1775,9 +1831,7 @@ public function createCustomMetricExceptionTest() $customMetric->setMeasurementUnit($customMetricMeasurementUnit); $customMetricScope = MetricScope::METRIC_SCOPE_UNSPECIFIED; $customMetric->setScope($customMetricScope); - $request = (new CreateCustomMetricRequest()) - ->setParent($formattedParent) - ->setCustomMetric($customMetric); + $request = (new CreateCustomMetricRequest())->setParent($formattedParent)->setCustomMetric($customMetric); try { $gapicClient->createCustomMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -1811,9 +1865,7 @@ public function createDataStreamTest() $dataStream = new DataStream(); $dataStreamType = DataStreamType::DATA_STREAM_TYPE_UNSPECIFIED; $dataStream->setType($dataStreamType); - $request = (new CreateDataStreamRequest()) - ->setParent($formattedParent) - ->setDataStream($dataStream); + $request = (new CreateDataStreamRequest())->setParent($formattedParent)->setDataStream($dataStream); $response = $gapicClient->createDataStream($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1839,21 +1891,22 @@ public function createDataStreamExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $dataStream = new DataStream(); $dataStreamType = DataStreamType::DATA_STREAM_TYPE_UNSPECIFIED; $dataStream->setType($dataStreamType); - $request = (new CreateDataStreamRequest()) - ->setParent($formattedParent) - ->setDataStream($dataStream); + $request = (new CreateDataStreamRequest())->setParent($formattedParent)->setDataStream($dataStream); try { $gapicClient->createDataStream($request); // If the $gapicClient method call did not throw, fail the test @@ -1896,7 +1949,10 @@ public function createDisplayVideo360AdvertiserLinkTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLink', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLink', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getDisplayVideo360AdvertiserLink(); @@ -1915,12 +1971,15 @@ public function createDisplayVideo360AdvertiserLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -1972,7 +2031,10 @@ public function createDisplayVideo360AdvertiserLinkProposalTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLinkProposal', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getDisplayVideo360AdvertiserLinkProposal(); @@ -1991,12 +2053,15 @@ public function createDisplayVideo360AdvertiserLinkProposalExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -2050,7 +2115,10 @@ public function createEventCreateRuleTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateEventCreateRule', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateEventCreateRule', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getEventCreateRule(); @@ -2069,12 +2137,15 @@ public function createEventCreateRuleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); @@ -2125,9 +2196,7 @@ public function createEventEditRuleTest() $eventEditRule->setEventConditions($eventEditRuleEventConditions); $eventEditRuleParameterMutations = []; $eventEditRule->setParameterMutations($eventEditRuleParameterMutations); - $request = (new CreateEventEditRuleRequest()) - ->setParent($formattedParent) - ->setEventEditRule($eventEditRule); + $request = (new CreateEventEditRuleRequest())->setParent($formattedParent)->setEventEditRule($eventEditRule); $response = $gapicClient->createEventEditRule($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2153,12 +2222,15 @@ public function createEventEditRuleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); @@ -2169,9 +2241,7 @@ public function createEventEditRuleExceptionTest() $eventEditRule->setEventConditions($eventEditRuleEventConditions); $eventEditRuleParameterMutations = []; $eventEditRule->setParameterMutations($eventEditRuleParameterMutations); - $request = (new CreateEventEditRuleRequest()) - ->setParent($formattedParent) - ->setEventEditRule($eventEditRule); + $request = (new CreateEventEditRuleRequest())->setParent($formattedParent)->setEventEditRule($eventEditRule); try { $gapicClient->createEventEditRule($request); // If the $gapicClient method call did not throw, fail the test @@ -2216,7 +2286,10 @@ public function createExpandedDataSetTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateExpandedDataSet', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateExpandedDataSet', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getExpandedDataSet(); @@ -2235,12 +2308,15 @@ public function createExpandedDataSetExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -2281,9 +2357,7 @@ public function createFirebaseLinkTest() // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $firebaseLink = new FirebaseLink(); - $request = (new CreateFirebaseLinkRequest()) - ->setParent($formattedParent) - ->setFirebaseLink($firebaseLink); + $request = (new CreateFirebaseLinkRequest())->setParent($formattedParent)->setFirebaseLink($firebaseLink); $response = $gapicClient->createFirebaseLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2309,19 +2383,20 @@ public function createFirebaseLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $firebaseLink = new FirebaseLink(); - $request = (new CreateFirebaseLinkRequest()) - ->setParent($formattedParent) - ->setFirebaseLink($firebaseLink); + $request = (new CreateFirebaseLinkRequest())->setParent($formattedParent)->setFirebaseLink($firebaseLink); try { $gapicClient->createFirebaseLink($request); // If the $gapicClient method call did not throw, fail the test @@ -2357,9 +2432,7 @@ public function createGoogleAdsLinkTest() // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $googleAdsLink = new GoogleAdsLink(); - $request = (new CreateGoogleAdsLinkRequest()) - ->setParent($formattedParent) - ->setGoogleAdsLink($googleAdsLink); + $request = (new CreateGoogleAdsLinkRequest())->setParent($formattedParent)->setGoogleAdsLink($googleAdsLink); $response = $gapicClient->createGoogleAdsLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2385,19 +2458,20 @@ public function createGoogleAdsLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $googleAdsLink = new GoogleAdsLink(); - $request = (new CreateGoogleAdsLinkRequest()) - ->setParent($formattedParent) - ->setGoogleAdsLink($googleAdsLink); + $request = (new CreateGoogleAdsLinkRequest())->setParent($formattedParent)->setGoogleAdsLink($googleAdsLink); try { $gapicClient->createGoogleAdsLink($request); // If the $gapicClient method call did not throw, fail the test @@ -2435,9 +2509,7 @@ public function createKeyEventTest() $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; $keyEvent->setCountingMethod($keyEventCountingMethod); $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new CreateKeyEventRequest()) - ->setKeyEvent($keyEvent) - ->setParent($formattedParent); + $request = (new CreateKeyEventRequest())->setKeyEvent($keyEvent)->setParent($formattedParent); $response = $gapicClient->createKeyEvent($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2463,21 +2535,22 @@ public function createKeyEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $keyEvent = new KeyEvent(); $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; $keyEvent->setCountingMethod($keyEventCountingMethod); $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new CreateKeyEventRequest()) - ->setKeyEvent($keyEvent) - ->setParent($formattedParent); + $request = (new CreateKeyEventRequest())->setKeyEvent($keyEvent)->setParent($formattedParent); try { $gapicClient->createKeyEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -2522,7 +2595,10 @@ public function createMeasurementProtocolSecretTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateMeasurementProtocolSecret', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateMeasurementProtocolSecret', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getMeasurementProtocolSecret(); @@ -2541,12 +2617,15 @@ public function createMeasurementProtocolSecretExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); @@ -2598,8 +2677,7 @@ public function createPropertyTest() $property->setDisplayName($propertyDisplayName); $propertyTimeZone = 'propertyTimeZone-1600366322'; $property->setTimeZone($propertyTimeZone); - $request = (new CreatePropertyRequest()) - ->setProperty($property); + $request = (new CreatePropertyRequest())->setProperty($property); $response = $gapicClient->createProperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2623,12 +2701,15 @@ public function createPropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $property = new Property(); @@ -2636,8 +2717,7 @@ public function createPropertyExceptionTest() $property->setDisplayName($propertyDisplayName); $propertyTimeZone = 'propertyTimeZone-1600366322'; $property->setTimeZone($propertyTimeZone); - $request = (new CreatePropertyRequest()) - ->setProperty($property); + $request = (new CreatePropertyRequest())->setProperty($property); try { $gapicClient->createProperty($request); // If the $gapicClient method call did not throw, fail the test @@ -2668,15 +2748,17 @@ public function createRollupPropertyTest() $rollupProperty->setDisplayName($rollupPropertyDisplayName); $rollupPropertyTimeZone = 'rollupPropertyTimeZone1768247558'; $rollupProperty->setTimeZone($rollupPropertyTimeZone); - $request = (new CreateRollupPropertyRequest()) - ->setRollupProperty($rollupProperty); + $request = (new CreateRollupPropertyRequest())->setRollupProperty($rollupProperty); $response = $gapicClient->createRollupProperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupProperty', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupProperty', + $actualFuncCall + ); $actualValue = $actualRequestObject->getRollupProperty(); $this->assertProtobufEquals($rollupProperty, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -2693,12 +2775,15 @@ public function createRollupPropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $rollupProperty = new Property(); @@ -2706,8 +2791,7 @@ public function createRollupPropertyExceptionTest() $rollupProperty->setDisplayName($rollupPropertyDisplayName); $rollupPropertyTimeZone = 'rollupPropertyTimeZone1768247558'; $rollupProperty->setTimeZone($rollupPropertyTimeZone); - $request = (new CreateRollupPropertyRequest()) - ->setRollupProperty($rollupProperty); + $request = (new CreateRollupPropertyRequest())->setRollupProperty($rollupProperty); try { $gapicClient->createRollupProperty($request); // If the $gapicClient method call did not throw, fail the test @@ -2748,7 +2832,10 @@ public function createRollupPropertySourceLinkTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupPropertySourceLink', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupPropertySourceLink', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getRollupPropertySourceLink(); @@ -2767,12 +2854,15 @@ public function createRollupPropertySourceLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -2822,7 +2912,10 @@ public function createSKAdNetworkConversionValueSchemaTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSKAdNetworkConversionValueSchema', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSKAdNetworkConversionValueSchema', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getSkadnetworkConversionValueSchema(); @@ -2841,12 +2934,15 @@ public function createSKAdNetworkConversionValueSchemaExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); @@ -2898,7 +2994,10 @@ public function createSearchAds360LinkTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSearchAds360Link', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSearchAds360Link', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getSearchAds360Link(); @@ -2917,12 +3016,15 @@ public function createSearchAds360LinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -2972,7 +3074,10 @@ public function createSubpropertyEventFilterTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSubpropertyEventFilter', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSubpropertyEventFilter', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getSubpropertyEventFilter(); @@ -2991,12 +3096,15 @@ public function createSubpropertyEventFilterExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -3032,8 +3140,7 @@ public function deleteAccessBindingTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - $request = (new DeleteAccessBindingRequest()) - ->setName($formattedName); + $request = (new DeleteAccessBindingRequest())->setName($formattedName); $gapicClient->deleteAccessBinding($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -3056,17 +3163,19 @@ public function deleteAccessBindingExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - $request = (new DeleteAccessBindingRequest()) - ->setName($formattedName); + $request = (new DeleteAccessBindingRequest())->setName($formattedName); try { $gapicClient->deleteAccessBinding($request); // If the $gapicClient method call did not throw, fail the test @@ -3093,8 +3202,7 @@ public function deleteAccountTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $request = (new DeleteAccountRequest()) - ->setName($formattedName); + $request = (new DeleteAccountRequest())->setName($formattedName); $gapicClient->deleteAccount($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -3117,17 +3225,19 @@ public function deleteAccountExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $request = (new DeleteAccountRequest()) - ->setName($formattedName); + $request = (new DeleteAccountRequest())->setName($formattedName); try { $gapicClient->deleteAccount($request); // If the $gapicClient method call did not throw, fail the test @@ -3154,8 +3264,7 @@ public function deleteAdSenseLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - $request = (new DeleteAdSenseLinkRequest()) - ->setName($formattedName); + $request = (new DeleteAdSenseLinkRequest())->setName($formattedName); $gapicClient->deleteAdSenseLink($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -3178,17 +3287,19 @@ public function deleteAdSenseLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - $request = (new DeleteAdSenseLinkRequest()) - ->setName($formattedName); + $request = (new DeleteAdSenseLinkRequest())->setName($formattedName); try { $gapicClient->deleteAdSenseLink($request); // If the $gapicClient method call did not throw, fail the test @@ -3215,8 +3326,7 @@ public function deleteBigQueryLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - $request = (new DeleteBigQueryLinkRequest()) - ->setName($formattedName); + $request = (new DeleteBigQueryLinkRequest())->setName($formattedName); $gapicClient->deleteBigQueryLink($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -3239,17 +3349,19 @@ public function deleteBigQueryLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - $request = (new DeleteBigQueryLinkRequest()) - ->setName($formattedName); + $request = (new DeleteBigQueryLinkRequest())->setName($formattedName); try { $gapicClient->deleteBigQueryLink($request); // If the $gapicClient method call did not throw, fail the test @@ -3276,14 +3388,16 @@ public function deleteCalculatedMetricTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - $request = (new DeleteCalculatedMetricRequest()) - ->setName($formattedName); + $request = (new DeleteCalculatedMetricRequest())->setName($formattedName); $gapicClient->deleteCalculatedMetric($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteCalculatedMetric', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteCalculatedMetric', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -3300,17 +3414,19 @@ public function deleteCalculatedMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - $request = (new DeleteCalculatedMetricRequest()) - ->setName($formattedName); + $request = (new DeleteCalculatedMetricRequest())->setName($formattedName); try { $gapicClient->deleteCalculatedMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -3337,8 +3453,7 @@ public function deleteChannelGroupTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - $request = (new DeleteChannelGroupRequest()) - ->setName($formattedName); + $request = (new DeleteChannelGroupRequest())->setName($formattedName); $gapicClient->deleteChannelGroup($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -3361,17 +3476,19 @@ public function deleteChannelGroupExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - $request = (new DeleteChannelGroupRequest()) - ->setName($formattedName); + $request = (new DeleteChannelGroupRequest())->setName($formattedName); try { $gapicClient->deleteChannelGroup($request); // If the $gapicClient method call did not throw, fail the test @@ -3402,7 +3519,10 @@ public function deleteConnectedSiteTagTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConnectedSiteTag', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConnectedSiteTag', + $actualFuncCall + ); $this->assertTrue($transport->isExhausted()); } @@ -3417,12 +3537,15 @@ public function deleteConnectedSiteTagExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new DeleteConnectedSiteTagRequest(); try { @@ -3451,14 +3574,16 @@ public function deleteConversionEventTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $request = (new DeleteConversionEventRequest()) - ->setName($formattedName); + $request = (new DeleteConversionEventRequest())->setName($formattedName); $gapicClient->deleteConversionEvent($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConversionEvent', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConversionEvent', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -3475,17 +3600,19 @@ public function deleteConversionEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $request = (new DeleteConversionEventRequest()) - ->setName($formattedName); + $request = (new DeleteConversionEventRequest())->setName($formattedName); try { $gapicClient->deleteConversionEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -3512,8 +3639,7 @@ public function deleteDataStreamTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new DeleteDataStreamRequest()) - ->setName($formattedName); + $request = (new DeleteDataStreamRequest())->setName($formattedName); $gapicClient->deleteDataStream($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -3536,17 +3662,19 @@ public function deleteDataStreamExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new DeleteDataStreamRequest()) - ->setName($formattedName); + $request = (new DeleteDataStreamRequest())->setName($formattedName); try { $gapicClient->deleteDataStream($request); // If the $gapicClient method call did not throw, fail the test @@ -3572,15 +3700,20 @@ public function deleteDisplayVideo360AdvertiserLinkTest() $expectedResponse = new GPBEmpty(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - $request = (new DeleteDisplayVideo360AdvertiserLinkRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK]' + ); + $request = (new DeleteDisplayVideo360AdvertiserLinkRequest())->setName($formattedName); $gapicClient->deleteDisplayVideo360AdvertiserLink($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLink', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLink', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -3597,17 +3730,22 @@ public function deleteDisplayVideo360AdvertiserLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - $request = (new DeleteDisplayVideo360AdvertiserLinkRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK]' + ); + $request = (new DeleteDisplayVideo360AdvertiserLinkRequest())->setName($formattedName); try { $gapicClient->deleteDisplayVideo360AdvertiserLink($request); // If the $gapicClient method call did not throw, fail the test @@ -3633,15 +3771,20 @@ public function deleteDisplayVideo360AdvertiserLinkProposalTest() $expectedResponse = new GPBEmpty(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $request = (new DeleteDisplayVideo360AdvertiserLinkProposalRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]' + ); + $request = (new DeleteDisplayVideo360AdvertiserLinkProposalRequest())->setName($formattedName); $gapicClient->deleteDisplayVideo360AdvertiserLinkProposal($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLinkProposal', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -3658,17 +3801,22 @@ public function deleteDisplayVideo360AdvertiserLinkProposalExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $request = (new DeleteDisplayVideo360AdvertiserLinkProposalRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]' + ); + $request = (new DeleteDisplayVideo360AdvertiserLinkProposalRequest())->setName($formattedName); try { $gapicClient->deleteDisplayVideo360AdvertiserLinkProposal($request); // If the $gapicClient method call did not throw, fail the test @@ -3695,14 +3843,16 @@ public function deleteEventCreateRuleTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - $request = (new DeleteEventCreateRuleRequest()) - ->setName($formattedName); + $request = (new DeleteEventCreateRuleRequest())->setName($formattedName); $gapicClient->deleteEventCreateRule($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteEventCreateRule', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteEventCreateRule', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -3719,17 +3869,19 @@ public function deleteEventCreateRuleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - $request = (new DeleteEventCreateRuleRequest()) - ->setName($formattedName); + $request = (new DeleteEventCreateRuleRequest())->setName($formattedName); try { $gapicClient->deleteEventCreateRule($request); // If the $gapicClient method call did not throw, fail the test @@ -3756,8 +3908,7 @@ public function deleteEventEditRuleTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - $request = (new DeleteEventEditRuleRequest()) - ->setName($formattedName); + $request = (new DeleteEventEditRuleRequest())->setName($formattedName); $gapicClient->deleteEventEditRule($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -3780,17 +3931,19 @@ public function deleteEventEditRuleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - $request = (new DeleteEventEditRuleRequest()) - ->setName($formattedName); + $request = (new DeleteEventEditRuleRequest())->setName($formattedName); try { $gapicClient->deleteEventEditRule($request); // If the $gapicClient method call did not throw, fail the test @@ -3817,14 +3970,16 @@ public function deleteExpandedDataSetTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - $request = (new DeleteExpandedDataSetRequest()) - ->setName($formattedName); + $request = (new DeleteExpandedDataSetRequest())->setName($formattedName); $gapicClient->deleteExpandedDataSet($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteExpandedDataSet', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteExpandedDataSet', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -3841,17 +3996,19 @@ public function deleteExpandedDataSetExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - $request = (new DeleteExpandedDataSetRequest()) - ->setName($formattedName); + $request = (new DeleteExpandedDataSetRequest())->setName($formattedName); try { $gapicClient->deleteExpandedDataSet($request); // If the $gapicClient method call did not throw, fail the test @@ -3878,8 +4035,7 @@ public function deleteFirebaseLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - $request = (new DeleteFirebaseLinkRequest()) - ->setName($formattedName); + $request = (new DeleteFirebaseLinkRequest())->setName($formattedName); $gapicClient->deleteFirebaseLink($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -3902,17 +4058,19 @@ public function deleteFirebaseLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - $request = (new DeleteFirebaseLinkRequest()) - ->setName($formattedName); + $request = (new DeleteFirebaseLinkRequest())->setName($formattedName); try { $gapicClient->deleteFirebaseLink($request); // If the $gapicClient method call did not throw, fail the test @@ -3939,8 +4097,7 @@ public function deleteGoogleAdsLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - $request = (new DeleteGoogleAdsLinkRequest()) - ->setName($formattedName); + $request = (new DeleteGoogleAdsLinkRequest())->setName($formattedName); $gapicClient->deleteGoogleAdsLink($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -3963,17 +4120,19 @@ public function deleteGoogleAdsLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - $request = (new DeleteGoogleAdsLinkRequest()) - ->setName($formattedName); + $request = (new DeleteGoogleAdsLinkRequest())->setName($formattedName); try { $gapicClient->deleteGoogleAdsLink($request); // If the $gapicClient method call did not throw, fail the test @@ -4000,8 +4159,7 @@ public function deleteKeyEventTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $request = (new DeleteKeyEventRequest()) - ->setName($formattedName); + $request = (new DeleteKeyEventRequest())->setName($formattedName); $gapicClient->deleteKeyEvent($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -4024,17 +4182,19 @@ public function deleteKeyEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $request = (new DeleteKeyEventRequest()) - ->setName($formattedName); + $request = (new DeleteKeyEventRequest())->setName($formattedName); try { $gapicClient->deleteKeyEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -4060,15 +4220,21 @@ public function deleteMeasurementProtocolSecretTest() $expectedResponse = new GPBEmpty(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $request = (new DeleteMeasurementProtocolSecretRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->measurementProtocolSecretName( + '[PROPERTY]', + '[DATA_STREAM]', + '[MEASUREMENT_PROTOCOL_SECRET]' + ); + $request = (new DeleteMeasurementProtocolSecretRequest())->setName($formattedName); $gapicClient->deleteMeasurementProtocolSecret($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteMeasurementProtocolSecret', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteMeasurementProtocolSecret', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -4085,17 +4251,23 @@ public function deleteMeasurementProtocolSecretExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $request = (new DeleteMeasurementProtocolSecretRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->measurementProtocolSecretName( + '[PROPERTY]', + '[DATA_STREAM]', + '[MEASUREMENT_PROTOCOL_SECRET]' + ); + $request = (new DeleteMeasurementProtocolSecretRequest())->setName($formattedName); try { $gapicClient->deleteMeasurementProtocolSecret($request); // If the $gapicClient method call did not throw, fail the test @@ -4134,8 +4306,7 @@ public function deletePropertyTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new DeletePropertyRequest()) - ->setName($formattedName); + $request = (new DeletePropertyRequest())->setName($formattedName); $response = $gapicClient->deleteProperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -4159,17 +4330,19 @@ public function deletePropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new DeletePropertyRequest()) - ->setName($formattedName); + $request = (new DeletePropertyRequest())->setName($formattedName); try { $gapicClient->deleteProperty($request); // If the $gapicClient method call did not throw, fail the test @@ -4196,14 +4369,16 @@ public function deleteRollupPropertySourceLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - $request = (new DeleteRollupPropertySourceLinkRequest()) - ->setName($formattedName); + $request = (new DeleteRollupPropertySourceLinkRequest())->setName($formattedName); $gapicClient->deleteRollupPropertySourceLink($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteRollupPropertySourceLink', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteRollupPropertySourceLink', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -4220,17 +4395,19 @@ public function deleteRollupPropertySourceLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - $request = (new DeleteRollupPropertySourceLinkRequest()) - ->setName($formattedName); + $request = (new DeleteRollupPropertySourceLinkRequest())->setName($formattedName); try { $gapicClient->deleteRollupPropertySourceLink($request); // If the $gapicClient method call did not throw, fail the test @@ -4256,15 +4433,21 @@ public function deleteSKAdNetworkConversionValueSchemaTest() $expectedResponse = new GPBEmpty(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - $request = (new DeleteSKAdNetworkConversionValueSchemaRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName( + '[PROPERTY]', + '[DATA_STREAM]', + '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]' + ); + $request = (new DeleteSKAdNetworkConversionValueSchemaRequest())->setName($formattedName); $gapicClient->deleteSKAdNetworkConversionValueSchema($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSKAdNetworkConversionValueSchema', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSKAdNetworkConversionValueSchema', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -4281,17 +4464,23 @@ public function deleteSKAdNetworkConversionValueSchemaExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - $request = (new DeleteSKAdNetworkConversionValueSchemaRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName( + '[PROPERTY]', + '[DATA_STREAM]', + '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]' + ); + $request = (new DeleteSKAdNetworkConversionValueSchemaRequest())->setName($formattedName); try { $gapicClient->deleteSKAdNetworkConversionValueSchema($request); // If the $gapicClient method call did not throw, fail the test @@ -4318,14 +4507,16 @@ public function deleteSearchAds360LinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - $request = (new DeleteSearchAds360LinkRequest()) - ->setName($formattedName); + $request = (new DeleteSearchAds360LinkRequest())->setName($formattedName); $gapicClient->deleteSearchAds360Link($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSearchAds360Link', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSearchAds360Link', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -4342,17 +4533,19 @@ public function deleteSearchAds360LinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - $request = (new DeleteSearchAds360LinkRequest()) - ->setName($formattedName); + $request = (new DeleteSearchAds360LinkRequest())->setName($formattedName); try { $gapicClient->deleteSearchAds360Link($request); // If the $gapicClient method call did not throw, fail the test @@ -4379,14 +4572,16 @@ public function deleteSubpropertyEventFilterTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - $request = (new DeleteSubpropertyEventFilterRequest()) - ->setName($formattedName); + $request = (new DeleteSubpropertyEventFilterRequest())->setName($formattedName); $gapicClient->deleteSubpropertyEventFilter($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSubpropertyEventFilter', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSubpropertyEventFilter', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -4403,17 +4598,19 @@ public function deleteSubpropertyEventFilterExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - $request = (new DeleteSubpropertyEventFilterRequest()) - ->setName($formattedName); + $request = (new DeleteSubpropertyEventFilterRequest())->setName($formattedName); try { $gapicClient->deleteSubpropertyEventFilter($request); // If the $gapicClient method call did not throw, fail the test @@ -4442,15 +4639,17 @@ public function fetchAutomatedGa4ConfigurationOptOutTest() $transport->addResponse($expectedResponse); // Mock request $property = 'property-993141291'; - $request = (new FetchAutomatedGa4ConfigurationOptOutRequest()) - ->setProperty($property); + $request = (new FetchAutomatedGa4ConfigurationOptOutRequest())->setProperty($property); $response = $gapicClient->fetchAutomatedGa4ConfigurationOptOut($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/FetchAutomatedGa4ConfigurationOptOut', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/FetchAutomatedGa4ConfigurationOptOut', + $actualFuncCall + ); $actualValue = $actualRequestObject->getProperty(); $this->assertProtobufEquals($property, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -4467,17 +4666,19 @@ public function fetchAutomatedGa4ConfigurationOptOutExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $property = 'property-993141291'; - $request = (new FetchAutomatedGa4ConfigurationOptOutRequest()) - ->setProperty($property); + $request = (new FetchAutomatedGa4ConfigurationOptOutRequest())->setProperty($property); try { $gapicClient->fetchAutomatedGa4ConfigurationOptOut($request); // If the $gapicClient method call did not throw, fail the test @@ -4506,15 +4707,17 @@ public function fetchConnectedGa4PropertyTest() $transport->addResponse($expectedResponse); // Mock request $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); - $request = (new FetchConnectedGa4PropertyRequest()) - ->setProperty($formattedProperty); + $request = (new FetchConnectedGa4PropertyRequest())->setProperty($formattedProperty); $response = $gapicClient->fetchConnectedGa4Property($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/FetchConnectedGa4Property', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/FetchConnectedGa4Property', + $actualFuncCall + ); $actualValue = $actualRequestObject->getProperty(); $this->assertProtobufEquals($formattedProperty, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -4531,17 +4734,19 @@ public function fetchConnectedGa4PropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); - $request = (new FetchConnectedGa4PropertyRequest()) - ->setProperty($formattedProperty); + $request = (new FetchConnectedGa4PropertyRequest())->setProperty($formattedProperty); try { $gapicClient->fetchConnectedGa4Property($request); // If the $gapicClient method call did not throw, fail the test @@ -4572,8 +4777,7 @@ public function getAccessBindingTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - $request = (new GetAccessBindingRequest()) - ->setName($formattedName); + $request = (new GetAccessBindingRequest())->setName($formattedName); $response = $gapicClient->getAccessBinding($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -4597,17 +4801,19 @@ public function getAccessBindingExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->accessBindingName('[ACCOUNT]', '[ACCESS_BINDING]'); - $request = (new GetAccessBindingRequest()) - ->setName($formattedName); + $request = (new GetAccessBindingRequest())->setName($formattedName); try { $gapicClient->getAccessBinding($request); // If the $gapicClient method call did not throw, fail the test @@ -4644,8 +4850,7 @@ public function getAccountTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $request = (new GetAccountRequest()) - ->setName($formattedName); + $request = (new GetAccountRequest())->setName($formattedName); $response = $gapicClient->getAccount($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -4669,17 +4874,19 @@ public function getAccountExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $request = (new GetAccountRequest()) - ->setName($formattedName); + $request = (new GetAccountRequest())->setName($formattedName); try { $gapicClient->getAccount($request); // If the $gapicClient method call did not throw, fail the test @@ -4710,8 +4917,7 @@ public function getAdSenseLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - $request = (new GetAdSenseLinkRequest()) - ->setName($formattedName); + $request = (new GetAdSenseLinkRequest())->setName($formattedName); $response = $gapicClient->getAdSenseLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -4735,17 +4941,19 @@ public function getAdSenseLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->adSenseLinkName('[PROPERTY]', '[ADSENSE_LINK]'); - $request = (new GetAdSenseLinkRequest()) - ->setName($formattedName); + $request = (new GetAdSenseLinkRequest())->setName($formattedName); try { $gapicClient->getAdSenseLink($request); // If the $gapicClient method call did not throw, fail the test @@ -4774,15 +4982,17 @@ public function getAttributionSettingsTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->attributionSettingsName('[PROPERTY]'); - $request = (new GetAttributionSettingsRequest()) - ->setName($formattedName); + $request = (new GetAttributionSettingsRequest())->setName($formattedName); $response = $gapicClient->getAttributionSettings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAttributionSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAttributionSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -4799,17 +5009,19 @@ public function getAttributionSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->attributionSettingsName('[PROPERTY]'); - $request = (new GetAttributionSettingsRequest()) - ->setName($formattedName); + $request = (new GetAttributionSettingsRequest())->setName($formattedName); try { $gapicClient->getAttributionSettings($request); // If the $gapicClient method call did not throw, fail the test @@ -4846,8 +5058,7 @@ public function getAudienceTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->audienceName('[PROPERTY]', '[AUDIENCE]'); - $request = (new GetAudienceRequest()) - ->setName($formattedName); + $request = (new GetAudienceRequest())->setName($formattedName); $response = $gapicClient->getAudience($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -4871,17 +5082,19 @@ public function getAudienceExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->audienceName('[PROPERTY]', '[AUDIENCE]'); - $request = (new GetAudienceRequest()) - ->setName($formattedName); + $request = (new GetAudienceRequest())->setName($formattedName); try { $gapicClient->getAudience($request); // If the $gapicClient method call did not throw, fail the test @@ -4922,8 +5135,7 @@ public function getBigQueryLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - $request = (new GetBigQueryLinkRequest()) - ->setName($formattedName); + $request = (new GetBigQueryLinkRequest())->setName($formattedName); $response = $gapicClient->getBigQueryLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -4947,17 +5159,19 @@ public function getBigQueryLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); - $request = (new GetBigQueryLinkRequest()) - ->setName($formattedName); + $request = (new GetBigQueryLinkRequest())->setName($formattedName); try { $gapicClient->getBigQueryLink($request); // If the $gapicClient method call did not throw, fail the test @@ -4996,8 +5210,7 @@ public function getCalculatedMetricTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - $request = (new GetCalculatedMetricRequest()) - ->setName($formattedName); + $request = (new GetCalculatedMetricRequest())->setName($formattedName); $response = $gapicClient->getCalculatedMetric($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -5021,17 +5234,19 @@ public function getCalculatedMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->calculatedMetricName('[PROPERTY]', '[CALCULATED_METRIC]'); - $request = (new GetCalculatedMetricRequest()) - ->setName($formattedName); + $request = (new GetCalculatedMetricRequest())->setName($formattedName); try { $gapicClient->getCalculatedMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -5068,8 +5283,7 @@ public function getChannelGroupTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - $request = (new GetChannelGroupRequest()) - ->setName($formattedName); + $request = (new GetChannelGroupRequest())->setName($formattedName); $response = $gapicClient->getChannelGroup($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -5093,17 +5307,19 @@ public function getChannelGroupExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->channelGroupName('[PROPERTY]', '[CHANNEL_GROUP]'); - $request = (new GetChannelGroupRequest()) - ->setName($formattedName); + $request = (new GetChannelGroupRequest())->setName($formattedName); try { $gapicClient->getChannelGroup($request); // If the $gapicClient method call did not throw, fail the test @@ -5138,8 +5354,7 @@ public function getConversionEventTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $request = (new GetConversionEventRequest()) - ->setName($formattedName); + $request = (new GetConversionEventRequest())->setName($formattedName); $response = $gapicClient->getConversionEvent($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -5163,17 +5378,19 @@ public function getConversionEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $request = (new GetConversionEventRequest()) - ->setName($formattedName); + $request = (new GetConversionEventRequest())->setName($formattedName); try { $gapicClient->getConversionEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -5210,8 +5427,7 @@ public function getCustomDimensionTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $request = (new GetCustomDimensionRequest()) - ->setName($formattedName); + $request = (new GetCustomDimensionRequest())->setName($formattedName); $response = $gapicClient->getCustomDimension($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -5235,17 +5451,19 @@ public function getCustomDimensionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $request = (new GetCustomDimensionRequest()) - ->setName($formattedName); + $request = (new GetCustomDimensionRequest())->setName($formattedName); try { $gapicClient->getCustomDimension($request); // If the $gapicClient method call did not throw, fail the test @@ -5280,8 +5498,7 @@ public function getCustomMetricTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $request = (new GetCustomMetricRequest()) - ->setName($formattedName); + $request = (new GetCustomMetricRequest())->setName($formattedName); $response = $gapicClient->getCustomMetric($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -5305,17 +5522,19 @@ public function getCustomMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $request = (new GetCustomMetricRequest()) - ->setName($formattedName); + $request = (new GetCustomMetricRequest())->setName($formattedName); try { $gapicClient->getCustomMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -5348,15 +5567,17 @@ public function getDataRedactionSettingsTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataRedactionSettingsName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetDataRedactionSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataRedactionSettingsRequest())->setName($formattedName); $response = $gapicClient->getDataRedactionSettings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRedactionSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRedactionSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -5373,17 +5594,19 @@ public function getDataRedactionSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->dataRedactionSettingsName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetDataRedactionSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataRedactionSettingsRequest())->setName($formattedName); try { $gapicClient->getDataRedactionSettings($request); // If the $gapicClient method call did not throw, fail the test @@ -5414,15 +5637,17 @@ public function getDataRetentionSettingsTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataRetentionSettingsName('[PROPERTY]'); - $request = (new GetDataRetentionSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataRetentionSettingsRequest())->setName($formattedName); $response = $gapicClient->getDataRetentionSettings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRetentionSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRetentionSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -5439,17 +5664,19 @@ public function getDataRetentionSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->dataRetentionSettingsName('[PROPERTY]'); - $request = (new GetDataRetentionSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataRetentionSettingsRequest())->setName($formattedName); try { $gapicClient->getDataRetentionSettings($request); // If the $gapicClient method call did not throw, fail the test @@ -5488,15 +5715,17 @@ public function getDataSharingSettingsTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataSharingSettingsName('[ACCOUNT]'); - $request = (new GetDataSharingSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataSharingSettingsRequest())->setName($formattedName); $response = $gapicClient->getDataSharingSettings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataSharingSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataSharingSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -5513,17 +5742,19 @@ public function getDataSharingSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->dataSharingSettingsName('[ACCOUNT]'); - $request = (new GetDataSharingSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataSharingSettingsRequest())->setName($formattedName); try { $gapicClient->getDataSharingSettings($request); // If the $gapicClient method call did not throw, fail the test @@ -5554,8 +5785,7 @@ public function getDataStreamTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetDataStreamRequest()) - ->setName($formattedName); + $request = (new GetDataStreamRequest())->setName($formattedName); $response = $gapicClient->getDataStream($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -5579,17 +5809,19 @@ public function getDataStreamExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetDataStreamRequest()) - ->setName($formattedName); + $request = (new GetDataStreamRequest())->setName($formattedName); try { $gapicClient->getDataStream($request); // If the $gapicClient method call did not throw, fail the test @@ -5621,16 +5853,21 @@ public function getDisplayVideo360AdvertiserLinkTest() $expectedResponse->setAdvertiserDisplayName($advertiserDisplayName); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - $request = (new GetDisplayVideo360AdvertiserLinkRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK]' + ); + $request = (new GetDisplayVideo360AdvertiserLinkRequest())->setName($formattedName); $response = $gapicClient->getDisplayVideo360AdvertiserLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLink', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLink', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -5647,17 +5884,22 @@ public function getDisplayVideo360AdvertiserLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK]'); - $request = (new GetDisplayVideo360AdvertiserLinkRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK]' + ); + $request = (new GetDisplayVideo360AdvertiserLinkRequest())->setName($formattedName); try { $gapicClient->getDisplayVideo360AdvertiserLink($request); // If the $gapicClient method call did not throw, fail the test @@ -5691,16 +5933,21 @@ public function getDisplayVideo360AdvertiserLinkProposalTest() $expectedResponse->setValidationEmail($validationEmail); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $request = (new GetDisplayVideo360AdvertiserLinkProposalRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]' + ); + $request = (new GetDisplayVideo360AdvertiserLinkProposalRequest())->setName($formattedName); $response = $gapicClient->getDisplayVideo360AdvertiserLinkProposal($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLinkProposal', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLinkProposal', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -5717,17 +5964,22 @@ public function getDisplayVideo360AdvertiserLinkProposalExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName('[PROPERTY]', '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]'); - $request = (new GetDisplayVideo360AdvertiserLinkProposalRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->displayVideo360AdvertiserLinkProposalName( + '[PROPERTY]', + '[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]' + ); + $request = (new GetDisplayVideo360AdvertiserLinkProposalRequest())->setName($formattedName); try { $gapicClient->getDisplayVideo360AdvertiserLinkProposal($request); // If the $gapicClient method call did not throw, fail the test @@ -5776,15 +6028,17 @@ public function getEnhancedMeasurementSettingsTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->enhancedMeasurementSettingsName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetEnhancedMeasurementSettingsRequest()) - ->setName($formattedName); + $request = (new GetEnhancedMeasurementSettingsRequest())->setName($formattedName); $response = $gapicClient->getEnhancedMeasurementSettings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetEnhancedMeasurementSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetEnhancedMeasurementSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -5801,17 +6055,19 @@ public function getEnhancedMeasurementSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->enhancedMeasurementSettingsName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetEnhancedMeasurementSettingsRequest()) - ->setName($formattedName); + $request = (new GetEnhancedMeasurementSettingsRequest())->setName($formattedName); try { $gapicClient->getEnhancedMeasurementSettings($request); // If the $gapicClient method call did not throw, fail the test @@ -5844,8 +6100,7 @@ public function getEventCreateRuleTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - $request = (new GetEventCreateRuleRequest()) - ->setName($formattedName); + $request = (new GetEventCreateRuleRequest())->setName($formattedName); $response = $gapicClient->getEventCreateRule($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -5869,17 +6124,19 @@ public function getEventCreateRuleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->eventCreateRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_CREATE_RULE]'); - $request = (new GetEventCreateRuleRequest()) - ->setName($formattedName); + $request = (new GetEventCreateRuleRequest())->setName($formattedName); try { $gapicClient->getEventCreateRule($request); // If the $gapicClient method call did not throw, fail the test @@ -5912,8 +6169,7 @@ public function getEventEditRuleTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - $request = (new GetEventEditRuleRequest()) - ->setName($formattedName); + $request = (new GetEventEditRuleRequest())->setName($formattedName); $response = $gapicClient->getEventEditRule($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -5937,17 +6193,19 @@ public function getEventEditRuleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->eventEditRuleName('[PROPERTY]', '[DATA_STREAM]', '[EVENT_EDIT_RULE]'); - $request = (new GetEventEditRuleRequest()) - ->setName($formattedName); + $request = (new GetEventEditRuleRequest())->setName($formattedName); try { $gapicClient->getEventEditRule($request); // If the $gapicClient method call did not throw, fail the test @@ -5980,8 +6238,7 @@ public function getExpandedDataSetTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - $request = (new GetExpandedDataSetRequest()) - ->setName($formattedName); + $request = (new GetExpandedDataSetRequest())->setName($formattedName); $response = $gapicClient->getExpandedDataSet($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -6005,17 +6262,19 @@ public function getExpandedDataSetExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->expandedDataSetName('[PROPERTY]', '[EXPANDED_DATA_SET]'); - $request = (new GetExpandedDataSetRequest()) - ->setName($formattedName); + $request = (new GetExpandedDataSetRequest())->setName($formattedName); try { $gapicClient->getExpandedDataSet($request); // If the $gapicClient method call did not throw, fail the test @@ -6046,8 +6305,7 @@ public function getGlobalSiteTagTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->globalSiteTagName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetGlobalSiteTagRequest()) - ->setName($formattedName); + $request = (new GetGlobalSiteTagRequest())->setName($formattedName); $response = $gapicClient->getGlobalSiteTag($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -6071,17 +6329,19 @@ public function getGlobalSiteTagExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->globalSiteTagName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetGlobalSiteTagRequest()) - ->setName($formattedName); + $request = (new GetGlobalSiteTagRequest())->setName($formattedName); try { $gapicClient->getGlobalSiteTag($request); // If the $gapicClient method call did not throw, fail the test @@ -6110,15 +6370,17 @@ public function getGoogleSignalsSettingsTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->googleSignalsSettingsName('[PROPERTY]'); - $request = (new GetGoogleSignalsSettingsRequest()) - ->setName($formattedName); + $request = (new GetGoogleSignalsSettingsRequest())->setName($formattedName); $response = $gapicClient->getGoogleSignalsSettings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGoogleSignalsSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGoogleSignalsSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -6135,17 +6397,19 @@ public function getGoogleSignalsSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->googleSignalsSettingsName('[PROPERTY]'); - $request = (new GetGoogleSignalsSettingsRequest()) - ->setName($formattedName); + $request = (new GetGoogleSignalsSettingsRequest())->setName($formattedName); try { $gapicClient->getGoogleSignalsSettings($request); // If the $gapicClient method call did not throw, fail the test @@ -6180,8 +6444,7 @@ public function getKeyEventTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $request = (new GetKeyEventRequest()) - ->setName($formattedName); + $request = (new GetKeyEventRequest())->setName($formattedName); $response = $gapicClient->getKeyEvent($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -6205,17 +6468,19 @@ public function getKeyEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $request = (new GetKeyEventRequest()) - ->setName($formattedName); + $request = (new GetKeyEventRequest())->setName($formattedName); try { $gapicClient->getKeyEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -6247,16 +6512,22 @@ public function getMeasurementProtocolSecretTest() $expectedResponse->setSecretValue($secretValue); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $request = (new GetMeasurementProtocolSecretRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->measurementProtocolSecretName( + '[PROPERTY]', + '[DATA_STREAM]', + '[MEASUREMENT_PROTOCOL_SECRET]' + ); + $request = (new GetMeasurementProtocolSecretRequest())->setName($formattedName); $response = $gapicClient->getMeasurementProtocolSecret($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetMeasurementProtocolSecret', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetMeasurementProtocolSecret', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -6273,17 +6544,23 @@ public function getMeasurementProtocolSecretExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $request = (new GetMeasurementProtocolSecretRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->measurementProtocolSecretName( + '[PROPERTY]', + '[DATA_STREAM]', + '[MEASUREMENT_PROTOCOL_SECRET]' + ); + $request = (new GetMeasurementProtocolSecretRequest())->setName($formattedName); try { $gapicClient->getMeasurementProtocolSecret($request); // If the $gapicClient method call did not throw, fail the test @@ -6322,8 +6599,7 @@ public function getPropertyTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new GetPropertyRequest()) - ->setName($formattedName); + $request = (new GetPropertyRequest())->setName($formattedName); $response = $gapicClient->getProperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -6347,17 +6623,19 @@ public function getPropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new GetPropertyRequest()) - ->setName($formattedName); + $request = (new GetPropertyRequest())->setName($formattedName); try { $gapicClient->getProperty($request); // If the $gapicClient method call did not throw, fail the test @@ -6388,15 +6666,17 @@ public function getRollupPropertySourceLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - $request = (new GetRollupPropertySourceLinkRequest()) - ->setName($formattedName); + $request = (new GetRollupPropertySourceLinkRequest())->setName($formattedName); $response = $gapicClient->getRollupPropertySourceLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetRollupPropertySourceLink', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetRollupPropertySourceLink', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -6413,17 +6693,19 @@ public function getRollupPropertySourceLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->rollupPropertySourceLinkName('[PROPERTY]', '[ROLLUP_PROPERTY_SOURCE_LINK]'); - $request = (new GetRollupPropertySourceLinkRequest()) - ->setName($formattedName); + $request = (new GetRollupPropertySourceLinkRequest())->setName($formattedName); try { $gapicClient->getRollupPropertySourceLink($request); // If the $gapicClient method call did not throw, fail the test @@ -6453,16 +6735,22 @@ public function getSKAdNetworkConversionValueSchemaTest() $expectedResponse->setApplyConversionValues($applyConversionValues); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - $request = (new GetSKAdNetworkConversionValueSchemaRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName( + '[PROPERTY]', + '[DATA_STREAM]', + '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]' + ); + $request = (new GetSKAdNetworkConversionValueSchemaRequest())->setName($formattedName); $response = $gapicClient->getSKAdNetworkConversionValueSchema($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetSKAdNetworkConversionValueSchema', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetSKAdNetworkConversionValueSchema', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -6479,17 +6767,23 @@ public function getSKAdNetworkConversionValueSchemaExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName('[PROPERTY]', '[DATA_STREAM]', '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]'); - $request = (new GetSKAdNetworkConversionValueSchemaRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->sKAdNetworkConversionValueSchemaName( + '[PROPERTY]', + '[DATA_STREAM]', + '[SKADNETWORK_CONVERSION_VALUE_SCHEMA]' + ); + $request = (new GetSKAdNetworkConversionValueSchemaRequest())->setName($formattedName); try { $gapicClient->getSKAdNetworkConversionValueSchema($request); // If the $gapicClient method call did not throw, fail the test @@ -6522,8 +6816,7 @@ public function getSearchAds360LinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - $request = (new GetSearchAds360LinkRequest()) - ->setName($formattedName); + $request = (new GetSearchAds360LinkRequest())->setName($formattedName); $response = $gapicClient->getSearchAds360Link($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -6547,17 +6840,19 @@ public function getSearchAds360LinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->searchAds360LinkName('[PROPERTY]', '[SEARCH_ADS_360_LINK]'); - $request = (new GetSearchAds360LinkRequest()) - ->setName($formattedName); + $request = (new GetSearchAds360LinkRequest())->setName($formattedName); try { $gapicClient->getSearchAds360Link($request); // If the $gapicClient method call did not throw, fail the test @@ -6588,15 +6883,17 @@ public function getSubpropertyEventFilterTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - $request = (new GetSubpropertyEventFilterRequest()) - ->setName($formattedName); + $request = (new GetSubpropertyEventFilterRequest())->setName($formattedName); $response = $gapicClient->getSubpropertyEventFilter($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetSubpropertyEventFilter', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/GetSubpropertyEventFilter', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -6613,17 +6910,19 @@ public function getSubpropertyEventFilterExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->subpropertyEventFilterName('[PROPERTY]', '[SUB_PROPERTY_EVENT_FILTER]'); - $request = (new GetSubpropertyEventFilterRequest()) - ->setName($formattedName); + $request = (new GetSubpropertyEventFilterRequest())->setName($formattedName); try { $gapicClient->getSubpropertyEventFilter($request); // If the $gapicClient method call did not throw, fail the test @@ -6648,17 +6947,14 @@ public function listAccessBindingsTest() // Mock response $nextPageToken = ''; $accessBindingsElement = new AccessBinding(); - $accessBindings = [ - $accessBindingsElement, - ]; + $accessBindings = [$accessBindingsElement]; $expectedResponse = new ListAccessBindingsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setAccessBindings($accessBindings); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $request = (new ListAccessBindingsRequest()) - ->setParent($formattedParent); + $request = (new ListAccessBindingsRequest())->setParent($formattedParent); $response = $gapicClient->listAccessBindings($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -6685,17 +6981,19 @@ public function listAccessBindingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->accountName('[ACCOUNT]'); - $request = (new ListAccessBindingsRequest()) - ->setParent($formattedParent); + $request = (new ListAccessBindingsRequest())->setParent($formattedParent); try { $gapicClient->listAccessBindings($request); // If the $gapicClient method call did not throw, fail the test @@ -6720,9 +7018,7 @@ public function listAccountSummariesTest() // Mock response $nextPageToken = ''; $accountSummariesElement = new AccountSummary(); - $accountSummaries = [ - $accountSummariesElement, - ]; + $accountSummaries = [$accountSummariesElement]; $expectedResponse = new ListAccountSummariesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setAccountSummaries($accountSummaries); @@ -6737,7 +7033,10 @@ public function listAccountSummariesTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccountSummaries', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccountSummaries', + $actualFuncCall + ); $this->assertTrue($transport->isExhausted()); } @@ -6752,12 +7051,15 @@ public function listAccountSummariesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ListAccountSummariesRequest(); try { @@ -6784,9 +7086,7 @@ public function listAccountsTest() // Mock response $nextPageToken = ''; $accountsElement = new Account(); - $accounts = [ - $accountsElement, - ]; + $accounts = [$accountsElement]; $expectedResponse = new ListAccountsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setAccounts($accounts); @@ -6816,12 +7116,15 @@ public function listAccountsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ListAccountsRequest(); try { @@ -6848,17 +7151,14 @@ public function listAdSenseLinksTest() // Mock response $nextPageToken = ''; $adsenseLinksElement = new AdSenseLink(); - $adsenseLinks = [ - $adsenseLinksElement, - ]; + $adsenseLinks = [$adsenseLinksElement]; $expectedResponse = new ListAdSenseLinksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setAdsenseLinks($adsenseLinks); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListAdSenseLinksRequest()) - ->setParent($formattedParent); + $request = (new ListAdSenseLinksRequest())->setParent($formattedParent); $response = $gapicClient->listAdSenseLinks($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -6885,17 +7185,19 @@ public function listAdSenseLinksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListAdSenseLinksRequest()) - ->setParent($formattedParent); + $request = (new ListAdSenseLinksRequest())->setParent($formattedParent); try { $gapicClient->listAdSenseLinks($request); // If the $gapicClient method call did not throw, fail the test @@ -6920,17 +7222,14 @@ public function listAudiencesTest() // Mock response $nextPageToken = ''; $audiencesElement = new Audience(); - $audiences = [ - $audiencesElement, - ]; + $audiences = [$audiencesElement]; $expectedResponse = new ListAudiencesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setAudiences($audiences); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListAudiencesRequest()) - ->setParent($formattedParent); + $request = (new ListAudiencesRequest())->setParent($formattedParent); $response = $gapicClient->listAudiences($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -6957,17 +7256,19 @@ public function listAudiencesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListAudiencesRequest()) - ->setParent($formattedParent); + $request = (new ListAudiencesRequest())->setParent($formattedParent); try { $gapicClient->listAudiences($request); // If the $gapicClient method call did not throw, fail the test @@ -6992,17 +7293,14 @@ public function listBigQueryLinksTest() // Mock response $nextPageToken = ''; $bigqueryLinksElement = new BigQueryLink(); - $bigqueryLinks = [ - $bigqueryLinksElement, - ]; + $bigqueryLinks = [$bigqueryLinksElement]; $expectedResponse = new ListBigQueryLinksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setBigqueryLinks($bigqueryLinks); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListBigQueryLinksRequest()) - ->setParent($formattedParent); + $request = (new ListBigQueryLinksRequest())->setParent($formattedParent); $response = $gapicClient->listBigQueryLinks($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7029,17 +7327,19 @@ public function listBigQueryLinksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListBigQueryLinksRequest()) - ->setParent($formattedParent); + $request = (new ListBigQueryLinksRequest())->setParent($formattedParent); try { $gapicClient->listBigQueryLinks($request); // If the $gapicClient method call did not throw, fail the test @@ -7064,17 +7364,14 @@ public function listCalculatedMetricsTest() // Mock response $nextPageToken = ''; $calculatedMetricsElement = new CalculatedMetric(); - $calculatedMetrics = [ - $calculatedMetricsElement, - ]; + $calculatedMetrics = [$calculatedMetricsElement]; $expectedResponse = new ListCalculatedMetricsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setCalculatedMetrics($calculatedMetrics); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCalculatedMetricsRequest()) - ->setParent($formattedParent); + $request = (new ListCalculatedMetricsRequest())->setParent($formattedParent); $response = $gapicClient->listCalculatedMetrics($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7084,7 +7381,10 @@ public function listCalculatedMetricsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCalculatedMetrics', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCalculatedMetrics', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -7101,17 +7401,19 @@ public function listCalculatedMetricsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCalculatedMetricsRequest()) - ->setParent($formattedParent); + $request = (new ListCalculatedMetricsRequest())->setParent($formattedParent); try { $gapicClient->listCalculatedMetrics($request); // If the $gapicClient method call did not throw, fail the test @@ -7136,17 +7438,14 @@ public function listChannelGroupsTest() // Mock response $nextPageToken = ''; $channelGroupsElement = new ChannelGroup(); - $channelGroups = [ - $channelGroupsElement, - ]; + $channelGroups = [$channelGroupsElement]; $expectedResponse = new ListChannelGroupsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setChannelGroups($channelGroups); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListChannelGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListChannelGroupsRequest())->setParent($formattedParent); $response = $gapicClient->listChannelGroups($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7173,17 +7472,19 @@ public function listChannelGroupsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListChannelGroupsRequest()) - ->setParent($formattedParent); + $request = (new ListChannelGroupsRequest())->setParent($formattedParent); try { $gapicClient->listChannelGroups($request); // If the $gapicClient method call did not throw, fail the test @@ -7215,7 +7516,10 @@ public function listConnectedSiteTagsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConnectedSiteTags', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConnectedSiteTags', + $actualFuncCall + ); $this->assertTrue($transport->isExhausted()); } @@ -7230,12 +7534,15 @@ public function listConnectedSiteTagsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ListConnectedSiteTagsRequest(); try { @@ -7262,17 +7569,14 @@ public function listConversionEventsTest() // Mock response $nextPageToken = ''; $conversionEventsElement = new ConversionEvent(); - $conversionEvents = [ - $conversionEventsElement, - ]; + $conversionEvents = [$conversionEventsElement]; $expectedResponse = new ListConversionEventsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setConversionEvents($conversionEvents); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListConversionEventsRequest()) - ->setParent($formattedParent); + $request = (new ListConversionEventsRequest())->setParent($formattedParent); $response = $gapicClient->listConversionEvents($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7282,7 +7586,10 @@ public function listConversionEventsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConversionEvents', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConversionEvents', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -7299,17 +7606,19 @@ public function listConversionEventsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListConversionEventsRequest()) - ->setParent($formattedParent); + $request = (new ListConversionEventsRequest())->setParent($formattedParent); try { $gapicClient->listConversionEvents($request); // If the $gapicClient method call did not throw, fail the test @@ -7334,17 +7643,14 @@ public function listCustomDimensionsTest() // Mock response $nextPageToken = ''; $customDimensionsElement = new CustomDimension(); - $customDimensions = [ - $customDimensionsElement, - ]; + $customDimensions = [$customDimensionsElement]; $expectedResponse = new ListCustomDimensionsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setCustomDimensions($customDimensions); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCustomDimensionsRequest()) - ->setParent($formattedParent); + $request = (new ListCustomDimensionsRequest())->setParent($formattedParent); $response = $gapicClient->listCustomDimensions($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7354,7 +7660,10 @@ public function listCustomDimensionsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomDimensions', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomDimensions', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -7371,17 +7680,19 @@ public function listCustomDimensionsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCustomDimensionsRequest()) - ->setParent($formattedParent); + $request = (new ListCustomDimensionsRequest())->setParent($formattedParent); try { $gapicClient->listCustomDimensions($request); // If the $gapicClient method call did not throw, fail the test @@ -7406,17 +7717,14 @@ public function listCustomMetricsTest() // Mock response $nextPageToken = ''; $customMetricsElement = new CustomMetric(); - $customMetrics = [ - $customMetricsElement, - ]; + $customMetrics = [$customMetricsElement]; $expectedResponse = new ListCustomMetricsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setCustomMetrics($customMetrics); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCustomMetricsRequest()) - ->setParent($formattedParent); + $request = (new ListCustomMetricsRequest())->setParent($formattedParent); $response = $gapicClient->listCustomMetrics($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7443,17 +7751,19 @@ public function listCustomMetricsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCustomMetricsRequest()) - ->setParent($formattedParent); + $request = (new ListCustomMetricsRequest())->setParent($formattedParent); try { $gapicClient->listCustomMetrics($request); // If the $gapicClient method call did not throw, fail the test @@ -7478,17 +7788,14 @@ public function listDataStreamsTest() // Mock response $nextPageToken = ''; $dataStreamsElement = new DataStream(); - $dataStreams = [ - $dataStreamsElement, - ]; + $dataStreams = [$dataStreamsElement]; $expectedResponse = new ListDataStreamsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setDataStreams($dataStreams); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListDataStreamsRequest()) - ->setParent($formattedParent); + $request = (new ListDataStreamsRequest())->setParent($formattedParent); $response = $gapicClient->listDataStreams($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7515,17 +7822,19 @@ public function listDataStreamsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListDataStreamsRequest()) - ->setParent($formattedParent); + $request = (new ListDataStreamsRequest())->setParent($formattedParent); try { $gapicClient->listDataStreams($request); // If the $gapicClient method call did not throw, fail the test @@ -7550,17 +7859,14 @@ public function listDisplayVideo360AdvertiserLinkProposalsTest() // Mock response $nextPageToken = ''; $displayVideo360AdvertiserLinkProposalsElement = new DisplayVideo360AdvertiserLinkProposal(); - $displayVideo360AdvertiserLinkProposals = [ - $displayVideo360AdvertiserLinkProposalsElement, - ]; + $displayVideo360AdvertiserLinkProposals = [$displayVideo360AdvertiserLinkProposalsElement]; $expectedResponse = new ListDisplayVideo360AdvertiserLinkProposalsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setDisplayVideo360AdvertiserLinkProposals($displayVideo360AdvertiserLinkProposals); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListDisplayVideo360AdvertiserLinkProposalsRequest()) - ->setParent($formattedParent); + $request = (new ListDisplayVideo360AdvertiserLinkProposalsRequest())->setParent($formattedParent); $response = $gapicClient->listDisplayVideo360AdvertiserLinkProposals($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7570,7 +7876,10 @@ public function listDisplayVideo360AdvertiserLinkProposalsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinkProposals', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinkProposals', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -7587,17 +7896,19 @@ public function listDisplayVideo360AdvertiserLinkProposalsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListDisplayVideo360AdvertiserLinkProposalsRequest()) - ->setParent($formattedParent); + $request = (new ListDisplayVideo360AdvertiserLinkProposalsRequest())->setParent($formattedParent); try { $gapicClient->listDisplayVideo360AdvertiserLinkProposals($request); // If the $gapicClient method call did not throw, fail the test @@ -7622,17 +7933,14 @@ public function listDisplayVideo360AdvertiserLinksTest() // Mock response $nextPageToken = ''; $displayVideo360AdvertiserLinksElement = new DisplayVideo360AdvertiserLink(); - $displayVideo360AdvertiserLinks = [ - $displayVideo360AdvertiserLinksElement, - ]; + $displayVideo360AdvertiserLinks = [$displayVideo360AdvertiserLinksElement]; $expectedResponse = new ListDisplayVideo360AdvertiserLinksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setDisplayVideo360AdvertiserLinks($displayVideo360AdvertiserLinks); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListDisplayVideo360AdvertiserLinksRequest()) - ->setParent($formattedParent); + $request = (new ListDisplayVideo360AdvertiserLinksRequest())->setParent($formattedParent); $response = $gapicClient->listDisplayVideo360AdvertiserLinks($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7642,7 +7950,10 @@ public function listDisplayVideo360AdvertiserLinksTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinks', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinks', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -7659,17 +7970,19 @@ public function listDisplayVideo360AdvertiserLinksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListDisplayVideo360AdvertiserLinksRequest()) - ->setParent($formattedParent); + $request = (new ListDisplayVideo360AdvertiserLinksRequest())->setParent($formattedParent); try { $gapicClient->listDisplayVideo360AdvertiserLinks($request); // If the $gapicClient method call did not throw, fail the test @@ -7694,17 +8007,14 @@ public function listEventCreateRulesTest() // Mock response $nextPageToken = ''; $eventCreateRulesElement = new EventCreateRule(); - $eventCreateRules = [ - $eventCreateRulesElement, - ]; + $eventCreateRules = [$eventCreateRulesElement]; $expectedResponse = new ListEventCreateRulesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setEventCreateRules($eventCreateRules); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListEventCreateRulesRequest()) - ->setParent($formattedParent); + $request = (new ListEventCreateRulesRequest())->setParent($formattedParent); $response = $gapicClient->listEventCreateRules($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7714,7 +8024,10 @@ public function listEventCreateRulesTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListEventCreateRules', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListEventCreateRules', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -7731,17 +8044,19 @@ public function listEventCreateRulesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListEventCreateRulesRequest()) - ->setParent($formattedParent); + $request = (new ListEventCreateRulesRequest())->setParent($formattedParent); try { $gapicClient->listEventCreateRules($request); // If the $gapicClient method call did not throw, fail the test @@ -7766,17 +8081,14 @@ public function listEventEditRulesTest() // Mock response $nextPageToken = ''; $eventEditRulesElement = new EventEditRule(); - $eventEditRules = [ - $eventEditRulesElement, - ]; + $eventEditRules = [$eventEditRulesElement]; $expectedResponse = new ListEventEditRulesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setEventEditRules($eventEditRules); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListEventEditRulesRequest()) - ->setParent($formattedParent); + $request = (new ListEventEditRulesRequest())->setParent($formattedParent); $response = $gapicClient->listEventEditRules($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7803,17 +8115,19 @@ public function listEventEditRulesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListEventEditRulesRequest()) - ->setParent($formattedParent); + $request = (new ListEventEditRulesRequest())->setParent($formattedParent); try { $gapicClient->listEventEditRules($request); // If the $gapicClient method call did not throw, fail the test @@ -7838,17 +8152,14 @@ public function listExpandedDataSetsTest() // Mock response $nextPageToken = ''; $expandedDataSetsElement = new ExpandedDataSet(); - $expandedDataSets = [ - $expandedDataSetsElement, - ]; + $expandedDataSets = [$expandedDataSetsElement]; $expectedResponse = new ListExpandedDataSetsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setExpandedDataSets($expandedDataSets); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListExpandedDataSetsRequest()) - ->setParent($formattedParent); + $request = (new ListExpandedDataSetsRequest())->setParent($formattedParent); $response = $gapicClient->listExpandedDataSets($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7858,7 +8169,10 @@ public function listExpandedDataSetsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListExpandedDataSets', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListExpandedDataSets', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -7875,17 +8189,19 @@ public function listExpandedDataSetsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListExpandedDataSetsRequest()) - ->setParent($formattedParent); + $request = (new ListExpandedDataSetsRequest())->setParent($formattedParent); try { $gapicClient->listExpandedDataSets($request); // If the $gapicClient method call did not throw, fail the test @@ -7910,17 +8226,14 @@ public function listFirebaseLinksTest() // Mock response $nextPageToken = ''; $firebaseLinksElement = new FirebaseLink(); - $firebaseLinks = [ - $firebaseLinksElement, - ]; + $firebaseLinks = [$firebaseLinksElement]; $expectedResponse = new ListFirebaseLinksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setFirebaseLinks($firebaseLinks); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListFirebaseLinksRequest()) - ->setParent($formattedParent); + $request = (new ListFirebaseLinksRequest())->setParent($formattedParent); $response = $gapicClient->listFirebaseLinks($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -7947,17 +8260,19 @@ public function listFirebaseLinksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListFirebaseLinksRequest()) - ->setParent($formattedParent); + $request = (new ListFirebaseLinksRequest())->setParent($formattedParent); try { $gapicClient->listFirebaseLinks($request); // If the $gapicClient method call did not throw, fail the test @@ -7982,17 +8297,14 @@ public function listGoogleAdsLinksTest() // Mock response $nextPageToken = ''; $googleAdsLinksElement = new GoogleAdsLink(); - $googleAdsLinks = [ - $googleAdsLinksElement, - ]; + $googleAdsLinks = [$googleAdsLinksElement]; $expectedResponse = new ListGoogleAdsLinksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setGoogleAdsLinks($googleAdsLinks); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListGoogleAdsLinksRequest()) - ->setParent($formattedParent); + $request = (new ListGoogleAdsLinksRequest())->setParent($formattedParent); $response = $gapicClient->listGoogleAdsLinks($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -8019,17 +8331,19 @@ public function listGoogleAdsLinksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListGoogleAdsLinksRequest()) - ->setParent($formattedParent); + $request = (new ListGoogleAdsLinksRequest())->setParent($formattedParent); try { $gapicClient->listGoogleAdsLinks($request); // If the $gapicClient method call did not throw, fail the test @@ -8054,17 +8368,14 @@ public function listKeyEventsTest() // Mock response $nextPageToken = ''; $keyEventsElement = new KeyEvent(); - $keyEvents = [ - $keyEventsElement, - ]; + $keyEvents = [$keyEventsElement]; $expectedResponse = new ListKeyEventsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setKeyEvents($keyEvents); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListKeyEventsRequest()) - ->setParent($formattedParent); + $request = (new ListKeyEventsRequest())->setParent($formattedParent); $response = $gapicClient->listKeyEvents($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -8091,17 +8402,19 @@ public function listKeyEventsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListKeyEventsRequest()) - ->setParent($formattedParent); + $request = (new ListKeyEventsRequest())->setParent($formattedParent); try { $gapicClient->listKeyEvents($request); // If the $gapicClient method call did not throw, fail the test @@ -8126,17 +8439,14 @@ public function listMeasurementProtocolSecretsTest() // Mock response $nextPageToken = ''; $measurementProtocolSecretsElement = new MeasurementProtocolSecret(); - $measurementProtocolSecrets = [ - $measurementProtocolSecretsElement, - ]; + $measurementProtocolSecrets = [$measurementProtocolSecretsElement]; $expectedResponse = new ListMeasurementProtocolSecretsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setMeasurementProtocolSecrets($measurementProtocolSecrets); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListMeasurementProtocolSecretsRequest()) - ->setParent($formattedParent); + $request = (new ListMeasurementProtocolSecretsRequest())->setParent($formattedParent); $response = $gapicClient->listMeasurementProtocolSecrets($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -8146,7 +8456,10 @@ public function listMeasurementProtocolSecretsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListMeasurementProtocolSecrets', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListMeasurementProtocolSecrets', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -8163,17 +8476,19 @@ public function listMeasurementProtocolSecretsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListMeasurementProtocolSecretsRequest()) - ->setParent($formattedParent); + $request = (new ListMeasurementProtocolSecretsRequest())->setParent($formattedParent); try { $gapicClient->listMeasurementProtocolSecrets($request); // If the $gapicClient method call did not throw, fail the test @@ -8198,17 +8513,14 @@ public function listPropertiesTest() // Mock response $nextPageToken = ''; $propertiesElement = new Property(); - $properties = [ - $propertiesElement, - ]; + $properties = [$propertiesElement]; $expectedResponse = new ListPropertiesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setProperties($properties); $transport->addResponse($expectedResponse); // Mock request $filter = 'filter-1274492040'; - $request = (new ListPropertiesRequest()) - ->setFilter($filter); + $request = (new ListPropertiesRequest())->setFilter($filter); $response = $gapicClient->listProperties($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -8235,17 +8547,19 @@ public function listPropertiesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $filter = 'filter-1274492040'; - $request = (new ListPropertiesRequest()) - ->setFilter($filter); + $request = (new ListPropertiesRequest())->setFilter($filter); try { $gapicClient->listProperties($request); // If the $gapicClient method call did not throw, fail the test @@ -8270,17 +8584,14 @@ public function listRollupPropertySourceLinksTest() // Mock response $nextPageToken = ''; $rollupPropertySourceLinksElement = new RollupPropertySourceLink(); - $rollupPropertySourceLinks = [ - $rollupPropertySourceLinksElement, - ]; + $rollupPropertySourceLinks = [$rollupPropertySourceLinksElement]; $expectedResponse = new ListRollupPropertySourceLinksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setRollupPropertySourceLinks($rollupPropertySourceLinks); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListRollupPropertySourceLinksRequest()) - ->setParent($formattedParent); + $request = (new ListRollupPropertySourceLinksRequest())->setParent($formattedParent); $response = $gapicClient->listRollupPropertySourceLinks($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -8290,7 +8601,10 @@ public function listRollupPropertySourceLinksTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListRollupPropertySourceLinks', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListRollupPropertySourceLinks', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -8307,17 +8621,19 @@ public function listRollupPropertySourceLinksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListRollupPropertySourceLinksRequest()) - ->setParent($formattedParent); + $request = (new ListRollupPropertySourceLinksRequest())->setParent($formattedParent); try { $gapicClient->listRollupPropertySourceLinks($request); // If the $gapicClient method call did not throw, fail the test @@ -8342,17 +8658,14 @@ public function listSKAdNetworkConversionValueSchemasTest() // Mock response $nextPageToken = ''; $skadnetworkConversionValueSchemasElement = new SKAdNetworkConversionValueSchema(); - $skadnetworkConversionValueSchemas = [ - $skadnetworkConversionValueSchemasElement, - ]; + $skadnetworkConversionValueSchemas = [$skadnetworkConversionValueSchemasElement]; $expectedResponse = new ListSKAdNetworkConversionValueSchemasResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setSkadnetworkConversionValueSchemas($skadnetworkConversionValueSchemas); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListSKAdNetworkConversionValueSchemasRequest()) - ->setParent($formattedParent); + $request = (new ListSKAdNetworkConversionValueSchemasRequest())->setParent($formattedParent); $response = $gapicClient->listSKAdNetworkConversionValueSchemas($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -8362,7 +8675,10 @@ public function listSKAdNetworkConversionValueSchemasTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSKAdNetworkConversionValueSchemas', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSKAdNetworkConversionValueSchemas', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -8379,17 +8695,19 @@ public function listSKAdNetworkConversionValueSchemasExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListSKAdNetworkConversionValueSchemasRequest()) - ->setParent($formattedParent); + $request = (new ListSKAdNetworkConversionValueSchemasRequest())->setParent($formattedParent); try { $gapicClient->listSKAdNetworkConversionValueSchemas($request); // If the $gapicClient method call did not throw, fail the test @@ -8414,17 +8732,14 @@ public function listSearchAds360LinksTest() // Mock response $nextPageToken = ''; $searchAds360LinksElement = new SearchAds360Link(); - $searchAds360Links = [ - $searchAds360LinksElement, - ]; + $searchAds360Links = [$searchAds360LinksElement]; $expectedResponse = new ListSearchAds360LinksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setSearchAds360Links($searchAds360Links); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListSearchAds360LinksRequest()) - ->setParent($formattedParent); + $request = (new ListSearchAds360LinksRequest())->setParent($formattedParent); $response = $gapicClient->listSearchAds360Links($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -8434,7 +8749,10 @@ public function listSearchAds360LinksTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSearchAds360Links', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSearchAds360Links', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -8451,17 +8769,19 @@ public function listSearchAds360LinksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListSearchAds360LinksRequest()) - ->setParent($formattedParent); + $request = (new ListSearchAds360LinksRequest())->setParent($formattedParent); try { $gapicClient->listSearchAds360Links($request); // If the $gapicClient method call did not throw, fail the test @@ -8486,17 +8806,14 @@ public function listSubpropertyEventFiltersTest() // Mock response $nextPageToken = ''; $subpropertyEventFiltersElement = new SubpropertyEventFilter(); - $subpropertyEventFilters = [ - $subpropertyEventFiltersElement, - ]; + $subpropertyEventFilters = [$subpropertyEventFiltersElement]; $expectedResponse = new ListSubpropertyEventFiltersResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setSubpropertyEventFilters($subpropertyEventFilters); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListSubpropertyEventFiltersRequest()) - ->setParent($formattedParent); + $request = (new ListSubpropertyEventFiltersRequest())->setParent($formattedParent); $response = $gapicClient->listSubpropertyEventFilters($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -8506,7 +8823,10 @@ public function listSubpropertyEventFiltersTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSubpropertyEventFilters', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ListSubpropertyEventFilters', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -8523,17 +8843,19 @@ public function listSubpropertyEventFiltersExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListSubpropertyEventFiltersRequest()) - ->setParent($formattedParent); + $request = (new ListSubpropertyEventFiltersRequest())->setParent($formattedParent); try { $gapicClient->listSubpropertyEventFilters($request); // If the $gapicClient method call did not throw, fail the test @@ -8567,7 +8889,10 @@ public function provisionAccountTicketTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ProvisionAccountTicket', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ProvisionAccountTicket', + $actualFuncCall + ); $this->assertTrue($transport->isExhausted()); } @@ -8582,12 +8907,15 @@ public function provisionAccountTicketExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ProvisionAccountTicketRequest(); try { @@ -8620,15 +8948,17 @@ public function provisionSubpropertyTest() $subproperty->setDisplayName($subpropertyDisplayName); $subpropertyTimeZone = 'subpropertyTimeZone-1143367858'; $subproperty->setTimeZone($subpropertyTimeZone); - $request = (new ProvisionSubpropertyRequest()) - ->setSubproperty($subproperty); + $request = (new ProvisionSubpropertyRequest())->setSubproperty($subproperty); $response = $gapicClient->provisionSubproperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ProvisionSubproperty', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ProvisionSubproperty', + $actualFuncCall + ); $actualValue = $actualRequestObject->getSubproperty(); $this->assertProtobufEquals($subproperty, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -8645,12 +8975,15 @@ public function provisionSubpropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $subproperty = new Property(); @@ -8658,8 +8991,7 @@ public function provisionSubpropertyExceptionTest() $subproperty->setDisplayName($subpropertyDisplayName); $subpropertyTimeZone = 'subpropertyTimeZone-1143367858'; $subproperty->setTimeZone($subpropertyTimeZone); - $request = (new ProvisionSubpropertyRequest()) - ->setSubproperty($subproperty); + $request = (new ProvisionSubpropertyRequest())->setSubproperty($subproperty); try { $gapicClient->provisionSubproperty($request); // If the $gapicClient method call did not throw, fail the test @@ -8695,7 +9027,10 @@ public function reorderEventEditRulesTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ReorderEventEditRules', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/ReorderEventEditRules', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getEventEditRules(); @@ -8714,12 +9049,15 @@ public function reorderEventEditRulesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); @@ -8775,12 +9113,15 @@ public function runAccessReportExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new RunAccessReportRequest(); try { @@ -8807,17 +9148,14 @@ public function searchChangeHistoryEventsTest() // Mock response $nextPageToken = ''; $changeHistoryEventsElement = new ChangeHistoryEvent(); - $changeHistoryEvents = [ - $changeHistoryEventsElement, - ]; + $changeHistoryEvents = [$changeHistoryEventsElement]; $expectedResponse = new SearchChangeHistoryEventsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setChangeHistoryEvents($changeHistoryEvents); $transport->addResponse($expectedResponse); // Mock request $formattedAccount = $gapicClient->accountName('[ACCOUNT]'); - $request = (new SearchChangeHistoryEventsRequest()) - ->setAccount($formattedAccount); + $request = (new SearchChangeHistoryEventsRequest())->setAccount($formattedAccount); $response = $gapicClient->searchChangeHistoryEvents($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -8827,7 +9165,10 @@ public function searchChangeHistoryEventsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/SearchChangeHistoryEvents', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/SearchChangeHistoryEvents', + $actualFuncCall + ); $actualValue = $actualRequestObject->getAccount(); $this->assertProtobufEquals($formattedAccount, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -8844,17 +9185,19 @@ public function searchChangeHistoryEventsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedAccount = $gapicClient->accountName('[ACCOUNT]'); - $request = (new SearchChangeHistoryEventsRequest()) - ->setAccount($formattedAccount); + $request = (new SearchChangeHistoryEventsRequest())->setAccount($formattedAccount); try { $gapicClient->searchChangeHistoryEvents($request); // If the $gapicClient method call did not throw, fail the test @@ -8881,15 +9224,17 @@ public function setAutomatedGa4ConfigurationOptOutTest() $transport->addResponse($expectedResponse); // Mock request $property = 'property-993141291'; - $request = (new SetAutomatedGa4ConfigurationOptOutRequest()) - ->setProperty($property); + $request = (new SetAutomatedGa4ConfigurationOptOutRequest())->setProperty($property); $response = $gapicClient->setAutomatedGa4ConfigurationOptOut($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/SetAutomatedGa4ConfigurationOptOut', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/SetAutomatedGa4ConfigurationOptOut', + $actualFuncCall + ); $actualValue = $actualRequestObject->getProperty(); $this->assertProtobufEquals($property, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -8906,17 +9251,19 @@ public function setAutomatedGa4ConfigurationOptOutExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $property = 'property-993141291'; - $request = (new SetAutomatedGa4ConfigurationOptOutRequest()) - ->setProperty($property); + $request = (new SetAutomatedGa4ConfigurationOptOutRequest())->setProperty($property); try { $gapicClient->setAutomatedGa4ConfigurationOptOut($request); // If the $gapicClient method call did not throw, fail the test @@ -8947,8 +9294,7 @@ public function updateAccessBindingTest() $transport->addResponse($expectedResponse); // Mock request $accessBinding = new AccessBinding(); - $request = (new UpdateAccessBindingRequest()) - ->setAccessBinding($accessBinding); + $request = (new UpdateAccessBindingRequest())->setAccessBinding($accessBinding); $response = $gapicClient->updateAccessBinding($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -8972,17 +9318,19 @@ public function updateAccessBindingExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $accessBinding = new AccessBinding(); - $request = (new UpdateAccessBindingRequest()) - ->setAccessBinding($accessBinding); + $request = (new UpdateAccessBindingRequest())->setAccessBinding($accessBinding); try { $gapicClient->updateAccessBinding($request); // If the $gapicClient method call did not throw, fail the test @@ -9022,9 +9370,7 @@ public function updateAccountTest() $accountDisplayName = 'accountDisplayName-616446464'; $account->setDisplayName($accountDisplayName); $updateMask = new FieldMask(); - $request = (new UpdateAccountRequest()) - ->setAccount($account) - ->setUpdateMask($updateMask); + $request = (new UpdateAccountRequest())->setAccount($account)->setUpdateMask($updateMask); $response = $gapicClient->updateAccount($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -9050,21 +9396,22 @@ public function updateAccountExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $account = new Account(); $accountDisplayName = 'accountDisplayName-616446464'; $account->setDisplayName($accountDisplayName); $updateMask = new FieldMask(); - $request = (new UpdateAccountRequest()) - ->setAccount($account) - ->setUpdateMask($updateMask); + $request = (new UpdateAccountRequest())->setAccount($account)->setUpdateMask($updateMask); try { $gapicClient->updateAccount($request); // If the $gapicClient method call did not throw, fail the test @@ -9093,13 +9440,21 @@ public function updateAttributionSettingsTest() $transport->addResponse($expectedResponse); // Mock request $attributionSettings = new AttributionSettings(); - $attributionSettingsAcquisitionConversionEventLookbackWindow = AcquisitionConversionEventLookbackWindow::ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; - $attributionSettings->setAcquisitionConversionEventLookbackWindow($attributionSettingsAcquisitionConversionEventLookbackWindow); - $attributionSettingsOtherConversionEventLookbackWindow = OtherConversionEventLookbackWindow::OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; - $attributionSettings->setOtherConversionEventLookbackWindow($attributionSettingsOtherConversionEventLookbackWindow); - $attributionSettingsReportingAttributionModel = ReportingAttributionModel::REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED; + $attributionSettingsAcquisitionConversionEventLookbackWindow = + AcquisitionConversionEventLookbackWindow::ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; + $attributionSettings->setAcquisitionConversionEventLookbackWindow( + $attributionSettingsAcquisitionConversionEventLookbackWindow + ); + $attributionSettingsOtherConversionEventLookbackWindow = + OtherConversionEventLookbackWindow::OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; + $attributionSettings->setOtherConversionEventLookbackWindow( + $attributionSettingsOtherConversionEventLookbackWindow + ); + $attributionSettingsReportingAttributionModel = + ReportingAttributionModel::REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED; $attributionSettings->setReportingAttributionModel($attributionSettingsReportingAttributionModel); - $attributionSettingsAdsWebConversionDataExportScope = AdsWebConversionDataExportScope::ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED; + $attributionSettingsAdsWebConversionDataExportScope = + AdsWebConversionDataExportScope::ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED; $attributionSettings->setAdsWebConversionDataExportScope($attributionSettingsAdsWebConversionDataExportScope); $updateMask = new FieldMask(); $request = (new UpdateAttributionSettingsRequest()) @@ -9111,7 +9466,10 @@ public function updateAttributionSettingsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAttributionSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAttributionSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getAttributionSettings(); $this->assertProtobufEquals($attributionSettings, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -9130,22 +9488,33 @@ public function updateAttributionSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $attributionSettings = new AttributionSettings(); - $attributionSettingsAcquisitionConversionEventLookbackWindow = AcquisitionConversionEventLookbackWindow::ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; - $attributionSettings->setAcquisitionConversionEventLookbackWindow($attributionSettingsAcquisitionConversionEventLookbackWindow); - $attributionSettingsOtherConversionEventLookbackWindow = OtherConversionEventLookbackWindow::OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; - $attributionSettings->setOtherConversionEventLookbackWindow($attributionSettingsOtherConversionEventLookbackWindow); - $attributionSettingsReportingAttributionModel = ReportingAttributionModel::REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED; + $attributionSettingsAcquisitionConversionEventLookbackWindow = + AcquisitionConversionEventLookbackWindow::ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; + $attributionSettings->setAcquisitionConversionEventLookbackWindow( + $attributionSettingsAcquisitionConversionEventLookbackWindow + ); + $attributionSettingsOtherConversionEventLookbackWindow = + OtherConversionEventLookbackWindow::OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED; + $attributionSettings->setOtherConversionEventLookbackWindow( + $attributionSettingsOtherConversionEventLookbackWindow + ); + $attributionSettingsReportingAttributionModel = + ReportingAttributionModel::REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED; $attributionSettings->setReportingAttributionModel($attributionSettingsReportingAttributionModel); - $attributionSettingsAdsWebConversionDataExportScope = AdsWebConversionDataExportScope::ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED; + $attributionSettingsAdsWebConversionDataExportScope = + AdsWebConversionDataExportScope::ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED; $attributionSettings->setAdsWebConversionDataExportScope($attributionSettingsAdsWebConversionDataExportScope); $updateMask = new FieldMask(); $request = (new UpdateAttributionSettingsRequest()) @@ -9196,9 +9565,7 @@ public function updateAudienceTest() $audienceFilterClauses = []; $audience->setFilterClauses($audienceFilterClauses); $updateMask = new FieldMask(); - $request = (new UpdateAudienceRequest()) - ->setAudience($audience) - ->setUpdateMask($updateMask); + $request = (new UpdateAudienceRequest())->setAudience($audience)->setUpdateMask($updateMask); $response = $gapicClient->updateAudience($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -9224,12 +9591,15 @@ public function updateAudienceExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $audience = new Audience(); @@ -9242,9 +9612,7 @@ public function updateAudienceExceptionTest() $audienceFilterClauses = []; $audience->setFilterClauses($audienceFilterClauses); $updateMask = new FieldMask(); - $request = (new UpdateAudienceRequest()) - ->setAudience($audience) - ->setUpdateMask($updateMask); + $request = (new UpdateAudienceRequest())->setAudience($audience)->setUpdateMask($updateMask); try { $gapicClient->updateAudience($request); // If the $gapicClient method call did not throw, fail the test @@ -9288,9 +9656,7 @@ public function updateBigQueryLinkTest() $bigqueryLinkDatasetLocation = 'bigqueryLinkDatasetLocation714488843'; $bigqueryLink->setDatasetLocation($bigqueryLinkDatasetLocation); $updateMask = new FieldMask(); - $request = (new UpdateBigQueryLinkRequest()) - ->setBigqueryLink($bigqueryLink) - ->setUpdateMask($updateMask); + $request = (new UpdateBigQueryLinkRequest())->setBigqueryLink($bigqueryLink)->setUpdateMask($updateMask); $response = $gapicClient->updateBigQueryLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -9316,21 +9682,22 @@ public function updateBigQueryLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $bigqueryLink = new BigQueryLink(); $bigqueryLinkDatasetLocation = 'bigqueryLinkDatasetLocation714488843'; $bigqueryLink->setDatasetLocation($bigqueryLinkDatasetLocation); $updateMask = new FieldMask(); - $request = (new UpdateBigQueryLinkRequest()) - ->setBigqueryLink($bigqueryLink) - ->setUpdateMask($updateMask); + $request = (new UpdateBigQueryLinkRequest())->setBigqueryLink($bigqueryLink)->setUpdateMask($updateMask); try { $gapicClient->updateBigQueryLink($request); // If the $gapicClient method call did not throw, fail the test @@ -9385,7 +9752,10 @@ public function updateCalculatedMetricTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCalculatedMetric', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCalculatedMetric', + $actualFuncCall + ); $actualValue = $actualRequestObject->getCalculatedMetric(); $this->assertProtobufEquals($calculatedMetric, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -9404,12 +9774,15 @@ public function updateCalculatedMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $calculatedMetric = new CalculatedMetric(); @@ -9464,9 +9837,7 @@ public function updateChannelGroupTest() $channelGroupGroupingRule = []; $channelGroup->setGroupingRule($channelGroupGroupingRule); $updateMask = new FieldMask(); - $request = (new UpdateChannelGroupRequest()) - ->setChannelGroup($channelGroup) - ->setUpdateMask($updateMask); + $request = (new UpdateChannelGroupRequest())->setChannelGroup($channelGroup)->setUpdateMask($updateMask); $response = $gapicClient->updateChannelGroup($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -9492,12 +9863,15 @@ public function updateChannelGroupExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $channelGroup = new ChannelGroup(); @@ -9506,9 +9880,7 @@ public function updateChannelGroupExceptionTest() $channelGroupGroupingRule = []; $channelGroup->setGroupingRule($channelGroupGroupingRule); $updateMask = new FieldMask(); - $request = (new UpdateChannelGroupRequest()) - ->setChannelGroup($channelGroup) - ->setUpdateMask($updateMask); + $request = (new UpdateChannelGroupRequest())->setChannelGroup($channelGroup)->setUpdateMask($updateMask); try { $gapicClient->updateChannelGroup($request); // If the $gapicClient method call did not throw, fail the test @@ -9553,7 +9925,10 @@ public function updateConversionEventTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateConversionEvent', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateConversionEvent', + $actualFuncCall + ); $actualValue = $actualRequestObject->getConversionEvent(); $this->assertProtobufEquals($conversionEvent, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -9572,12 +9947,15 @@ public function updateConversionEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $conversionEvent = new ConversionEvent(); @@ -9621,15 +9999,17 @@ public function updateCustomDimensionTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateCustomDimensionRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateCustomDimensionRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateCustomDimension($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomDimension', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomDimension', + $actualFuncCall + ); $actualValue = $actualRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -9646,17 +10026,19 @@ public function updateCustomDimensionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateCustomDimensionRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateCustomDimensionRequest())->setUpdateMask($updateMask); try { $gapicClient->updateCustomDimension($request); // If the $gapicClient method call did not throw, fail the test @@ -9691,8 +10073,7 @@ public function updateCustomMetricTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateCustomMetricRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateCustomMetricRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateCustomMetric($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -9716,17 +10097,19 @@ public function updateCustomMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateCustomMetricRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateCustomMetricRequest())->setUpdateMask($updateMask); try { $gapicClient->updateCustomMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -9769,7 +10152,10 @@ public function updateDataRedactionSettingsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRedactionSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRedactionSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getDataRedactionSettings(); $this->assertProtobufEquals($dataRedactionSettings, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -9788,12 +10174,15 @@ public function updateDataRedactionSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $dataRedactionSettings = new DataRedactionSettings(); @@ -9841,7 +10230,10 @@ public function updateDataRetentionSettingsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRetentionSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRetentionSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getDataRetentionSettings(); $this->assertProtobufEquals($dataRetentionSettings, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -9860,12 +10252,15 @@ public function updateDataRetentionSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $dataRetentionSettings = new DataRetentionSettings(); @@ -9903,8 +10298,7 @@ public function updateDataStreamTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateDataStreamRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateDataStreamRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateDataStream($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -9928,17 +10322,19 @@ public function updateDataStreamExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateDataStreamRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateDataStreamRequest())->setUpdateMask($updateMask); try { $gapicClient->updateDataStream($request); // If the $gapicClient method call did not throw, fail the test @@ -9971,15 +10367,17 @@ public function updateDisplayVideo360AdvertiserLinkTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateDisplayVideo360AdvertiserLinkRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateDisplayVideo360AdvertiserLinkRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateDisplayVideo360AdvertiserLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDisplayVideo360AdvertiserLink', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDisplayVideo360AdvertiserLink', + $actualFuncCall + ); $actualValue = $actualRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -9996,17 +10394,19 @@ public function updateDisplayVideo360AdvertiserLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateDisplayVideo360AdvertiserLinkRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateDisplayVideo360AdvertiserLinkRequest())->setUpdateMask($updateMask); try { $gapicClient->updateDisplayVideo360AdvertiserLink($request); // If the $gapicClient method call did not throw, fail the test @@ -10067,7 +10467,10 @@ public function updateEnhancedMeasurementSettingsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEnhancedMeasurementSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEnhancedMeasurementSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getEnhancedMeasurementSettings(); $this->assertProtobufEquals($enhancedMeasurementSettings, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -10086,12 +10489,15 @@ public function updateEnhancedMeasurementSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $enhancedMeasurementSettings = new EnhancedMeasurementSettings(); @@ -10147,7 +10553,10 @@ public function updateEventCreateRuleTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEventCreateRule', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEventCreateRule', + $actualFuncCall + ); $actualValue = $actualRequestObject->getEventCreateRule(); $this->assertProtobufEquals($eventCreateRule, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -10166,12 +10575,15 @@ public function updateEventCreateRuleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $eventCreateRule = new EventCreateRule(); @@ -10222,9 +10634,7 @@ public function updateEventEditRuleTest() $eventEditRuleParameterMutations = []; $eventEditRule->setParameterMutations($eventEditRuleParameterMutations); $updateMask = new FieldMask(); - $request = (new UpdateEventEditRuleRequest()) - ->setEventEditRule($eventEditRule) - ->setUpdateMask($updateMask); + $request = (new UpdateEventEditRuleRequest())->setEventEditRule($eventEditRule)->setUpdateMask($updateMask); $response = $gapicClient->updateEventEditRule($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -10250,12 +10660,15 @@ public function updateEventEditRuleExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $eventEditRule = new EventEditRule(); @@ -10266,9 +10679,7 @@ public function updateEventEditRuleExceptionTest() $eventEditRuleParameterMutations = []; $eventEditRule->setParameterMutations($eventEditRuleParameterMutations); $updateMask = new FieldMask(); - $request = (new UpdateEventEditRuleRequest()) - ->setEventEditRule($eventEditRule) - ->setUpdateMask($updateMask); + $request = (new UpdateEventEditRuleRequest())->setEventEditRule($eventEditRule)->setUpdateMask($updateMask); try { $gapicClient->updateEventEditRule($request); // If the $gapicClient method call did not throw, fail the test @@ -10313,7 +10724,10 @@ public function updateExpandedDataSetTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateExpandedDataSet', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateExpandedDataSet', + $actualFuncCall + ); $actualValue = $actualRequestObject->getExpandedDataSet(); $this->assertProtobufEquals($expandedDataSet, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -10332,12 +10746,15 @@ public function updateExpandedDataSetExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $expandedDataSet = new ExpandedDataSet(); @@ -10381,8 +10798,7 @@ public function updateGoogleAdsLinkTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateGoogleAdsLinkRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateGoogleAdsLinkRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateGoogleAdsLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -10406,17 +10822,19 @@ public function updateGoogleAdsLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateGoogleAdsLinkRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateGoogleAdsLinkRequest())->setUpdateMask($updateMask); try { $gapicClient->updateGoogleAdsLink($request); // If the $gapicClient method call did not throw, fail the test @@ -10455,7 +10873,10 @@ public function updateGoogleSignalsSettingsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleSignalsSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleSignalsSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getGoogleSignalsSettings(); $this->assertProtobufEquals($googleSignalsSettings, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -10474,12 +10895,15 @@ public function updateGoogleSignalsSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $googleSignalsSettings = new GoogleSignalsSettings(); @@ -10524,9 +10948,7 @@ public function updateKeyEventTest() $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; $keyEvent->setCountingMethod($keyEventCountingMethod); $updateMask = new FieldMask(); - $request = (new UpdateKeyEventRequest()) - ->setKeyEvent($keyEvent) - ->setUpdateMask($updateMask); + $request = (new UpdateKeyEventRequest())->setKeyEvent($keyEvent)->setUpdateMask($updateMask); $response = $gapicClient->updateKeyEvent($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -10552,21 +10974,22 @@ public function updateKeyEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $keyEvent = new KeyEvent(); $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; $keyEvent->setCountingMethod($keyEventCountingMethod); $updateMask = new FieldMask(); - $request = (new UpdateKeyEventRequest()) - ->setKeyEvent($keyEvent) - ->setUpdateMask($updateMask); + $request = (new UpdateKeyEventRequest())->setKeyEvent($keyEvent)->setUpdateMask($updateMask); try { $gapicClient->updateKeyEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -10611,7 +11034,10 @@ public function updateMeasurementProtocolSecretTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateMeasurementProtocolSecret', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateMeasurementProtocolSecret', + $actualFuncCall + ); $actualValue = $actualRequestObject->getMeasurementProtocolSecret(); $this->assertProtobufEquals($measurementProtocolSecret, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -10630,12 +11056,15 @@ public function updateMeasurementProtocolSecretExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $measurementProtocolSecret = new MeasurementProtocolSecret(); @@ -10688,9 +11117,7 @@ public function updatePropertyTest() $propertyTimeZone = 'propertyTimeZone-1600366322'; $property->setTimeZone($propertyTimeZone); $updateMask = new FieldMask(); - $request = (new UpdatePropertyRequest()) - ->setProperty($property) - ->setUpdateMask($updateMask); + $request = (new UpdatePropertyRequest())->setProperty($property)->setUpdateMask($updateMask); $response = $gapicClient->updateProperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -10716,12 +11143,15 @@ public function updatePropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $property = new Property(); @@ -10730,9 +11160,7 @@ public function updatePropertyExceptionTest() $propertyTimeZone = 'propertyTimeZone-1600366322'; $property->setTimeZone($propertyTimeZone); $updateMask = new FieldMask(); - $request = (new UpdatePropertyRequest()) - ->setProperty($property) - ->setUpdateMask($updateMask); + $request = (new UpdatePropertyRequest())->setProperty($property)->setUpdateMask($updateMask); try { $gapicClient->updateProperty($request); // If the $gapicClient method call did not throw, fail the test @@ -10775,7 +11203,10 @@ public function updateSKAdNetworkConversionValueSchemaTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSKAdNetworkConversionValueSchema', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSKAdNetworkConversionValueSchema', + $actualFuncCall + ); $actualValue = $actualRequestObject->getSkadnetworkConversionValueSchema(); $this->assertProtobufEquals($skadnetworkConversionValueSchema, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -10794,12 +11225,15 @@ public function updateSKAdNetworkConversionValueSchemaExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $skadnetworkConversionValueSchema = new SKAdNetworkConversionValueSchema(); @@ -10841,15 +11275,17 @@ public function updateSearchAds360LinkTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateSearchAds360LinkRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateSearchAds360LinkRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateSearchAds360Link($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSearchAds360Link', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSearchAds360Link', + $actualFuncCall + ); $actualValue = $actualRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -10866,17 +11302,19 @@ public function updateSearchAds360LinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateSearchAds360LinkRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateSearchAds360LinkRequest())->setUpdateMask($updateMask); try { $gapicClient->updateSearchAds360Link($request); // If the $gapicClient method call did not throw, fail the test @@ -10919,7 +11357,10 @@ public function updateSubpropertyEventFilterTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSubpropertyEventFilter', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSubpropertyEventFilter', + $actualFuncCall + ); $actualValue = $actualRequestObject->getSubpropertyEventFilter(); $this->assertProtobufEquals($subpropertyEventFilter, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -10938,12 +11379,15 @@ public function updateSubpropertyEventFilterExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $subpropertyEventFilter = new SubpropertyEventFilter(); @@ -10989,7 +11433,10 @@ public function acknowledgeUserDataCollectionAsyncTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection', + $actualFuncCall + ); $actualValue = $actualRequestObject->getProperty(); $this->assertProtobufEquals($formattedProperty, $actualValue); $actualValue = $actualRequestObject->getAcknowledgement(); diff --git a/AnalyticsAdmin/tests/Unit/V1beta/AnalyticsAdminServiceClientTest.php b/AnalyticsAdmin/tests/Unit/V1beta/AnalyticsAdminServiceClientTest.php deleted file mode 100644 index 668c29e124b6..000000000000 --- a/AnalyticsAdmin/tests/Unit/V1beta/AnalyticsAdminServiceClientTest.php +++ /dev/null @@ -1,3687 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AnalyticsAdminServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AnalyticsAdminServiceClient($options); - } - - /** @test */ - public function acknowledgeUserDataCollectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AcknowledgeUserDataCollectionResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); - $acknowledgement = 'acknowledgement1769490938'; - $response = $gapicClient->acknowledgeUserDataCollection($formattedProperty, $acknowledgement); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/AcknowledgeUserDataCollection', $actualFuncCall); - $actualValue = $actualRequestObject->getProperty(); - $this->assertProtobufEquals($formattedProperty, $actualValue); - $actualValue = $actualRequestObject->getAcknowledgement(); - $this->assertProtobufEquals($acknowledgement, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function acknowledgeUserDataCollectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); - $acknowledgement = 'acknowledgement1769490938'; - try { - $gapicClient->acknowledgeUserDataCollection($formattedProperty, $acknowledgement); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveCustomDimensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $gapicClient->archiveCustomDimension($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ArchiveCustomDimension', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveCustomDimensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - try { - $gapicClient->archiveCustomDimension($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveCustomMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $gapicClient->archiveCustomMetric($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ArchiveCustomMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function archiveCustomMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - try { - $gapicClient->archiveCustomMetric($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConversionEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new ConversionEvent(); - $expectedResponse->setName($name); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $conversionEvent = new ConversionEvent(); - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->createConversionEvent($conversionEvent, $formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateConversionEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getConversionEvent(); - $this->assertProtobufEquals($conversionEvent, $actualValue); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConversionEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $conversionEvent = new ConversionEvent(); - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->createConversionEvent($conversionEvent, $formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomDimensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $disallowAdsPersonalization = false; - $expectedResponse = new CustomDimension(); - $expectedResponse->setName($name); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setDisallowAdsPersonalization($disallowAdsPersonalization); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $customDimension = new CustomDimension(); - $customDimensionParameterName = 'customDimensionParameterName-405505313'; - $customDimension->setParameterName($customDimensionParameterName); - $customDimensionDisplayName = 'customDimensionDisplayName2102948408'; - $customDimension->setDisplayName($customDimensionDisplayName); - $customDimensionScope = DimensionScope::DIMENSION_SCOPE_UNSPECIFIED; - $customDimension->setScope($customDimensionScope); - $response = $gapicClient->createCustomDimension($formattedParent, $customDimension); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateCustomDimension', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCustomDimension(); - $this->assertProtobufEquals($customDimension, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomDimensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $customDimension = new CustomDimension(); - $customDimensionParameterName = 'customDimensionParameterName-405505313'; - $customDimension->setParameterName($customDimensionParameterName); - $customDimensionDisplayName = 'customDimensionDisplayName2102948408'; - $customDimension->setDisplayName($customDimensionDisplayName); - $customDimensionScope = DimensionScope::DIMENSION_SCOPE_UNSPECIFIED; - $customDimension->setScope($customDimensionScope); - try { - $gapicClient->createCustomDimension($formattedParent, $customDimension); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomMetric(); - $expectedResponse->setName($name); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $customMetric = new CustomMetric(); - $customMetricParameterName = 'customMetricParameterName1627167443'; - $customMetric->setParameterName($customMetricParameterName); - $customMetricDisplayName = 'customMetricDisplayName-835715284'; - $customMetric->setDisplayName($customMetricDisplayName); - $customMetricMeasurementUnit = MeasurementUnit::MEASUREMENT_UNIT_UNSPECIFIED; - $customMetric->setMeasurementUnit($customMetricMeasurementUnit); - $customMetricScope = MetricScope::METRIC_SCOPE_UNSPECIFIED; - $customMetric->setScope($customMetricScope); - $response = $gapicClient->createCustomMetric($formattedParent, $customMetric); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateCustomMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCustomMetric(); - $this->assertProtobufEquals($customMetric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $customMetric = new CustomMetric(); - $customMetricParameterName = 'customMetricParameterName1627167443'; - $customMetric->setParameterName($customMetricParameterName); - $customMetricDisplayName = 'customMetricDisplayName-835715284'; - $customMetric->setDisplayName($customMetricDisplayName); - $customMetricMeasurementUnit = MeasurementUnit::MEASUREMENT_UNIT_UNSPECIFIED; - $customMetric->setMeasurementUnit($customMetricMeasurementUnit); - $customMetricScope = MetricScope::METRIC_SCOPE_UNSPECIFIED; - $customMetric->setScope($customMetricScope); - try { - $gapicClient->createCustomMetric($formattedParent, $customMetric); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataStream(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $dataStream = new DataStream(); - $dataStreamType = DataStreamType::DATA_STREAM_TYPE_UNSPECIFIED; - $dataStream->setType($dataStreamType); - $response = $gapicClient->createDataStream($formattedParent, $dataStream); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateDataStream', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataStream(); - $this->assertProtobufEquals($dataStream, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $dataStream = new DataStream(); - $dataStreamType = DataStreamType::DATA_STREAM_TYPE_UNSPECIFIED; - $dataStream->setType($dataStreamType); - try { - $gapicClient->createDataStream($formattedParent, $dataStream); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFirebaseLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $project = 'project-309310695'; - $expectedResponse = new FirebaseLink(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $firebaseLink = new FirebaseLink(); - $response = $gapicClient->createFirebaseLink($formattedParent, $firebaseLink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateFirebaseLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFirebaseLink(); - $this->assertProtobufEquals($firebaseLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFirebaseLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $firebaseLink = new FirebaseLink(); - try { - $gapicClient->createFirebaseLink($formattedParent, $firebaseLink); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGoogleAdsLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $customerId = 'customerId-1772061412'; - $canManageClients = false; - $creatorEmailAddress = 'creatorEmailAddress-1491810434'; - $expectedResponse = new GoogleAdsLink(); - $expectedResponse->setName($name); - $expectedResponse->setCustomerId($customerId); - $expectedResponse->setCanManageClients($canManageClients); - $expectedResponse->setCreatorEmailAddress($creatorEmailAddress); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $googleAdsLink = new GoogleAdsLink(); - $response = $gapicClient->createGoogleAdsLink($formattedParent, $googleAdsLink); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateGoogleAdsLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGoogleAdsLink(); - $this->assertProtobufEquals($googleAdsLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGoogleAdsLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $googleAdsLink = new GoogleAdsLink(); - try { - $gapicClient->createGoogleAdsLink($formattedParent, $googleAdsLink); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new KeyEvent(); - $expectedResponse->setName($name); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $keyEvent = new KeyEvent(); - $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; - $keyEvent->setCountingMethod($keyEventCountingMethod); - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->createKeyEvent($keyEvent, $formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateKeyEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getKeyEvent(); - $this->assertProtobufEquals($keyEvent, $actualValue); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $keyEvent = new KeyEvent(); - $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; - $keyEvent->setCountingMethod($keyEventCountingMethod); - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->createKeyEvent($keyEvent, $formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMeasurementProtocolSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $secretValue = 'secretValue1322942242'; - $expectedResponse = new MeasurementProtocolSecret(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSecretValue($secretValue); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $measurementProtocolSecret = new MeasurementProtocolSecret(); - $measurementProtocolSecretDisplayName = 'measurementProtocolSecretDisplayName1279116681'; - $measurementProtocolSecret->setDisplayName($measurementProtocolSecretDisplayName); - $response = $gapicClient->createMeasurementProtocolSecret($formattedParent, $measurementProtocolSecret); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateMeasurementProtocolSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMeasurementProtocolSecret(); - $this->assertProtobufEquals($measurementProtocolSecret, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMeasurementProtocolSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $measurementProtocolSecret = new MeasurementProtocolSecret(); - $measurementProtocolSecretDisplayName = 'measurementProtocolSecretDisplayName1279116681'; - $measurementProtocolSecret->setDisplayName($measurementProtocolSecretDisplayName); - try { - $gapicClient->createMeasurementProtocolSecret($formattedParent, $measurementProtocolSecret); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $timeZone = 'timeZone36848094'; - $currencyCode = 'currencyCode1108728155'; - $account = 'account-1177318867'; - $expectedResponse = new Property(); - $expectedResponse->setName($name); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setCurrencyCode($currencyCode); - $expectedResponse->setAccount($account); - $transport->addResponse($expectedResponse); - // Mock request - $property = new Property(); - $propertyDisplayName = 'propertyDisplayName-1254483624'; - $property->setDisplayName($propertyDisplayName); - $propertyTimeZone = 'propertyTimeZone-1600366322'; - $property->setTimeZone($propertyTimeZone); - $response = $gapicClient->createProperty($property); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateProperty', $actualFuncCall); - $actualValue = $actualRequestObject->getProperty(); - $this->assertProtobufEquals($property, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $property = new Property(); - $propertyDisplayName = 'propertyDisplayName-1254483624'; - $property->setDisplayName($propertyDisplayName); - $propertyTimeZone = 'propertyTimeZone-1600366322'; - $property->setTimeZone($propertyTimeZone); - try { - $gapicClient->createProperty($property); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $gapicClient->deleteAccount($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->accountName('[ACCOUNT]'); - try { - $gapicClient->deleteAccount($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConversionEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $gapicClient->deleteConversionEvent($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteConversionEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConversionEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - try { - $gapicClient->deleteConversionEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $gapicClient->deleteDataStream($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteDataStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->deleteDataStream($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFirebaseLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - $gapicClient->deleteFirebaseLink($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteFirebaseLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFirebaseLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - try { - $gapicClient->deleteFirebaseLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGoogleAdsLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - $gapicClient->deleteGoogleAdsLink($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteGoogleAdsLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGoogleAdsLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - try { - $gapicClient->deleteGoogleAdsLink($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteKeyEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $gapicClient->deleteKeyEvent($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteKeyEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteKeyEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - try { - $gapicClient->deleteKeyEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMeasurementProtocolSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $gapicClient->deleteMeasurementProtocolSecret($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteMeasurementProtocolSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMeasurementProtocolSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - try { - $gapicClient->deleteMeasurementProtocolSecret($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $timeZone = 'timeZone36848094'; - $currencyCode = 'currencyCode1108728155'; - $account = 'account-1177318867'; - $expectedResponse = new Property(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setCurrencyCode($currencyCode); - $expectedResponse->setAccount($account); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->deleteProperty($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteProperty', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->deleteProperty($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $regionCode = 'regionCode-1566082984'; - $deleted = false; - $gmpOrganization = 'gmpOrganization-1643573496'; - $expectedResponse = new Account(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRegionCode($regionCode); - $expectedResponse->setDeleted($deleted); - $expectedResponse->setGmpOrganization($gmpOrganization); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $response = $gapicClient->getAccount($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->accountName('[ACCOUNT]'); - try { - $gapicClient->getAccount($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversionEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new ConversionEvent(); - $expectedResponse->setName($name2); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $response = $gapicClient->getConversionEvent($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetConversionEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConversionEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - try { - $gapicClient->getConversionEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomDimensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $disallowAdsPersonalization = false; - $expectedResponse = new CustomDimension(); - $expectedResponse->setName($name2); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setDisallowAdsPersonalization($disallowAdsPersonalization); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $response = $gapicClient->getCustomDimension($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetCustomDimension', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomDimensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - try { - $gapicClient->getCustomDimension($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomMetric(); - $expectedResponse->setName($name2); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $response = $gapicClient->getCustomMetric($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetCustomMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - try { - $gapicClient->getCustomMetric($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataRetentionSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $resetUserDataOnNewActivity = false; - $expectedResponse = new DataRetentionSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setResetUserDataOnNewActivity($resetUserDataOnNewActivity); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataRetentionSettingsName('[PROPERTY]'); - $response = $gapicClient->getDataRetentionSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetDataRetentionSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataRetentionSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataRetentionSettingsName('[PROPERTY]'); - try { - $gapicClient->getDataRetentionSettings($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataSharingSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sharingWithGoogleSupportEnabled = false; - $sharingWithGoogleAssignedSalesEnabled = false; - $sharingWithGoogleAnySalesEnabled = false; - $sharingWithGoogleProductsEnabled = true; - $sharingWithOthersEnabled = false; - $expectedResponse = new DataSharingSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setSharingWithGoogleSupportEnabled($sharingWithGoogleSupportEnabled); - $expectedResponse->setSharingWithGoogleAssignedSalesEnabled($sharingWithGoogleAssignedSalesEnabled); - $expectedResponse->setSharingWithGoogleAnySalesEnabled($sharingWithGoogleAnySalesEnabled); - $expectedResponse->setSharingWithGoogleProductsEnabled($sharingWithGoogleProductsEnabled); - $expectedResponse->setSharingWithOthersEnabled($sharingWithOthersEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataSharingSettingsName('[ACCOUNT]'); - $response = $gapicClient->getDataSharingSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetDataSharingSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataSharingSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataSharingSettingsName('[ACCOUNT]'); - try { - $gapicClient->getDataSharingSettings($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataStream(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->getDataStream($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetDataStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->getDataStream($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new KeyEvent(); - $expectedResponse->setName($name2); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $response = $gapicClient->getKeyEvent($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetKeyEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - try { - $gapicClient->getKeyEvent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMeasurementProtocolSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $secretValue = 'secretValue1322942242'; - $expectedResponse = new MeasurementProtocolSecret(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSecretValue($secretValue); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $response = $gapicClient->getMeasurementProtocolSecret($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetMeasurementProtocolSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMeasurementProtocolSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - try { - $gapicClient->getMeasurementProtocolSecret($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $timeZone = 'timeZone36848094'; - $currencyCode = 'currencyCode1108728155'; - $account = 'account-1177318867'; - $expectedResponse = new Property(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setCurrencyCode($currencyCode); - $expectedResponse->setAccount($account); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->getProperty($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetProperty', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->getProperty($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccountSummariesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $accountSummariesElement = new AccountSummary(); - $accountSummaries = [ - $accountSummariesElement, - ]; - $expectedResponse = new ListAccountSummariesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAccountSummaries($accountSummaries); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listAccountSummaries(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAccountSummaries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListAccountSummaries', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccountSummariesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listAccountSummaries(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccountsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $accountsElement = new Account(); - $accounts = [ - $accountsElement, - ]; - $expectedResponse = new ListAccountsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAccounts($accounts); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listAccounts(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAccounts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListAccounts', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAccountsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listAccounts(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversionEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $conversionEventsElement = new ConversionEvent(); - $conversionEvents = [ - $conversionEventsElement, - ]; - $expectedResponse = new ListConversionEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConversionEvents($conversionEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listConversionEvents($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConversionEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListConversionEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConversionEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listConversionEvents($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomDimensionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $customDimensionsElement = new CustomDimension(); - $customDimensions = [ - $customDimensionsElement, - ]; - $expectedResponse = new ListCustomDimensionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCustomDimensions($customDimensions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listCustomDimensions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCustomDimensions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListCustomDimensions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomDimensionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listCustomDimensions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomMetricsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $customMetricsElement = new CustomMetric(); - $customMetrics = [ - $customMetricsElement, - ]; - $expectedResponse = new ListCustomMetricsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCustomMetrics($customMetrics); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listCustomMetrics($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCustomMetrics()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListCustomMetrics', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomMetricsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listCustomMetrics($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataStreamsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataStreamsElement = new DataStream(); - $dataStreams = [ - $dataStreamsElement, - ]; - $expectedResponse = new ListDataStreamsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataStreams($dataStreams); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listDataStreams($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataStreams()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListDataStreams', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataStreamsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listDataStreams($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFirebaseLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $firebaseLinksElement = new FirebaseLink(); - $firebaseLinks = [ - $firebaseLinksElement, - ]; - $expectedResponse = new ListFirebaseLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFirebaseLinks($firebaseLinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listFirebaseLinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFirebaseLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListFirebaseLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFirebaseLinksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listFirebaseLinks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGoogleAdsLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $googleAdsLinksElement = new GoogleAdsLink(); - $googleAdsLinks = [ - $googleAdsLinksElement, - ]; - $expectedResponse = new ListGoogleAdsLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGoogleAdsLinks($googleAdsLinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listGoogleAdsLinks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGoogleAdsLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListGoogleAdsLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGoogleAdsLinksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listGoogleAdsLinks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeyEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $keyEventsElement = new KeyEvent(); - $keyEvents = [ - $keyEventsElement, - ]; - $expectedResponse = new ListKeyEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setKeyEvents($keyEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $response = $gapicClient->listKeyEvents($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getKeyEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListKeyEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeyEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - try { - $gapicClient->listKeyEvents($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMeasurementProtocolSecretsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $measurementProtocolSecretsElement = new MeasurementProtocolSecret(); - $measurementProtocolSecrets = [ - $measurementProtocolSecretsElement, - ]; - $expectedResponse = new ListMeasurementProtocolSecretsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMeasurementProtocolSecrets($measurementProtocolSecrets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $response = $gapicClient->listMeasurementProtocolSecrets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMeasurementProtocolSecrets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListMeasurementProtocolSecrets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMeasurementProtocolSecretsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - try { - $gapicClient->listMeasurementProtocolSecrets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPropertiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $propertiesElement = new Property(); - $properties = [ - $propertiesElement, - ]; - $expectedResponse = new ListPropertiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProperties($properties); - $transport->addResponse($expectedResponse); - // Mock request - $filter = 'filter-1274492040'; - $response = $gapicClient->listProperties($filter); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProperties()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListProperties', $actualFuncCall); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPropertiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $filter = 'filter-1274492040'; - try { - $gapicClient->listProperties($filter); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function provisionAccountTicketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accountTicketId = 'accountTicketId-442102884'; - $expectedResponse = new ProvisionAccountTicketResponse(); - $expectedResponse->setAccountTicketId($accountTicketId); - $transport->addResponse($expectedResponse); - $response = $gapicClient->provisionAccountTicket(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ProvisionAccountTicket', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function provisionAccountTicketExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->provisionAccountTicket(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAccessReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $rowCount = 1340416618; - $expectedResponse = new RunAccessReportResponse(); - $expectedResponse->setRowCount($rowCount); - $transport->addResponse($expectedResponse); - $response = $gapicClient->runAccessReport(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/RunAccessReport', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAccessReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->runAccessReport(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchChangeHistoryEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $changeHistoryEventsElement = new ChangeHistoryEvent(); - $changeHistoryEvents = [ - $changeHistoryEventsElement, - ]; - $expectedResponse = new SearchChangeHistoryEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChangeHistoryEvents($changeHistoryEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedAccount = $gapicClient->accountName('[ACCOUNT]'); - $response = $gapicClient->searchChangeHistoryEvents($formattedAccount); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChangeHistoryEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/SearchChangeHistoryEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getAccount(); - $this->assertProtobufEquals($formattedAccount, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchChangeHistoryEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedAccount = $gapicClient->accountName('[ACCOUNT]'); - try { - $gapicClient->searchChangeHistoryEvents($formattedAccount); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $regionCode = 'regionCode-1566082984'; - $deleted = false; - $gmpOrganization = 'gmpOrganization-1643573496'; - $expectedResponse = new Account(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRegionCode($regionCode); - $expectedResponse->setDeleted($deleted); - $expectedResponse->setGmpOrganization($gmpOrganization); - $transport->addResponse($expectedResponse); - // Mock request - $account = new Account(); - $accountDisplayName = 'accountDisplayName-616446464'; - $account->setDisplayName($accountDisplayName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAccount($account, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getAccount(); - $this->assertProtobufEquals($account, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $account = new Account(); - $accountDisplayName = 'accountDisplayName-616446464'; - $account->setDisplayName($accountDisplayName); - $updateMask = new FieldMask(); - try { - $gapicClient->updateAccount($account, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateConversionEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new ConversionEvent(); - $expectedResponse->setName($name); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $conversionEvent = new ConversionEvent(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateConversionEvent($conversionEvent, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateConversionEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getConversionEvent(); - $this->assertProtobufEquals($conversionEvent, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateConversionEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $conversionEvent = new ConversionEvent(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateConversionEvent($conversionEvent, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomDimensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $disallowAdsPersonalization = false; - $expectedResponse = new CustomDimension(); - $expectedResponse->setName($name); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setDisallowAdsPersonalization($disallowAdsPersonalization); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateCustomDimension($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateCustomDimension', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomDimensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateCustomDimension($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parameterName = 'parameterName1133142369'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomMetric(); - $expectedResponse->setName($name); - $expectedResponse->setParameterName($parameterName); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateCustomMetric($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateCustomMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomMetricExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateCustomMetric($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataRetentionSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $resetUserDataOnNewActivity = false; - $expectedResponse = new DataRetentionSettings(); - $expectedResponse->setName($name); - $expectedResponse->setResetUserDataOnNewActivity($resetUserDataOnNewActivity); - $transport->addResponse($expectedResponse); - // Mock request - $dataRetentionSettings = new DataRetentionSettings(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateDataRetentionSettings($dataRetentionSettings, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateDataRetentionSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getDataRetentionSettings(); - $this->assertProtobufEquals($dataRetentionSettings, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataRetentionSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $dataRetentionSettings = new DataRetentionSettings(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateDataRetentionSettings($dataRetentionSettings, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataStream(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateDataStream($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateDataStream', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateDataStream($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGoogleAdsLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $customerId = 'customerId-1772061412'; - $canManageClients = false; - $creatorEmailAddress = 'creatorEmailAddress-1491810434'; - $expectedResponse = new GoogleAdsLink(); - $expectedResponse->setName($name); - $expectedResponse->setCustomerId($customerId); - $expectedResponse->setCanManageClients($canManageClients); - $expectedResponse->setCreatorEmailAddress($creatorEmailAddress); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateGoogleAdsLink($updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateGoogleAdsLink', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGoogleAdsLinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - try { - $gapicClient->updateGoogleAdsLink($updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateKeyEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $eventName = 'eventName984174864'; - $deletable = true; - $custom = false; - $expectedResponse = new KeyEvent(); - $expectedResponse->setName($name); - $expectedResponse->setEventName($eventName); - $expectedResponse->setDeletable($deletable); - $expectedResponse->setCustom($custom); - $transport->addResponse($expectedResponse); - // Mock request - $keyEvent = new KeyEvent(); - $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; - $keyEvent->setCountingMethod($keyEventCountingMethod); - $updateMask = new FieldMask(); - $response = $gapicClient->updateKeyEvent($keyEvent, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateKeyEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getKeyEvent(); - $this->assertProtobufEquals($keyEvent, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateKeyEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $keyEvent = new KeyEvent(); - $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; - $keyEvent->setCountingMethod($keyEventCountingMethod); - $updateMask = new FieldMask(); - try { - $gapicClient->updateKeyEvent($keyEvent, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateMeasurementProtocolSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $secretValue = 'secretValue1322942242'; - $expectedResponse = new MeasurementProtocolSecret(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSecretValue($secretValue); - $transport->addResponse($expectedResponse); - // Mock request - $measurementProtocolSecret = new MeasurementProtocolSecret(); - $measurementProtocolSecretDisplayName = 'measurementProtocolSecretDisplayName1279116681'; - $measurementProtocolSecret->setDisplayName($measurementProtocolSecretDisplayName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateMeasurementProtocolSecret($measurementProtocolSecret, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateMeasurementProtocolSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getMeasurementProtocolSecret(); - $this->assertProtobufEquals($measurementProtocolSecret, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateMeasurementProtocolSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $measurementProtocolSecret = new MeasurementProtocolSecret(); - $measurementProtocolSecretDisplayName = 'measurementProtocolSecretDisplayName1279116681'; - $measurementProtocolSecret->setDisplayName($measurementProtocolSecretDisplayName); - $updateMask = new FieldMask(); - try { - $gapicClient->updateMeasurementProtocolSecret($measurementProtocolSecret, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePropertyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parent = 'parent-995424086'; - $displayName = 'displayName1615086568'; - $timeZone = 'timeZone36848094'; - $currencyCode = 'currencyCode1108728155'; - $account = 'account-1177318867'; - $expectedResponse = new Property(); - $expectedResponse->setName($name); - $expectedResponse->setParent($parent); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setCurrencyCode($currencyCode); - $expectedResponse->setAccount($account); - $transport->addResponse($expectedResponse); - // Mock request - $property = new Property(); - $propertyDisplayName = 'propertyDisplayName-1254483624'; - $property->setDisplayName($propertyDisplayName); - $propertyTimeZone = 'propertyTimeZone-1600366322'; - $property->setTimeZone($propertyTimeZone); - $updateMask = new FieldMask(); - $response = $gapicClient->updateProperty($property, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateProperty', $actualFuncCall); - $actualValue = $actualRequestObject->getProperty(); - $this->assertProtobufEquals($property, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePropertyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $property = new Property(); - $propertyDisplayName = 'propertyDisplayName-1254483624'; - $property->setDisplayName($propertyDisplayName); - $propertyTimeZone = 'propertyTimeZone-1600366322'; - $property->setTimeZone($propertyTimeZone); - $updateMask = new FieldMask(); - try { - $gapicClient->updateProperty($property, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/AnalyticsAdmin/tests/Unit/V1beta/Client/AnalyticsAdminServiceClientTest.php b/AnalyticsAdmin/tests/Unit/V1beta/Client/AnalyticsAdminServiceClientTest.php index 1e0ea8704ea9..9d5650248dc6 100644 --- a/AnalyticsAdmin/tests/Unit/V1beta/Client/AnalyticsAdminServiceClientTest.php +++ b/AnalyticsAdmin/tests/Unit/V1beta/Client/AnalyticsAdminServiceClientTest.php @@ -1,6 +1,6 @@ getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); } /** @return AnalyticsAdminServiceClient */ @@ -171,7 +173,10 @@ public function acknowledgeUserDataCollectionTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/AcknowledgeUserDataCollection', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/AcknowledgeUserDataCollection', + $actualFuncCall + ); $actualValue = $actualRequestObject->getProperty(); $this->assertProtobufEquals($formattedProperty, $actualValue); $actualValue = $actualRequestObject->getAcknowledgement(); @@ -190,12 +195,15 @@ public function acknowledgeUserDataCollectionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedProperty = $gapicClient->propertyName('[PROPERTY]'); @@ -229,14 +237,16 @@ public function archiveCustomDimensionTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $request = (new ArchiveCustomDimensionRequest()) - ->setName($formattedName); + $request = (new ArchiveCustomDimensionRequest())->setName($formattedName); $gapicClient->archiveCustomDimension($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ArchiveCustomDimension', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/ArchiveCustomDimension', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -253,17 +263,19 @@ public function archiveCustomDimensionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $request = (new ArchiveCustomDimensionRequest()) - ->setName($formattedName); + $request = (new ArchiveCustomDimensionRequest())->setName($formattedName); try { $gapicClient->archiveCustomDimension($request); // If the $gapicClient method call did not throw, fail the test @@ -290,8 +302,7 @@ public function archiveCustomMetricTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $request = (new ArchiveCustomMetricRequest()) - ->setName($formattedName); + $request = (new ArchiveCustomMetricRequest())->setName($formattedName); $gapicClient->archiveCustomMetric($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -314,17 +325,19 @@ public function archiveCustomMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $request = (new ArchiveCustomMetricRequest()) - ->setName($formattedName); + $request = (new ArchiveCustomMetricRequest())->setName($formattedName); try { $gapicClient->archiveCustomMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -369,7 +382,10 @@ public function createConversionEventTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateConversionEvent', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/CreateConversionEvent', + $actualFuncCall + ); $actualValue = $actualRequestObject->getConversionEvent(); $this->assertProtobufEquals($conversionEvent, $actualValue); $actualValue = $actualRequestObject->getParent(); @@ -388,12 +404,15 @@ public function createConversionEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $conversionEvent = new ConversionEvent(); @@ -453,7 +472,10 @@ public function createCustomDimensionTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateCustomDimension', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/CreateCustomDimension', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getCustomDimension(); @@ -472,12 +494,15 @@ public function createCustomDimensionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -534,9 +559,7 @@ public function createCustomMetricTest() $customMetric->setMeasurementUnit($customMetricMeasurementUnit); $customMetricScope = MetricScope::METRIC_SCOPE_UNSPECIFIED; $customMetric->setScope($customMetricScope); - $request = (new CreateCustomMetricRequest()) - ->setParent($formattedParent) - ->setCustomMetric($customMetric); + $request = (new CreateCustomMetricRequest())->setParent($formattedParent)->setCustomMetric($customMetric); $response = $gapicClient->createCustomMetric($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -562,12 +585,15 @@ public function createCustomMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); @@ -580,9 +606,7 @@ public function createCustomMetricExceptionTest() $customMetric->setMeasurementUnit($customMetricMeasurementUnit); $customMetricScope = MetricScope::METRIC_SCOPE_UNSPECIFIED; $customMetric->setScope($customMetricScope); - $request = (new CreateCustomMetricRequest()) - ->setParent($formattedParent) - ->setCustomMetric($customMetric); + $request = (new CreateCustomMetricRequest())->setParent($formattedParent)->setCustomMetric($customMetric); try { $gapicClient->createCustomMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -616,9 +640,7 @@ public function createDataStreamTest() $dataStream = new DataStream(); $dataStreamType = DataStreamType::DATA_STREAM_TYPE_UNSPECIFIED; $dataStream->setType($dataStreamType); - $request = (new CreateDataStreamRequest()) - ->setParent($formattedParent) - ->setDataStream($dataStream); + $request = (new CreateDataStreamRequest())->setParent($formattedParent)->setDataStream($dataStream); $response = $gapicClient->createDataStream($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -644,21 +666,22 @@ public function createDataStreamExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $dataStream = new DataStream(); $dataStreamType = DataStreamType::DATA_STREAM_TYPE_UNSPECIFIED; $dataStream->setType($dataStreamType); - $request = (new CreateDataStreamRequest()) - ->setParent($formattedParent) - ->setDataStream($dataStream); + $request = (new CreateDataStreamRequest())->setParent($formattedParent)->setDataStream($dataStream); try { $gapicClient->createDataStream($request); // If the $gapicClient method call did not throw, fail the test @@ -690,9 +713,7 @@ public function createFirebaseLinkTest() // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $firebaseLink = new FirebaseLink(); - $request = (new CreateFirebaseLinkRequest()) - ->setParent($formattedParent) - ->setFirebaseLink($firebaseLink); + $request = (new CreateFirebaseLinkRequest())->setParent($formattedParent)->setFirebaseLink($firebaseLink); $response = $gapicClient->createFirebaseLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -718,19 +739,20 @@ public function createFirebaseLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $firebaseLink = new FirebaseLink(); - $request = (new CreateFirebaseLinkRequest()) - ->setParent($formattedParent) - ->setFirebaseLink($firebaseLink); + $request = (new CreateFirebaseLinkRequest())->setParent($formattedParent)->setFirebaseLink($firebaseLink); try { $gapicClient->createFirebaseLink($request); // If the $gapicClient method call did not throw, fail the test @@ -766,9 +788,7 @@ public function createGoogleAdsLinkTest() // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $googleAdsLink = new GoogleAdsLink(); - $request = (new CreateGoogleAdsLinkRequest()) - ->setParent($formattedParent) - ->setGoogleAdsLink($googleAdsLink); + $request = (new CreateGoogleAdsLinkRequest())->setParent($formattedParent)->setGoogleAdsLink($googleAdsLink); $response = $gapicClient->createGoogleAdsLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -794,19 +814,20 @@ public function createGoogleAdsLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); $googleAdsLink = new GoogleAdsLink(); - $request = (new CreateGoogleAdsLinkRequest()) - ->setParent($formattedParent) - ->setGoogleAdsLink($googleAdsLink); + $request = (new CreateGoogleAdsLinkRequest())->setParent($formattedParent)->setGoogleAdsLink($googleAdsLink); try { $gapicClient->createGoogleAdsLink($request); // If the $gapicClient method call did not throw, fail the test @@ -844,9 +865,7 @@ public function createKeyEventTest() $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; $keyEvent->setCountingMethod($keyEventCountingMethod); $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new CreateKeyEventRequest()) - ->setKeyEvent($keyEvent) - ->setParent($formattedParent); + $request = (new CreateKeyEventRequest())->setKeyEvent($keyEvent)->setParent($formattedParent); $response = $gapicClient->createKeyEvent($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -872,21 +891,22 @@ public function createKeyEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $keyEvent = new KeyEvent(); $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; $keyEvent->setCountingMethod($keyEventCountingMethod); $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new CreateKeyEventRequest()) - ->setKeyEvent($keyEvent) - ->setParent($formattedParent); + $request = (new CreateKeyEventRequest())->setKeyEvent($keyEvent)->setParent($formattedParent); try { $gapicClient->createKeyEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -931,7 +951,10 @@ public function createMeasurementProtocolSecretTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/CreateMeasurementProtocolSecret', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/CreateMeasurementProtocolSecret', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getMeasurementProtocolSecret(); @@ -950,12 +973,15 @@ public function createMeasurementProtocolSecretExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); @@ -1007,8 +1033,7 @@ public function createPropertyTest() $property->setDisplayName($propertyDisplayName); $propertyTimeZone = 'propertyTimeZone-1600366322'; $property->setTimeZone($propertyTimeZone); - $request = (new CreatePropertyRequest()) - ->setProperty($property); + $request = (new CreatePropertyRequest())->setProperty($property); $response = $gapicClient->createProperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1032,12 +1057,15 @@ public function createPropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $property = new Property(); @@ -1045,8 +1073,7 @@ public function createPropertyExceptionTest() $property->setDisplayName($propertyDisplayName); $propertyTimeZone = 'propertyTimeZone-1600366322'; $property->setTimeZone($propertyTimeZone); - $request = (new CreatePropertyRequest()) - ->setProperty($property); + $request = (new CreatePropertyRequest())->setProperty($property); try { $gapicClient->createProperty($request); // If the $gapicClient method call did not throw, fail the test @@ -1073,8 +1100,7 @@ public function deleteAccountTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $request = (new DeleteAccountRequest()) - ->setName($formattedName); + $request = (new DeleteAccountRequest())->setName($formattedName); $gapicClient->deleteAccount($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -1097,17 +1123,19 @@ public function deleteAccountExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $request = (new DeleteAccountRequest()) - ->setName($formattedName); + $request = (new DeleteAccountRequest())->setName($formattedName); try { $gapicClient->deleteAccount($request); // If the $gapicClient method call did not throw, fail the test @@ -1134,14 +1162,16 @@ public function deleteConversionEventTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $request = (new DeleteConversionEventRequest()) - ->setName($formattedName); + $request = (new DeleteConversionEventRequest())->setName($formattedName); $gapicClient->deleteConversionEvent($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteConversionEvent', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteConversionEvent', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -1158,17 +1188,19 @@ public function deleteConversionEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $request = (new DeleteConversionEventRequest()) - ->setName($formattedName); + $request = (new DeleteConversionEventRequest())->setName($formattedName); try { $gapicClient->deleteConversionEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -1195,8 +1227,7 @@ public function deleteDataStreamTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new DeleteDataStreamRequest()) - ->setName($formattedName); + $request = (new DeleteDataStreamRequest())->setName($formattedName); $gapicClient->deleteDataStream($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -1219,17 +1250,19 @@ public function deleteDataStreamExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new DeleteDataStreamRequest()) - ->setName($formattedName); + $request = (new DeleteDataStreamRequest())->setName($formattedName); try { $gapicClient->deleteDataStream($request); // If the $gapicClient method call did not throw, fail the test @@ -1256,8 +1289,7 @@ public function deleteFirebaseLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - $request = (new DeleteFirebaseLinkRequest()) - ->setName($formattedName); + $request = (new DeleteFirebaseLinkRequest())->setName($formattedName); $gapicClient->deleteFirebaseLink($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -1280,17 +1312,19 @@ public function deleteFirebaseLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->firebaseLinkName('[PROPERTY]', '[FIREBASE_LINK]'); - $request = (new DeleteFirebaseLinkRequest()) - ->setName($formattedName); + $request = (new DeleteFirebaseLinkRequest())->setName($formattedName); try { $gapicClient->deleteFirebaseLink($request); // If the $gapicClient method call did not throw, fail the test @@ -1317,8 +1351,7 @@ public function deleteGoogleAdsLinkTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - $request = (new DeleteGoogleAdsLinkRequest()) - ->setName($formattedName); + $request = (new DeleteGoogleAdsLinkRequest())->setName($formattedName); $gapicClient->deleteGoogleAdsLink($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -1341,17 +1374,19 @@ public function deleteGoogleAdsLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->googleAdsLinkName('[PROPERTY]', '[GOOGLE_ADS_LINK]'); - $request = (new DeleteGoogleAdsLinkRequest()) - ->setName($formattedName); + $request = (new DeleteGoogleAdsLinkRequest())->setName($formattedName); try { $gapicClient->deleteGoogleAdsLink($request); // If the $gapicClient method call did not throw, fail the test @@ -1378,8 +1413,7 @@ public function deleteKeyEventTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $request = (new DeleteKeyEventRequest()) - ->setName($formattedName); + $request = (new DeleteKeyEventRequest())->setName($formattedName); $gapicClient->deleteKeyEvent($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); @@ -1402,17 +1436,19 @@ public function deleteKeyEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $request = (new DeleteKeyEventRequest()) - ->setName($formattedName); + $request = (new DeleteKeyEventRequest())->setName($formattedName); try { $gapicClient->deleteKeyEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -1438,15 +1474,21 @@ public function deleteMeasurementProtocolSecretTest() $expectedResponse = new GPBEmpty(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $request = (new DeleteMeasurementProtocolSecretRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->measurementProtocolSecretName( + '[PROPERTY]', + '[DATA_STREAM]', + '[MEASUREMENT_PROTOCOL_SECRET]' + ); + $request = (new DeleteMeasurementProtocolSecretRequest())->setName($formattedName); $gapicClient->deleteMeasurementProtocolSecret($request); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteMeasurementProtocolSecret', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/DeleteMeasurementProtocolSecret', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -1463,17 +1505,23 @@ public function deleteMeasurementProtocolSecretExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $request = (new DeleteMeasurementProtocolSecretRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->measurementProtocolSecretName( + '[PROPERTY]', + '[DATA_STREAM]', + '[MEASUREMENT_PROTOCOL_SECRET]' + ); + $request = (new DeleteMeasurementProtocolSecretRequest())->setName($formattedName); try { $gapicClient->deleteMeasurementProtocolSecret($request); // If the $gapicClient method call did not throw, fail the test @@ -1512,8 +1560,7 @@ public function deletePropertyTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new DeletePropertyRequest()) - ->setName($formattedName); + $request = (new DeletePropertyRequest())->setName($formattedName); $response = $gapicClient->deleteProperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1537,17 +1584,19 @@ public function deletePropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new DeletePropertyRequest()) - ->setName($formattedName); + $request = (new DeletePropertyRequest())->setName($formattedName); try { $gapicClient->deleteProperty($request); // If the $gapicClient method call did not throw, fail the test @@ -1584,8 +1633,7 @@ public function getAccountTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $request = (new GetAccountRequest()) - ->setName($formattedName); + $request = (new GetAccountRequest())->setName($formattedName); $response = $gapicClient->getAccount($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1609,17 +1657,19 @@ public function getAccountExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->accountName('[ACCOUNT]'); - $request = (new GetAccountRequest()) - ->setName($formattedName); + $request = (new GetAccountRequest())->setName($formattedName); try { $gapicClient->getAccount($request); // If the $gapicClient method call did not throw, fail the test @@ -1654,8 +1704,7 @@ public function getConversionEventTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $request = (new GetConversionEventRequest()) - ->setName($formattedName); + $request = (new GetConversionEventRequest())->setName($formattedName); $response = $gapicClient->getConversionEvent($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1679,17 +1728,19 @@ public function getConversionEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->conversionEventName('[PROPERTY]', '[CONVERSION_EVENT]'); - $request = (new GetConversionEventRequest()) - ->setName($formattedName); + $request = (new GetConversionEventRequest())->setName($formattedName); try { $gapicClient->getConversionEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -1726,8 +1777,7 @@ public function getCustomDimensionTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $request = (new GetCustomDimensionRequest()) - ->setName($formattedName); + $request = (new GetCustomDimensionRequest())->setName($formattedName); $response = $gapicClient->getCustomDimension($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1751,17 +1801,19 @@ public function getCustomDimensionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->customDimensionName('[PROPERTY]', '[CUSTOM_DIMENSION]'); - $request = (new GetCustomDimensionRequest()) - ->setName($formattedName); + $request = (new GetCustomDimensionRequest())->setName($formattedName); try { $gapicClient->getCustomDimension($request); // If the $gapicClient method call did not throw, fail the test @@ -1796,8 +1848,7 @@ public function getCustomMetricTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $request = (new GetCustomMetricRequest()) - ->setName($formattedName); + $request = (new GetCustomMetricRequest())->setName($formattedName); $response = $gapicClient->getCustomMetric($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -1821,17 +1872,19 @@ public function getCustomMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->customMetricName('[PROPERTY]', '[CUSTOM_METRIC]'); - $request = (new GetCustomMetricRequest()) - ->setName($formattedName); + $request = (new GetCustomMetricRequest())->setName($formattedName); try { $gapicClient->getCustomMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -1862,15 +1915,17 @@ public function getDataRetentionSettingsTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataRetentionSettingsName('[PROPERTY]'); - $request = (new GetDataRetentionSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataRetentionSettingsRequest())->setName($formattedName); $response = $gapicClient->getDataRetentionSettings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetDataRetentionSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/GetDataRetentionSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -1887,17 +1942,19 @@ public function getDataRetentionSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->dataRetentionSettingsName('[PROPERTY]'); - $request = (new GetDataRetentionSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataRetentionSettingsRequest())->setName($formattedName); try { $gapicClient->getDataRetentionSettings($request); // If the $gapicClient method call did not throw, fail the test @@ -1936,15 +1993,17 @@ public function getDataSharingSettingsTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataSharingSettingsName('[ACCOUNT]'); - $request = (new GetDataSharingSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataSharingSettingsRequest())->setName($formattedName); $response = $gapicClient->getDataSharingSettings($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetDataSharingSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/GetDataSharingSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -1961,17 +2020,19 @@ public function getDataSharingSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->dataSharingSettingsName('[ACCOUNT]'); - $request = (new GetDataSharingSettingsRequest()) - ->setName($formattedName); + $request = (new GetDataSharingSettingsRequest())->setName($formattedName); try { $gapicClient->getDataSharingSettings($request); // If the $gapicClient method call did not throw, fail the test @@ -2002,8 +2063,7 @@ public function getDataStreamTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetDataStreamRequest()) - ->setName($formattedName); + $request = (new GetDataStreamRequest())->setName($formattedName); $response = $gapicClient->getDataStream($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2027,17 +2087,19 @@ public function getDataStreamExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new GetDataStreamRequest()) - ->setName($formattedName); + $request = (new GetDataStreamRequest())->setName($formattedName); try { $gapicClient->getDataStream($request); // If the $gapicClient method call did not throw, fail the test @@ -2072,8 +2134,7 @@ public function getKeyEventTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $request = (new GetKeyEventRequest()) - ->setName($formattedName); + $request = (new GetKeyEventRequest())->setName($formattedName); $response = $gapicClient->getKeyEvent($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2097,17 +2158,19 @@ public function getKeyEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->keyEventName('[PROPERTY]', '[KEY_EVENT]'); - $request = (new GetKeyEventRequest()) - ->setName($formattedName); + $request = (new GetKeyEventRequest())->setName($formattedName); try { $gapicClient->getKeyEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -2139,16 +2202,22 @@ public function getMeasurementProtocolSecretTest() $expectedResponse->setSecretValue($secretValue); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $request = (new GetMeasurementProtocolSecretRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->measurementProtocolSecretName( + '[PROPERTY]', + '[DATA_STREAM]', + '[MEASUREMENT_PROTOCOL_SECRET]' + ); + $request = (new GetMeasurementProtocolSecretRequest())->setName($formattedName); $response = $gapicClient->getMeasurementProtocolSecret($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/GetMeasurementProtocolSecret', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/GetMeasurementProtocolSecret', + $actualFuncCall + ); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -2165,17 +2234,23 @@ public function getMeasurementProtocolSecretExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->measurementProtocolSecretName('[PROPERTY]', '[DATA_STREAM]', '[MEASUREMENT_PROTOCOL_SECRET]'); - $request = (new GetMeasurementProtocolSecretRequest()) - ->setName($formattedName); + $formattedName = $gapicClient->measurementProtocolSecretName( + '[PROPERTY]', + '[DATA_STREAM]', + '[MEASUREMENT_PROTOCOL_SECRET]' + ); + $request = (new GetMeasurementProtocolSecretRequest())->setName($formattedName); try { $gapicClient->getMeasurementProtocolSecret($request); // If the $gapicClient method call did not throw, fail the test @@ -2214,8 +2289,7 @@ public function getPropertyTest() $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new GetPropertyRequest()) - ->setName($formattedName); + $request = (new GetPropertyRequest())->setName($formattedName); $response = $gapicClient->getProperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -2239,17 +2313,19 @@ public function getPropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedName = $gapicClient->propertyName('[PROPERTY]'); - $request = (new GetPropertyRequest()) - ->setName($formattedName); + $request = (new GetPropertyRequest())->setName($formattedName); try { $gapicClient->getProperty($request); // If the $gapicClient method call did not throw, fail the test @@ -2274,9 +2350,7 @@ public function listAccountSummariesTest() // Mock response $nextPageToken = ''; $accountSummariesElement = new AccountSummary(); - $accountSummaries = [ - $accountSummariesElement, - ]; + $accountSummaries = [$accountSummariesElement]; $expectedResponse = new ListAccountSummariesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setAccountSummaries($accountSummaries); @@ -2306,12 +2380,15 @@ public function listAccountSummariesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ListAccountSummariesRequest(); try { @@ -2338,9 +2415,7 @@ public function listAccountsTest() // Mock response $nextPageToken = ''; $accountsElement = new Account(); - $accounts = [ - $accountsElement, - ]; + $accounts = [$accountsElement]; $expectedResponse = new ListAccountsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setAccounts($accounts); @@ -2370,12 +2445,15 @@ public function listAccountsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ListAccountsRequest(); try { @@ -2402,17 +2480,14 @@ public function listConversionEventsTest() // Mock response $nextPageToken = ''; $conversionEventsElement = new ConversionEvent(); - $conversionEvents = [ - $conversionEventsElement, - ]; + $conversionEvents = [$conversionEventsElement]; $expectedResponse = new ListConversionEventsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setConversionEvents($conversionEvents); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListConversionEventsRequest()) - ->setParent($formattedParent); + $request = (new ListConversionEventsRequest())->setParent($formattedParent); $response = $gapicClient->listConversionEvents($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -2439,17 +2514,19 @@ public function listConversionEventsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListConversionEventsRequest()) - ->setParent($formattedParent); + $request = (new ListConversionEventsRequest())->setParent($formattedParent); try { $gapicClient->listConversionEvents($request); // If the $gapicClient method call did not throw, fail the test @@ -2474,17 +2551,14 @@ public function listCustomDimensionsTest() // Mock response $nextPageToken = ''; $customDimensionsElement = new CustomDimension(); - $customDimensions = [ - $customDimensionsElement, - ]; + $customDimensions = [$customDimensionsElement]; $expectedResponse = new ListCustomDimensionsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setCustomDimensions($customDimensions); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCustomDimensionsRequest()) - ->setParent($formattedParent); + $request = (new ListCustomDimensionsRequest())->setParent($formattedParent); $response = $gapicClient->listCustomDimensions($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -2511,17 +2585,19 @@ public function listCustomDimensionsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCustomDimensionsRequest()) - ->setParent($formattedParent); + $request = (new ListCustomDimensionsRequest())->setParent($formattedParent); try { $gapicClient->listCustomDimensions($request); // If the $gapicClient method call did not throw, fail the test @@ -2546,17 +2622,14 @@ public function listCustomMetricsTest() // Mock response $nextPageToken = ''; $customMetricsElement = new CustomMetric(); - $customMetrics = [ - $customMetricsElement, - ]; + $customMetrics = [$customMetricsElement]; $expectedResponse = new ListCustomMetricsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setCustomMetrics($customMetrics); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCustomMetricsRequest()) - ->setParent($formattedParent); + $request = (new ListCustomMetricsRequest())->setParent($formattedParent); $response = $gapicClient->listCustomMetrics($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -2583,17 +2656,19 @@ public function listCustomMetricsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListCustomMetricsRequest()) - ->setParent($formattedParent); + $request = (new ListCustomMetricsRequest())->setParent($formattedParent); try { $gapicClient->listCustomMetrics($request); // If the $gapicClient method call did not throw, fail the test @@ -2618,17 +2693,14 @@ public function listDataStreamsTest() // Mock response $nextPageToken = ''; $dataStreamsElement = new DataStream(); - $dataStreams = [ - $dataStreamsElement, - ]; + $dataStreams = [$dataStreamsElement]; $expectedResponse = new ListDataStreamsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setDataStreams($dataStreams); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListDataStreamsRequest()) - ->setParent($formattedParent); + $request = (new ListDataStreamsRequest())->setParent($formattedParent); $response = $gapicClient->listDataStreams($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -2655,17 +2727,19 @@ public function listDataStreamsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListDataStreamsRequest()) - ->setParent($formattedParent); + $request = (new ListDataStreamsRequest())->setParent($formattedParent); try { $gapicClient->listDataStreams($request); // If the $gapicClient method call did not throw, fail the test @@ -2690,17 +2764,14 @@ public function listFirebaseLinksTest() // Mock response $nextPageToken = ''; $firebaseLinksElement = new FirebaseLink(); - $firebaseLinks = [ - $firebaseLinksElement, - ]; + $firebaseLinks = [$firebaseLinksElement]; $expectedResponse = new ListFirebaseLinksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setFirebaseLinks($firebaseLinks); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListFirebaseLinksRequest()) - ->setParent($formattedParent); + $request = (new ListFirebaseLinksRequest())->setParent($formattedParent); $response = $gapicClient->listFirebaseLinks($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -2727,17 +2798,19 @@ public function listFirebaseLinksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListFirebaseLinksRequest()) - ->setParent($formattedParent); + $request = (new ListFirebaseLinksRequest())->setParent($formattedParent); try { $gapicClient->listFirebaseLinks($request); // If the $gapicClient method call did not throw, fail the test @@ -2762,17 +2835,14 @@ public function listGoogleAdsLinksTest() // Mock response $nextPageToken = ''; $googleAdsLinksElement = new GoogleAdsLink(); - $googleAdsLinks = [ - $googleAdsLinksElement, - ]; + $googleAdsLinks = [$googleAdsLinksElement]; $expectedResponse = new ListGoogleAdsLinksResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setGoogleAdsLinks($googleAdsLinks); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListGoogleAdsLinksRequest()) - ->setParent($formattedParent); + $request = (new ListGoogleAdsLinksRequest())->setParent($formattedParent); $response = $gapicClient->listGoogleAdsLinks($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -2799,17 +2869,19 @@ public function listGoogleAdsLinksExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListGoogleAdsLinksRequest()) - ->setParent($formattedParent); + $request = (new ListGoogleAdsLinksRequest())->setParent($formattedParent); try { $gapicClient->listGoogleAdsLinks($request); // If the $gapicClient method call did not throw, fail the test @@ -2834,17 +2906,14 @@ public function listKeyEventsTest() // Mock response $nextPageToken = ''; $keyEventsElement = new KeyEvent(); - $keyEvents = [ - $keyEventsElement, - ]; + $keyEvents = [$keyEventsElement]; $expectedResponse = new ListKeyEventsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setKeyEvents($keyEvents); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListKeyEventsRequest()) - ->setParent($formattedParent); + $request = (new ListKeyEventsRequest())->setParent($formattedParent); $response = $gapicClient->listKeyEvents($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -2871,17 +2940,19 @@ public function listKeyEventsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->propertyName('[PROPERTY]'); - $request = (new ListKeyEventsRequest()) - ->setParent($formattedParent); + $request = (new ListKeyEventsRequest())->setParent($formattedParent); try { $gapicClient->listKeyEvents($request); // If the $gapicClient method call did not throw, fail the test @@ -2906,17 +2977,14 @@ public function listMeasurementProtocolSecretsTest() // Mock response $nextPageToken = ''; $measurementProtocolSecretsElement = new MeasurementProtocolSecret(); - $measurementProtocolSecrets = [ - $measurementProtocolSecretsElement, - ]; + $measurementProtocolSecrets = [$measurementProtocolSecretsElement]; $expectedResponse = new ListMeasurementProtocolSecretsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setMeasurementProtocolSecrets($measurementProtocolSecrets); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListMeasurementProtocolSecretsRequest()) - ->setParent($formattedParent); + $request = (new ListMeasurementProtocolSecretsRequest())->setParent($formattedParent); $response = $gapicClient->listMeasurementProtocolSecrets($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -2926,7 +2994,10 @@ public function listMeasurementProtocolSecretsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ListMeasurementProtocolSecrets', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/ListMeasurementProtocolSecrets', + $actualFuncCall + ); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -2943,17 +3014,19 @@ public function listMeasurementProtocolSecretsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->dataStreamName('[PROPERTY]', '[DATA_STREAM]'); - $request = (new ListMeasurementProtocolSecretsRequest()) - ->setParent($formattedParent); + $request = (new ListMeasurementProtocolSecretsRequest())->setParent($formattedParent); try { $gapicClient->listMeasurementProtocolSecrets($request); // If the $gapicClient method call did not throw, fail the test @@ -2978,17 +3051,14 @@ public function listPropertiesTest() // Mock response $nextPageToken = ''; $propertiesElement = new Property(); - $properties = [ - $propertiesElement, - ]; + $properties = [$propertiesElement]; $expectedResponse = new ListPropertiesResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setProperties($properties); $transport->addResponse($expectedResponse); // Mock request $filter = 'filter-1274492040'; - $request = (new ListPropertiesRequest()) - ->setFilter($filter); + $request = (new ListPropertiesRequest())->setFilter($filter); $response = $gapicClient->listProperties($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -3015,17 +3085,19 @@ public function listPropertiesExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $filter = 'filter-1274492040'; - $request = (new ListPropertiesRequest()) - ->setFilter($filter); + $request = (new ListPropertiesRequest())->setFilter($filter); try { $gapicClient->listProperties($request); // If the $gapicClient method call did not throw, fail the test @@ -3059,7 +3131,10 @@ public function provisionAccountTicketTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/ProvisionAccountTicket', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/ProvisionAccountTicket', + $actualFuncCall + ); $this->assertTrue($transport->isExhausted()); } @@ -3074,12 +3149,15 @@ public function provisionAccountTicketExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new ProvisionAccountTicketRequest(); try { @@ -3130,12 +3208,15 @@ public function runAccessReportExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); $request = new RunAccessReportRequest(); try { @@ -3162,17 +3243,14 @@ public function searchChangeHistoryEventsTest() // Mock response $nextPageToken = ''; $changeHistoryEventsElement = new ChangeHistoryEvent(); - $changeHistoryEvents = [ - $changeHistoryEventsElement, - ]; + $changeHistoryEvents = [$changeHistoryEventsElement]; $expectedResponse = new SearchChangeHistoryEventsResponse(); $expectedResponse->setNextPageToken($nextPageToken); $expectedResponse->setChangeHistoryEvents($changeHistoryEvents); $transport->addResponse($expectedResponse); // Mock request $formattedAccount = $gapicClient->accountName('[ACCOUNT]'); - $request = (new SearchChangeHistoryEventsRequest()) - ->setAccount($formattedAccount); + $request = (new SearchChangeHistoryEventsRequest())->setAccount($formattedAccount); $response = $gapicClient->searchChangeHistoryEvents($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -3182,7 +3260,10 @@ public function searchChangeHistoryEventsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/SearchChangeHistoryEvents', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/SearchChangeHistoryEvents', + $actualFuncCall + ); $actualValue = $actualRequestObject->getAccount(); $this->assertProtobufEquals($formattedAccount, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -3199,17 +3280,19 @@ public function searchChangeHistoryEventsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $formattedAccount = $gapicClient->accountName('[ACCOUNT]'); - $request = (new SearchChangeHistoryEventsRequest()) - ->setAccount($formattedAccount); + $request = (new SearchChangeHistoryEventsRequest())->setAccount($formattedAccount); try { $gapicClient->searchChangeHistoryEvents($request); // If the $gapicClient method call did not throw, fail the test @@ -3249,9 +3332,7 @@ public function updateAccountTest() $accountDisplayName = 'accountDisplayName-616446464'; $account->setDisplayName($accountDisplayName); $updateMask = new FieldMask(); - $request = (new UpdateAccountRequest()) - ->setAccount($account) - ->setUpdateMask($updateMask); + $request = (new UpdateAccountRequest())->setAccount($account)->setUpdateMask($updateMask); $response = $gapicClient->updateAccount($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -3277,21 +3358,22 @@ public function updateAccountExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $account = new Account(); $accountDisplayName = 'accountDisplayName-616446464'; $account->setDisplayName($accountDisplayName); $updateMask = new FieldMask(); - $request = (new UpdateAccountRequest()) - ->setAccount($account) - ->setUpdateMask($updateMask); + $request = (new UpdateAccountRequest())->setAccount($account)->setUpdateMask($updateMask); try { $gapicClient->updateAccount($request); // If the $gapicClient method call did not throw, fail the test @@ -3336,7 +3418,10 @@ public function updateConversionEventTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateConversionEvent', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateConversionEvent', + $actualFuncCall + ); $actualValue = $actualRequestObject->getConversionEvent(); $this->assertProtobufEquals($conversionEvent, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -3355,12 +3440,15 @@ public function updateConversionEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $conversionEvent = new ConversionEvent(); @@ -3404,15 +3492,17 @@ public function updateCustomDimensionTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateCustomDimensionRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateCustomDimensionRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateCustomDimension($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateCustomDimension', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateCustomDimension', + $actualFuncCall + ); $actualValue = $actualRequestObject->getUpdateMask(); $this->assertProtobufEquals($updateMask, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -3429,17 +3519,19 @@ public function updateCustomDimensionExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateCustomDimensionRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateCustomDimensionRequest())->setUpdateMask($updateMask); try { $gapicClient->updateCustomDimension($request); // If the $gapicClient method call did not throw, fail the test @@ -3474,8 +3566,7 @@ public function updateCustomMetricTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateCustomMetricRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateCustomMetricRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateCustomMetric($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -3499,17 +3590,19 @@ public function updateCustomMetricExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateCustomMetricRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateCustomMetricRequest())->setUpdateMask($updateMask); try { $gapicClient->updateCustomMetric($request); // If the $gapicClient method call did not throw, fail the test @@ -3550,7 +3643,10 @@ public function updateDataRetentionSettingsTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateDataRetentionSettings', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateDataRetentionSettings', + $actualFuncCall + ); $actualValue = $actualRequestObject->getDataRetentionSettings(); $this->assertProtobufEquals($dataRetentionSettings, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -3569,12 +3665,15 @@ public function updateDataRetentionSettingsExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $dataRetentionSettings = new DataRetentionSettings(); @@ -3612,8 +3711,7 @@ public function updateDataStreamTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateDataStreamRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateDataStreamRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateDataStream($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -3637,17 +3735,19 @@ public function updateDataStreamExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateDataStreamRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateDataStreamRequest())->setUpdateMask($updateMask); try { $gapicClient->updateDataStream($request); // If the $gapicClient method call did not throw, fail the test @@ -3682,8 +3782,7 @@ public function updateGoogleAdsLinkTest() $transport->addResponse($expectedResponse); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateGoogleAdsLinkRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateGoogleAdsLinkRequest())->setUpdateMask($updateMask); $response = $gapicClient->updateGoogleAdsLink($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -3707,17 +3806,19 @@ public function updateGoogleAdsLinkExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $updateMask = new FieldMask(); - $request = (new UpdateGoogleAdsLinkRequest()) - ->setUpdateMask($updateMask); + $request = (new UpdateGoogleAdsLinkRequest())->setUpdateMask($updateMask); try { $gapicClient->updateGoogleAdsLink($request); // If the $gapicClient method call did not throw, fail the test @@ -3755,9 +3856,7 @@ public function updateKeyEventTest() $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; $keyEvent->setCountingMethod($keyEventCountingMethod); $updateMask = new FieldMask(); - $request = (new UpdateKeyEventRequest()) - ->setKeyEvent($keyEvent) - ->setUpdateMask($updateMask); + $request = (new UpdateKeyEventRequest())->setKeyEvent($keyEvent)->setUpdateMask($updateMask); $response = $gapicClient->updateKeyEvent($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -3783,21 +3882,22 @@ public function updateKeyEventExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $keyEvent = new KeyEvent(); $keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; $keyEvent->setCountingMethod($keyEventCountingMethod); $updateMask = new FieldMask(); - $request = (new UpdateKeyEventRequest()) - ->setKeyEvent($keyEvent) - ->setUpdateMask($updateMask); + $request = (new UpdateKeyEventRequest())->setKeyEvent($keyEvent)->setUpdateMask($updateMask); try { $gapicClient->updateKeyEvent($request); // If the $gapicClient method call did not throw, fail the test @@ -3842,7 +3942,10 @@ public function updateMeasurementProtocolSecretTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateMeasurementProtocolSecret', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/UpdateMeasurementProtocolSecret', + $actualFuncCall + ); $actualValue = $actualRequestObject->getMeasurementProtocolSecret(); $this->assertProtobufEquals($measurementProtocolSecret, $actualValue); $actualValue = $actualRequestObject->getUpdateMask(); @@ -3861,12 +3964,15 @@ public function updateMeasurementProtocolSecretExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $measurementProtocolSecret = new MeasurementProtocolSecret(); @@ -3919,9 +4025,7 @@ public function updatePropertyTest() $propertyTimeZone = 'propertyTimeZone-1600366322'; $property->setTimeZone($propertyTimeZone); $updateMask = new FieldMask(); - $request = (new UpdatePropertyRequest()) - ->setProperty($property) - ->setUpdateMask($updateMask); + $request = (new UpdatePropertyRequest())->setProperty($property)->setUpdateMask($updateMask); $response = $gapicClient->updateProperty($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -3947,12 +4051,15 @@ public function updatePropertyExceptionTest() $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); $transport->addResponse(null, $status); // Mock request $property = new Property(); @@ -3961,9 +4068,7 @@ public function updatePropertyExceptionTest() $propertyTimeZone = 'propertyTimeZone-1600366322'; $property->setTimeZone($propertyTimeZone); $updateMask = new FieldMask(); - $request = (new UpdatePropertyRequest()) - ->setProperty($property) - ->setUpdateMask($updateMask); + $request = (new UpdatePropertyRequest())->setProperty($property)->setUpdateMask($updateMask); try { $gapicClient->updateProperty($request); // If the $gapicClient method call did not throw, fail the test @@ -4000,7 +4105,10 @@ public function acknowledgeUserDataCollectionAsyncTest() $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/AcknowledgeUserDataCollection', $actualFuncCall); + $this->assertSame( + '/google.analytics.admin.v1beta.AnalyticsAdminService/AcknowledgeUserDataCollection', + $actualFuncCall + ); $actualValue = $actualRequestObject->getProperty(); $this->assertProtobufEquals($formattedProperty, $actualValue); $actualValue = $actualRequestObject->getAcknowledgement(); From 031ebdd2ababbfc1c1a40d8aff3f8f02bd382865 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 18 Dec 2024 00:16:42 +0000 Subject: [PATCH 2/2] revert to preview --- .repo-metadata-full.json | 4 ++-- AnalyticsAdmin/README.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.repo-metadata-full.json b/.repo-metadata-full.json index 5e5cfd4c2d52..47293b0e4b2a 100644 --- a/.repo-metadata-full.json +++ b/.repo-metadata-full.json @@ -58,7 +58,7 @@ "AnalyticsAdmin": { "language": "php", "distribution_name": "google/analytics-admin", - "release_level": "stable", + "release_level": "preview", "client_documentation": "https://cloud.google.com/php/docs/reference/analytics-admin/latest", "library_type": "GAPIC_AUTO", "api_shortname": "analyticsadmin" @@ -1599,4 +1599,4 @@ "library_type": "GAPIC_AUTO", "api_shortname": "workflows" } -} \ No newline at end of file +} diff --git a/AnalyticsAdmin/README.md b/AnalyticsAdmin/README.md index 0638984ae158..0715aaca04b1 100644 --- a/AnalyticsAdmin/README.md +++ b/AnalyticsAdmin/README.md @@ -51,8 +51,9 @@ for more information about the debugging tools. ### Version -This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in -any minor or patch releases. We will address issues and requests with the highest priority. +This component is considered beta. As such, it should be expected to be mostly +stable and we're working towards a release candidate. We will address issues +and requests with a higher priority. ### Next Steps