From 8a7a8db42e43f60c0b0dd6520de7a9c00e72b226 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 30 Oct 2025 22:16:01 +0000 Subject: [PATCH 1/2] feat: add the `ListOrganizations`, `FindSalesPartnerManagedClients`, and `ReportPropertyUsage` methods feat: define AnalyticsServiceLevel and AnalyticsPropertyType enums in resources.proto feat: update OAuth scopes in marketingplatformadmin_v1alpha.yaml feat: add the `ListOrganizationsRequest` and `ListOrganizationsResponse` resources feat: add the `FindSalesPartnerManagedClientsRequest` and `FindSalesPartnerManagedClientsResponse` resources feat: add the `ReportPropertyUsageRequest` and `ReportPropertyUsageResponse` resources PiperOrigin-RevId: 826146529 Source-Link: https://github.com/googleapis/googleapis/commit/6a3acb370bf4930823bea7486e54591c6e63e12b Source-Link: https://github.com/googleapis/googleapis-gen/commit/f4a107c95913b6778bf429668c7c630d84aca095 Copy-Tag: eyJwIjoiQWRzTWFya2V0aW5nUGxhdGZvcm1BZG1pbi8uT3dsQm90LnlhbWwiLCJoIjoiZjRhMTA3Yzk1OTEzYjY3NzhiZjQyOTY2OGM3YzYzMGQ4NGFjYTA5NSJ9 --- .../Admin/V1Alpha/MarketingplatformAdmin.php | 107 +++ .../Admin/V1Alpha/Resources.php | Bin 0 -> 2255 bytes .../Admin/V1alpha/AnalyticsAccountLink.php | 202 ++++++ .../Admin/V1alpha/AnalyticsPropertyType.php | 68 ++ .../Admin/V1alpha/AnalyticsServiceLevel.php | 61 ++ .../CreateAnalyticsAccountLinkRequest.php | 132 ++++ .../DeleteAnalyticsAccountLinkRequest.php | 91 +++ .../FindSalesPartnerManagedClientsRequest.php | 105 +++ ...FindSalesPartnerManagedClientsResponse.php | 67 ++ .../ClientData.php | 168 +++++ .../Admin/V1alpha/GetOrganizationRequest.php | 86 +++ .../Admin/V1alpha/LinkVerificationState.php | 63 ++ .../ListAnalyticsAccountLinksRequest.php | 182 +++++ .../ListAnalyticsAccountLinksResponse.php | 105 +++ .../V1alpha/ListOrganizationsRequest.php | 129 ++++ .../V1alpha/ListOrganizationsResponse.php | 109 +++ .../Admin/V1alpha/Organization.php | 105 +++ .../V1alpha/ReportPropertyUsageRequest.php | 124 ++++ .../V1alpha/ReportPropertyUsageResponse.php | 115 +++ .../ReportPropertyUsageResponse/BillInfo.php | 216 ++++++ .../PropertyUsage.php | 287 ++++++++ .../SetPropertyServiceLevelRequest.php | 166 +++++ .../SetPropertyServiceLevelResponse.php | 33 + .../create_analytics_account_link.php | 94 +++ .../delete_analytics_account_link.php | 78 +++ .../find_sales_partner_managed_clients.php | 75 ++ .../get_organization.php | 72 ++ .../list_analytics_account_links.php | 78 +++ .../list_organizations.php | 62 ++ .../report_property_usage.php | 86 +++ .../set_property_service_level.php | 90 +++ .../MarketingplatformAdminServiceClient.php | 565 +++++++++++++++ .../v1alpha/src/V1alpha/gapic_metadata.json | 58 ++ ...gplatform_admin_service_client_config.json | 75 ++ ...atform_admin_service_descriptor_config.php | 138 ++++ ...tform_admin_service_rest_client_config.php | 114 +++ ...arketingplatformAdminServiceClientTest.php | 661 ++++++++++++++++++ 37 files changed, 4967 insertions(+) create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/MarketingplatformAdmin.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/Resources.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsAccountLink.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsPropertyType.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsServiceLevel.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/CreateAnalyticsAccountLinkRequest.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/DeleteAnalyticsAccountLinkRequest.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsRequest.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse/ClientData.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/GetOrganizationRequest.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/LinkVerificationState.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksRequest.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksResponse.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsRequest.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsResponse.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/Organization.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageRequest.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/BillInfo.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/PropertyUsage.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelRequest.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelResponse.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/Client/MarketingplatformAdminServiceClient.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/gapic_metadata.json create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_client_config.json create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php create mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/MarketingplatformAdmin.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/MarketingplatformAdmin.php new file mode 100644 index 000000000000..61ac1830f80f --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/MarketingplatformAdmin.php @@ -0,0 +1,107 @@ +internalAddGeneratedFile( + ' +’* +Dgoogle/marketingplatform/admin/v1alpha/marketingplatform_admin.proto&google.marketingplatform.admin.v1alphagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto6google/marketingplatform/admin/v1alpha/resources.protogoogle/protobuf/empty.protogoogle/type/date.protogoogle/type/money.proto"b +GetOrganizationRequestH +name ( B:àAúA4 +2marketingplatformadmin.googleapis.com/Organization"K +ListOrganizationsRequest + page_size (BàA + +page_token ( BàA" +ListOrganizationsResponseK + organizations ( 24.google.marketingplatform.admin.v1alpha.Organization +next_page_token ( "‘ +%FindSalesPartnerManagedClientsRequestP + organization ( B:àAúA4 +2marketingplatformadmin.googleapis.com/Organization + is_active (BàA"¿ +&FindSalesPartnerManagedClientsResponsen + client_data ( 2Y.google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse.ClientData¤ + +ClientDataJ + organization ( 24.google.marketingplatform.admin.v1alpha.Organization% + +start_date ( 2.google.type.Date# +end_date ( 2.google.type.Date"§ + ListAnalyticsAccountLinksRequestR +parent ( BBàAúA<:marketingplatformadmin.googleapis.com/AnalyticsAccountLink + page_size (BàA + +page_token ( BàA"› +!ListAnalyticsAccountLinksResponse] +analytics_account_links ( 2<.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink +next_page_token ( "Ú +!CreateAnalyticsAccountLinkRequestR +parent ( BBàAúA<:marketingplatformadmin.googleapis.com/AnalyticsAccountLinka +analytics_account_link ( 2<.google.marketingplatform.admin.v1alpha.AnalyticsAccountLinkBàA"u +!DeleteAnalyticsAccountLinkRequestP +name ( BBàAúA< +:marketingplatformadmin.googleapis.com/AnalyticsAccountLink"ì +SetPropertyServiceLevelRequest# +analytics_account_link ( BàAJ +analytics_property ( B.àAúA( +&analyticsadmin.googleapis.com/PropertyY + service_level (2=.google.marketingplatform.admin.v1alpha.AnalyticsServiceLevelBàA"! +SetPropertyServiceLevelResponse"K +ReportPropertyUsageRequest + organization ( BàA +month ( BàA"Ï +ReportPropertyUsageResponsej +property_usages ( 2Q.google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.PropertyUsage_ + bill_info ( 2L.google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.BillInfo° + PropertyUsage +property (  + display_name (  + +account_id (T + service_level (2=.google.marketingplatform.admin.v1alpha.AnalyticsServiceLevelT + property_type (2=.google.marketingplatform.admin.v1alpha.AnalyticsPropertyType +total_event_count ( +billable_event_count (¯ +BillInfo$ +base_fee ( 2.google.type.Money% + event_fee ( 2.google.type.Money3 +price_protection_credit ( 2.google.type.Money! +total ( 2.google.type.Money2ú +MarketingplatformAdminService· +GetOrganization>.google.marketingplatform.admin.v1alpha.GetOrganizationRequest4.google.marketingplatform.admin.v1alpha.Organization".ÚAname‚Óä“!/v1alpha/{name=organizations/*}¸ +ListOrganizations@.google.marketingplatform.admin.v1alpha.ListOrganizationsRequestA.google.marketingplatform.admin.v1alpha.ListOrganizationsResponse"‚Óä“/v1alpha/organizations’ +FindSalesPartnerManagedClientsM.google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequestN.google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse"Q‚Óä“K"F/v1alpha/{organization=organizations/*}:findSalesPartnerManagedClients:*ú +ListAnalyticsAccountLinksH.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequestI.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse"HÚAparent‚Óä“97/v1alpha/{parent=organizations/*}/analyticsAccountLinksž +CreateAnalyticsAccountLinkI.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest<.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink"wÚAparent,analytics_account_link‚Óä“Q"7/v1alpha/{parent=organizations/*}/analyticsAccountLinks:analytics_account_linkÇ +DeleteAnalyticsAccountLinkI.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest.google.protobuf.Empty"FÚAname‚Óä“9*7/v1alpha/{name=organizations/*/analyticsAccountLinks/*}² +SetPropertyServiceLevelF.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequestG.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse"…ÚAanalytics_account_link‚Óä“f"a/v1alpha/{analytics_account_link=organizations/*/analyticsAccountLinks/*}:setPropertyServiceLevel:*õ +ReportPropertyUsageB.google.marketingplatform.admin.v1alpha.ReportPropertyUsageRequestC.google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse"UÚA organization‚Óä“@";/v1alpha/{organization=organizations/*}:reportPropertyUsage:*¹ÊA%marketingplatformadmin.googleapis.comÒAhttps://www.googleapis.com/auth/marketingplatformadmin.analytics.read,https://www.googleapis.com/auth/marketingplatformadmin.analytics.updateBé +.com.google.ads.marketingplatform.admin.v1alphaBMarketingplatformAdminProtoPZKgoogle.golang.org/genproto/googleapis/marketingplatform/admin/v1alpha;adminª*Google.Ads.MarketingPlatform.Admin.V1AlphaÊ*Google\\Ads\\MarketingPlatform\\Admin\\V1alphaê.Google::Ads::MarketingPlatform::Admin::V1alphaêA? +&analyticsadmin.googleapis.com/Propertyproperties/{property}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/Resources.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/Resources.php new file mode 100644 index 0000000000000000000000000000000000000000..e04334ee8e5bf18f23bba551f992ad6192efcfd6 GIT binary patch literal 2255 zcmbVNO>f&q5Ur%NXcuna5Dx0JMZ0y}S`iX5aey4?y2Z+(4Z?~50-by9rGKJ52I!$bp}(LMp;;SQ28y7n#d9GjASe=l%F|co~9+@Pzn; z;g}5I#SF%m1coe#12^#C#bh`n47$NMq#j{1gsm>@bSsDa#8{SACE~CVwb=Zqxq7=cz|PUpCsAr zmp8N7NMy77&ydJ=0D$Y^D1v656}$nE|AmtakGe35am;^qY2;9!#uR(>HSh5d4zU*z z9=(hmPJB0}fe%GM*LO+%5lnLm>~0uvO%7qs&k!q2u;S4SmMJo$-cjibS!=<}FQO1)qvcT;B8l6rT$s7c7;Bbw!p@KMtp2% zPV%ZMUa9OF1z>-vbXqwr$m>NizaYvx6}}Ei^&;g>`ElO(y!;sLZBHz z!51Fq;7kdlL+U0nI%0Uq_8pG8yMHL(?mNk%m3}EpPb3lFpr-y^xki6gfOM>%4Klcu~ghZ>>6R{8j0 zcnK%eLG5!(Kk7L>&Ft$(n$y<$T6>w(Iv{VM(?X`;^ey;m9qRdur<}^$G8Mi!L&D;j zH4DiNDu&rLG}AhFtaD?9Jc}al0=s5Q?;!J>QxS5ngZ0judE91I+5z9J1Df4-`^?y^ zHUF&wal7;B#)Ig6o2Yp=U!7565Ju&f)9h}H0uTEmna`*)B7S0l%3_PW&pi*4%lk*Q zagx}hj5wFVB8|*&`6;(ZIkU)ragoogle.marketingplatform.admin.v1alpha.AnalyticsAccountLink + */ +class AnalyticsAccountLink extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Resource name of this AnalyticsAccountLink. Note the resource + * ID is the same as the ID of the Analtyics account. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * Example: "organizations/xyz/analyticsAccountLinks/1234" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Immutable. The resource name of the AnalyticsAdmin API account. + * The account ID will be used as the ID of this AnalyticsAccountLink + * resource, which will become the final component of the resource name. + * Format: analyticsadmin.googleapis.com/accounts/{account_id} + * + * Generated from protobuf field string analytics_account = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $analytics_account = ''; + /** + * Output only. The human-readable name for the Analytics account. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. The verification state of the link between the Analytics + * account and the parent organization. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.LinkVerificationState link_verification_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $link_verification_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Resource name of this AnalyticsAccountLink. Note the resource + * ID is the same as the ID of the Analtyics account. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * Example: "organizations/xyz/analyticsAccountLinks/1234" + * @type string $analytics_account + * Required. Immutable. The resource name of the AnalyticsAdmin API account. + * The account ID will be used as the ID of this AnalyticsAccountLink + * resource, which will become the final component of the resource name. + * Format: analyticsadmin.googleapis.com/accounts/{account_id} + * @type string $display_name + * Output only. The human-readable name for the Analytics account. + * @type int $link_verification_state + * Output only. The verification state of the link between the Analytics + * account and the parent organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Resource name of this AnalyticsAccountLink. Note the resource + * ID is the same as the ID of the Analtyics account. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * Example: "organizations/xyz/analyticsAccountLinks/1234" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Resource name of this AnalyticsAccountLink. Note the resource + * ID is the same as the ID of the Analtyics account. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * Example: "organizations/xyz/analyticsAccountLinks/1234" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Immutable. The resource name of the AnalyticsAdmin API account. + * The account ID will be used as the ID of this AnalyticsAccountLink + * resource, which will become the final component of the resource name. + * Format: analyticsadmin.googleapis.com/accounts/{account_id} + * + * Generated from protobuf field string analytics_account = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getAnalyticsAccount() + { + return $this->analytics_account; + } + + /** + * Required. Immutable. The resource name of the AnalyticsAdmin API account. + * The account ID will be used as the ID of this AnalyticsAccountLink + * resource, which will become the final component of the resource name. + * Format: analyticsadmin.googleapis.com/accounts/{account_id} + * + * Generated from protobuf field string analytics_account = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAnalyticsAccount($var) + { + GPBUtil::checkString($var, True); + $this->analytics_account = $var; + + return $this; + } + + /** + * Output only. The human-readable name for the Analytics account. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The human-readable name for the Analytics account. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The verification state of the link between the Analytics + * account and the parent organization. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.LinkVerificationState link_verification_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLinkVerificationState() + { + return $this->link_verification_state; + } + + /** + * Output only. The verification state of the link between the Analytics + * account and the parent organization. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.LinkVerificationState link_verification_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLinkVerificationState($var) + { + GPBUtil::checkEnum($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\LinkVerificationState::class); + $this->link_verification_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsPropertyType.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsPropertyType.php new file mode 100644 index 000000000000..9c068e36b59b --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsPropertyType.php @@ -0,0 +1,68 @@ +google.marketingplatform.admin.v1alpha.AnalyticsPropertyType + */ +class AnalyticsPropertyType +{ + /** + * Unknown or unspecified property type + * + * Generated from protobuf enum ANALYTICS_PROPERTY_TYPE_UNSPECIFIED = 0; + */ + const ANALYTICS_PROPERTY_TYPE_UNSPECIFIED = 0; + /** + * Ordinary Google Analytics property + * + * Generated from protobuf enum ANALYTICS_PROPERTY_TYPE_ORDINARY = 1; + */ + const ANALYTICS_PROPERTY_TYPE_ORDINARY = 1; + /** + * Google Analytics subproperty + * + * Generated from protobuf enum ANALYTICS_PROPERTY_TYPE_SUBPROPERTY = 2; + */ + const ANALYTICS_PROPERTY_TYPE_SUBPROPERTY = 2; + /** + * Google Analytics rollup property + * + * Generated from protobuf enum ANALYTICS_PROPERTY_TYPE_ROLLUP = 3; + */ + const ANALYTICS_PROPERTY_TYPE_ROLLUP = 3; + + private static $valueToName = [ + self::ANALYTICS_PROPERTY_TYPE_UNSPECIFIED => 'ANALYTICS_PROPERTY_TYPE_UNSPECIFIED', + self::ANALYTICS_PROPERTY_TYPE_ORDINARY => 'ANALYTICS_PROPERTY_TYPE_ORDINARY', + self::ANALYTICS_PROPERTY_TYPE_SUBPROPERTY => 'ANALYTICS_PROPERTY_TYPE_SUBPROPERTY', + self::ANALYTICS_PROPERTY_TYPE_ROLLUP => 'ANALYTICS_PROPERTY_TYPE_ROLLUP', + ]; + + 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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsServiceLevel.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsServiceLevel.php new file mode 100644 index 000000000000..d7f4fce38ecf --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsServiceLevel.php @@ -0,0 +1,61 @@ +google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel + */ +class AnalyticsServiceLevel +{ + /** + * Service level unspecified. + * + * Generated from protobuf enum ANALYTICS_SERVICE_LEVEL_UNSPECIFIED = 0; + */ + const ANALYTICS_SERVICE_LEVEL_UNSPECIFIED = 0; + /** + * The standard version of Google Analytics. + * + * Generated from protobuf enum ANALYTICS_SERVICE_LEVEL_STANDARD = 1; + */ + const ANALYTICS_SERVICE_LEVEL_STANDARD = 1; + /** + * The premium version of Google Analytics. + * + * Generated from protobuf enum ANALYTICS_SERVICE_LEVEL_360 = 2; + */ + const ANALYTICS_SERVICE_LEVEL_360 = 2; + + private static $valueToName = [ + self::ANALYTICS_SERVICE_LEVEL_UNSPECIFIED => 'ANALYTICS_SERVICE_LEVEL_UNSPECIFIED', + self::ANALYTICS_SERVICE_LEVEL_STANDARD => 'ANALYTICS_SERVICE_LEVEL_STANDARD', + self::ANALYTICS_SERVICE_LEVEL_360 => 'ANALYTICS_SERVICE_LEVEL_360', + ]; + + 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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/CreateAnalyticsAccountLinkRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/CreateAnalyticsAccountLinkRequest.php new file mode 100644 index 000000000000..c4532ac815a5 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/CreateAnalyticsAccountLinkRequest.php @@ -0,0 +1,132 @@ +google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + */ +class CreateAnalyticsAccountLinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this Analytics account link will be + * created. Format: organizations/{org_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Analytics account link to create. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_link = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $analytics_account_link = null; + + /** + * @param string $parent Required. The parent resource where this Analytics account link will be + * created. Format: organizations/{org_id} + * Please see {@see MarketingplatformAdminServiceClient::organizationName()} for help formatting this field. + * @param \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink $analyticsAccountLink Required. The Analytics account link to create. + * + * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\CreateAnalyticsAccountLinkRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink $analyticsAccountLink): self + { + return (new self()) + ->setParent($parent) + ->setAnalyticsAccountLink($analyticsAccountLink); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this Analytics account link will be + * created. Format: organizations/{org_id} + * @type \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink $analytics_account_link + * Required. The Analytics account link to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this Analytics account link will be + * created. Format: organizations/{org_id} + * + * 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 parent resource where this Analytics account link will be + * created. Format: organizations/{org_id} + * + * 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 Analytics account link to create. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink|null + */ + public function getAnalyticsAccountLink() + { + return $this->analytics_account_link; + } + + public function hasAnalyticsAccountLink() + { + return isset($this->analytics_account_link); + } + + public function clearAnalyticsAccountLink() + { + unset($this->analytics_account_link); + } + + /** + * Required. The Analytics account link to create. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink $var + * @return $this + */ + public function setAnalyticsAccountLink($var) + { + GPBUtil::checkMessage($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink::class); + $this->analytics_account_link = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/DeleteAnalyticsAccountLinkRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/DeleteAnalyticsAccountLinkRequest.php new file mode 100644 index 000000000000..96cc8db8c9a0 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/DeleteAnalyticsAccountLinkRequest.php @@ -0,0 +1,91 @@ +google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + */ +class DeleteAnalyticsAccountLinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Analytics account link to delete. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the Analytics account link to delete. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * Please see {@see MarketingplatformAdminServiceClient::analyticsAccountLinkName()} for help formatting this field. + * + * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\DeleteAnalyticsAccountLinkRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Analytics account link to delete. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Analytics account link to delete. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * + * 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 Analytics account link to delete. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * + * 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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsRequest.php new file mode 100644 index 000000000000..bbe0c5e44302 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsRequest.php @@ -0,0 +1,105 @@ +google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequest + */ +class FindSalesPartnerManagedClientsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the sales partner organization. + * Format: organizations/{org_id} + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $organization = ''; + /** + * Optional. If set, only active and just ended clients will be returned. + * + * Generated from protobuf field bool is_active = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_active = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $organization + * Required. The name of the sales partner organization. + * Format: organizations/{org_id} + * @type bool $is_active + * Optional. If set, only active and just ended clients will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the sales partner organization. + * Format: organizations/{org_id} + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getOrganization() + { + return $this->organization; + } + + /** + * Required. The name of the sales partner organization. + * Format: organizations/{org_id} + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setOrganization($var) + { + GPBUtil::checkString($var, True); + $this->organization = $var; + + return $this; + } + + /** + * Optional. If set, only active and just ended clients will be returned. + * + * Generated from protobuf field bool is_active = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsActive() + { + return $this->is_active; + } + + /** + * Optional. If set, only active and just ended clients will be returned. + * + * Generated from protobuf field bool is_active = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsActive($var) + { + GPBUtil::checkBool($var); + $this->is_active = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse.php new file mode 100644 index 000000000000..f838d4e7ccbe --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse.php @@ -0,0 +1,67 @@ +google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse + */ +class FindSalesPartnerManagedClientsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The clients managed by the sales org. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse.ClientData client_data = 1; + */ + private $client_data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\MarketingPlatform\Admin\V1alpha\FindSalesPartnerManagedClientsResponse\ClientData>|\Google\Protobuf\Internal\RepeatedField $client_data + * The clients managed by the sales org. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The clients managed by the sales org. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse.ClientData client_data = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClientData() + { + return $this->client_data; + } + + /** + * The clients managed by the sales org. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse.ClientData client_data = 1; + * @param array<\Google\Ads\MarketingPlatform\Admin\V1alpha\FindSalesPartnerManagedClientsResponse\ClientData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClientData($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\MarketingPlatform\Admin\V1alpha\FindSalesPartnerManagedClientsResponse\ClientData::class); + $this->client_data = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse/ClientData.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse/ClientData.php new file mode 100644 index 000000000000..9535c4c39bd9 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse/ClientData.php @@ -0,0 +1,168 @@ +google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse.ClientData + */ +class ClientData extends \Google\Protobuf\Internal\Message +{ + /** + * The end client that has/had contract with the requested sales org. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.Organization organization = 1; + */ + protected $organization = null; + /** + * The start date of the contract between the sales org and the end client. + * + * Generated from protobuf field .google.type.Date start_date = 2; + */ + protected $start_date = null; + /** + * The end date of the contract between the sales org and the end client. + * + * Generated from protobuf field .google.type.Date end_date = 3; + */ + protected $end_date = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\MarketingPlatform\Admin\V1alpha\Organization $organization + * The end client that has/had contract with the requested sales org. + * @type \Google\Type\Date $start_date + * The start date of the contract between the sales org and the end client. + * @type \Google\Type\Date $end_date + * The end date of the contract between the sales org and the end client. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The end client that has/had contract with the requested sales org. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.Organization organization = 1; + * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\Organization|null + */ + public function getOrganization() + { + return $this->organization; + } + + public function hasOrganization() + { + return isset($this->organization); + } + + public function clearOrganization() + { + unset($this->organization); + } + + /** + * The end client that has/had contract with the requested sales org. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.Organization organization = 1; + * @param \Google\Ads\MarketingPlatform\Admin\V1alpha\Organization $var + * @return $this + */ + public function setOrganization($var) + { + GPBUtil::checkMessage($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\Organization::class); + $this->organization = $var; + + return $this; + } + + /** + * The start date of the contract between the sales org and the end client. + * + * Generated from protobuf field .google.type.Date start_date = 2; + * @return \Google\Type\Date|null + */ + public function getStartDate() + { + return $this->start_date; + } + + public function hasStartDate() + { + return isset($this->start_date); + } + + public function clearStartDate() + { + unset($this->start_date); + } + + /** + * The start date of the contract between the sales org and the end client. + * + * Generated from protobuf field .google.type.Date start_date = 2; + * @param \Google\Type\Date $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->start_date = $var; + + return $this; + } + + /** + * The end date of the contract between the sales org and the end client. + * + * Generated from protobuf field .google.type.Date end_date = 3; + * @return \Google\Type\Date|null + */ + public function getEndDate() + { + return $this->end_date; + } + + public function hasEndDate() + { + return isset($this->end_date); + } + + public function clearEndDate() + { + unset($this->end_date); + } + + /** + * The end date of the contract between the sales org and the end client. + * + * Generated from protobuf field .google.type.Date end_date = 3; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_date = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClientData::class, \Google\Ads\MarketingPlatform\Admin\V1alpha\FindSalesPartnerManagedClientsResponse_ClientData::class); + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/GetOrganizationRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/GetOrganizationRequest.php new file mode 100644 index 000000000000..6e4b0cf0fef6 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/GetOrganizationRequest.php @@ -0,0 +1,86 @@ +google.marketingplatform.admin.v1alpha.GetOrganizationRequest + */ +class GetOrganizationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Organization to retrieve. + * Format: organizations/{org_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the Organization to retrieve. + * Format: organizations/{org_id} + * Please see {@see MarketingplatformAdminServiceClient::organizationName()} for help formatting this field. + * + * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\GetOrganizationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Organization to retrieve. + * Format: organizations/{org_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Organization to retrieve. + * Format: organizations/{org_id} + * + * 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 Organization to retrieve. + * Format: organizations/{org_id} + * + * 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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/LinkVerificationState.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/LinkVerificationState.php new file mode 100644 index 000000000000..e1c0b237300b --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/LinkVerificationState.php @@ -0,0 +1,63 @@ +google.marketingplatform.admin.v1alpha.LinkVerificationState + */ +class LinkVerificationState +{ + /** + * The link state is unknown. + * + * Generated from protobuf enum LINK_VERIFICATION_STATE_UNSPECIFIED = 0; + */ + const LINK_VERIFICATION_STATE_UNSPECIFIED = 0; + /** + * The link is established. + * + * Generated from protobuf enum LINK_VERIFICATION_STATE_VERIFIED = 1; + */ + const LINK_VERIFICATION_STATE_VERIFIED = 1; + /** + * The link is requested, but hasn't been approved by the product account + * admin. + * + * Generated from protobuf enum LINK_VERIFICATION_STATE_NOT_VERIFIED = 2; + */ + const LINK_VERIFICATION_STATE_NOT_VERIFIED = 2; + + private static $valueToName = [ + self::LINK_VERIFICATION_STATE_UNSPECIFIED => 'LINK_VERIFICATION_STATE_UNSPECIFIED', + self::LINK_VERIFICATION_STATE_VERIFIED => 'LINK_VERIFICATION_STATE_VERIFIED', + self::LINK_VERIFICATION_STATE_NOT_VERIFIED => 'LINK_VERIFICATION_STATE_NOT_VERIFIED', + ]; + + 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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksRequest.php new file mode 100644 index 000000000000..2f09170cac7b --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksRequest.php @@ -0,0 +1,182 @@ +google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + */ +class ListAnalyticsAccountLinksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + * Please see {@see MarketingplatformAdminServiceClient::organizationName()} for help formatting this field. + * + * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\ListAnalyticsAccountLinksRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + * @type int $page_size + * Optional. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + * + * 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 parent organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + * + * 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. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksResponse.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksResponse.php new file mode 100644 index 000000000000..b3da65fa4a89 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksResponse.php @@ -0,0 +1,105 @@ +google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + */ +class ListAnalyticsAccountLinksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Analytics account links in this organization. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_links = 1; + */ + private $analytics_account_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; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink>|\Google\Protobuf\Internal\RepeatedField $analytics_account_links + * Analytics account links in this organization. + * @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\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Analytics account links in this organization. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_links = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnalyticsAccountLinks() + { + return $this->analytics_account_links; + } + + /** + * Analytics account links in this organization. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_links = 1; + * @param array<\Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnalyticsAccountLinks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink::class); + $this->analytics_account_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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsRequest.php new file mode 100644 index 000000000000..7fac02605425 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsRequest.php @@ -0,0 +1,129 @@ +google.marketingplatform.admin.v1alpha.ListOrganizationsRequest + */ +class ListOrganizationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maximum number of organizations to return in one call. The + * service may return fewer than this value. + * If unspecified, at most 50 organizations will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous ListOrganizations call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListOrganizations` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * Optional. The maximum number of organizations to return in one call. The + * service may return fewer than this value. + * If unspecified, at most 50 organizations will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous ListOrganizations call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListOrganizations` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maximum number of organizations to return in one call. The + * service may return fewer than this value. + * If unspecified, at most 50 organizations will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of organizations to return in one call. The + * service may return fewer than this value. + * If unspecified, at most 50 organizations will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous ListOrganizations call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListOrganizations` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous ListOrganizations call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListOrganizations` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsResponse.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsResponse.php new file mode 100644 index 000000000000..cdfa5470f4f1 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsResponse.php @@ -0,0 +1,109 @@ +google.marketingplatform.admin.v1alpha.ListOrganizationsResponse + */ +class ListOrganizationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The Organization resource that the user has access to, which includes the + * org id and display name. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.Organization organizations = 1; + */ + private $organizations; + /** + * 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; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\MarketingPlatform\Admin\V1alpha\Organization>|\Google\Protobuf\Internal\RepeatedField $organizations + * The Organization resource that the user has access to, which includes the + * org id and display name. + * @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\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The Organization resource that the user has access to, which includes the + * org id and display name. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.Organization organizations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOrganizations() + { + return $this->organizations; + } + + /** + * The Organization resource that the user has access to, which includes the + * org id and display name. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.Organization organizations = 1; + * @param array<\Google\Ads\MarketingPlatform\Admin\V1alpha\Organization>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOrganizations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\MarketingPlatform\Admin\V1alpha\Organization::class); + $this->organizations = $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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/Organization.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/Organization.php new file mode 100644 index 000000000000..118a5624bbd1 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/Organization.php @@ -0,0 +1,105 @@ +google.marketingplatform.admin.v1alpha.Organization + */ +class Organization extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the GMP organization. + * Format: organizations/{org_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The human-readable name for the organization. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the GMP organization. + * Format: organizations/{org_id} + * @type string $display_name + * The human-readable name for the organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the GMP organization. + * Format: organizations/{org_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the GMP organization. + * Format: organizations/{org_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The human-readable name for the organization. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human-readable name for the organization. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageRequest.php new file mode 100644 index 000000000000..78f752a541b2 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageRequest.php @@ -0,0 +1,124 @@ +google.marketingplatform.admin.v1alpha.ReportPropertyUsageRequest + */ +class ReportPropertyUsageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specifies the organization whose property usage will be listed. + * Format: organizations/{org_id} + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $organization = ''; + /** + * Required. The target month to list property usages. + * Format: YYYY-MM. For example, "2025-05" + * + * Generated from protobuf field string month = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $month = ''; + + /** + * @param string $organization Required. Specifies the organization whose property usage will be listed. + * + * Format: organizations/{org_id} + * + * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageRequest + * + * @experimental + */ + public static function build(string $organization): self + { + return (new self()) + ->setOrganization($organization); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $organization + * Required. Specifies the organization whose property usage will be listed. + * Format: organizations/{org_id} + * @type string $month + * Required. The target month to list property usages. + * Format: YYYY-MM. For example, "2025-05" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specifies the organization whose property usage will be listed. + * Format: organizations/{org_id} + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOrganization() + { + return $this->organization; + } + + /** + * Required. Specifies the organization whose property usage will be listed. + * Format: organizations/{org_id} + * + * Generated from protobuf field string organization = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOrganization($var) + { + GPBUtil::checkString($var, True); + $this->organization = $var; + + return $this; + } + + /** + * Required. The target month to list property usages. + * Format: YYYY-MM. For example, "2025-05" + * + * Generated from protobuf field string month = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMonth() + { + return $this->month; + } + + /** + * Required. The target month to list property usages. + * Format: YYYY-MM. For example, "2025-05" + * + * Generated from protobuf field string month = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMonth($var) + { + GPBUtil::checkString($var, True); + $this->month = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse.php new file mode 100644 index 000000000000..d3168fffdfef --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse.php @@ -0,0 +1,115 @@ +google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse + */ +class ReportPropertyUsageResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Usage data for all properties in the specified organization and month. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.PropertyUsage property_usages = 1; + */ + private $property_usages; + /** + * Bill amount in the specified organization and month. + * Will be empty if user only has access to usage data. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.BillInfo bill_info = 2; + */ + protected $bill_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse\PropertyUsage>|\Google\Protobuf\Internal\RepeatedField $property_usages + * Usage data for all properties in the specified organization and month. + * @type \Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse\BillInfo $bill_info + * Bill amount in the specified organization and month. + * Will be empty if user only has access to usage data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Usage data for all properties in the specified organization and month. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.PropertyUsage property_usages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPropertyUsages() + { + return $this->property_usages; + } + + /** + * Usage data for all properties in the specified organization and month. + * + * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.PropertyUsage property_usages = 1; + * @param array<\Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse\PropertyUsage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPropertyUsages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse\PropertyUsage::class); + $this->property_usages = $arr; + + return $this; + } + + /** + * Bill amount in the specified organization and month. + * Will be empty if user only has access to usage data. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.BillInfo bill_info = 2; + * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse\BillInfo|null + */ + public function getBillInfo() + { + return $this->bill_info; + } + + public function hasBillInfo() + { + return isset($this->bill_info); + } + + public function clearBillInfo() + { + unset($this->bill_info); + } + + /** + * Bill amount in the specified organization and month. + * Will be empty if user only has access to usage data. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.BillInfo bill_info = 2; + * @param \Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse\BillInfo $var + * @return $this + */ + public function setBillInfo($var) + { + GPBUtil::checkMessage($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse\BillInfo::class); + $this->bill_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/BillInfo.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/BillInfo.php new file mode 100644 index 000000000000..9af6e26b9fb2 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/BillInfo.php @@ -0,0 +1,216 @@ +google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.BillInfo + */ +class BillInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The amount of the monthly base fee. + * + * Generated from protobuf field .google.type.Money base_fee = 1; + */ + protected $base_fee = null; + /** + * The amount of the event fee. + * + * Generated from protobuf field .google.type.Money event_fee = 2; + */ + protected $event_fee = null; + /** + * The amount of the price protection credit, this is only available for + * eligible customers. + * + * Generated from protobuf field .google.type.Money price_protection_credit = 3; + */ + protected $price_protection_credit = null; + /** + * The total amount of the bill. + * + * Generated from protobuf field .google.type.Money total = 4; + */ + protected $total = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Money $base_fee + * The amount of the monthly base fee. + * @type \Google\Type\Money $event_fee + * The amount of the event fee. + * @type \Google\Type\Money $price_protection_credit + * The amount of the price protection credit, this is only available for + * eligible customers. + * @type \Google\Type\Money $total + * The total amount of the bill. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The amount of the monthly base fee. + * + * Generated from protobuf field .google.type.Money base_fee = 1; + * @return \Google\Type\Money|null + */ + public function getBaseFee() + { + return $this->base_fee; + } + + public function hasBaseFee() + { + return isset($this->base_fee); + } + + public function clearBaseFee() + { + unset($this->base_fee); + } + + /** + * The amount of the monthly base fee. + * + * Generated from protobuf field .google.type.Money base_fee = 1; + * @param \Google\Type\Money $var + * @return $this + */ + public function setBaseFee($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->base_fee = $var; + + return $this; + } + + /** + * The amount of the event fee. + * + * Generated from protobuf field .google.type.Money event_fee = 2; + * @return \Google\Type\Money|null + */ + public function getEventFee() + { + return $this->event_fee; + } + + public function hasEventFee() + { + return isset($this->event_fee); + } + + public function clearEventFee() + { + unset($this->event_fee); + } + + /** + * The amount of the event fee. + * + * Generated from protobuf field .google.type.Money event_fee = 2; + * @param \Google\Type\Money $var + * @return $this + */ + public function setEventFee($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->event_fee = $var; + + return $this; + } + + /** + * The amount of the price protection credit, this is only available for + * eligible customers. + * + * Generated from protobuf field .google.type.Money price_protection_credit = 3; + * @return \Google\Type\Money|null + */ + public function getPriceProtectionCredit() + { + return $this->price_protection_credit; + } + + public function hasPriceProtectionCredit() + { + return isset($this->price_protection_credit); + } + + public function clearPriceProtectionCredit() + { + unset($this->price_protection_credit); + } + + /** + * The amount of the price protection credit, this is only available for + * eligible customers. + * + * Generated from protobuf field .google.type.Money price_protection_credit = 3; + * @param \Google\Type\Money $var + * @return $this + */ + public function setPriceProtectionCredit($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->price_protection_credit = $var; + + return $this; + } + + /** + * The total amount of the bill. + * + * Generated from protobuf field .google.type.Money total = 4; + * @return \Google\Type\Money|null + */ + public function getTotal() + { + return $this->total; + } + + public function hasTotal() + { + return isset($this->total); + } + + public function clearTotal() + { + unset($this->total); + } + + /** + * The total amount of the bill. + * + * Generated from protobuf field .google.type.Money total = 4; + * @param \Google\Type\Money $var + * @return $this + */ + public function setTotal($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->total = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BillInfo::class, \Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse_BillInfo::class); + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/PropertyUsage.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/PropertyUsage.php new file mode 100644 index 000000000000..6e3e8e8d7119 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/PropertyUsage.php @@ -0,0 +1,287 @@ +google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.PropertyUsage + */ +class PropertyUsage extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Google Analytics Admin API property resource. + * Format: analyticsadmin.googleapis.com/properties/{property_id} + * + * Generated from protobuf field string property = 1; + */ + protected $property = ''; + /** + * The display name of the property. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The ID of the property's parent account. + * + * Generated from protobuf field int64 account_id = 3; + */ + protected $account_id = 0; + /** + * The service level of the property. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel service_level = 4; + */ + protected $service_level = 0; + /** + * The subtype of the analytics property. This affects the billable event + * count. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsPropertyType property_type = 5; + */ + protected $property_type = 0; + /** + * Total event count that the property received during the requested month. + * + * Generated from protobuf field int64 total_event_count = 6; + */ + protected $total_event_count = 0; + /** + * The number of events for which the property is billed in the requested + * month. + * + * Generated from protobuf field int64 billable_event_count = 7; + */ + protected $billable_event_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $property + * The name of the Google Analytics Admin API property resource. + * Format: analyticsadmin.googleapis.com/properties/{property_id} + * @type string $display_name + * The display name of the property. + * @type int|string $account_id + * The ID of the property's parent account. + * @type int $service_level + * The service level of the property. + * @type int $property_type + * The subtype of the analytics property. This affects the billable event + * count. + * @type int|string $total_event_count + * Total event count that the property received during the requested month. + * @type int|string $billable_event_count + * The number of events for which the property is billed in the requested + * month. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Google Analytics Admin API property resource. + * Format: analyticsadmin.googleapis.com/properties/{property_id} + * + * Generated from protobuf field string property = 1; + * @return string + */ + public function getProperty() + { + return $this->property; + } + + /** + * The name of the Google Analytics Admin API property resource. + * Format: analyticsadmin.googleapis.com/properties/{property_id} + * + * Generated from protobuf field string property = 1; + * @param string $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkString($var, True); + $this->property = $var; + + return $this; + } + + /** + * The display name of the property. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the property. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The ID of the property's parent account. + * + * Generated from protobuf field int64 account_id = 3; + * @return int|string + */ + public function getAccountId() + { + return $this->account_id; + } + + /** + * The ID of the property's parent account. + * + * Generated from protobuf field int64 account_id = 3; + * @param int|string $var + * @return $this + */ + public function setAccountId($var) + { + GPBUtil::checkInt64($var); + $this->account_id = $var; + + return $this; + } + + /** + * The service level of the property. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel service_level = 4; + * @return int + */ + public function getServiceLevel() + { + return $this->service_level; + } + + /** + * The service level of the property. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel service_level = 4; + * @param int $var + * @return $this + */ + public function setServiceLevel($var) + { + GPBUtil::checkEnum($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsServiceLevel::class); + $this->service_level = $var; + + return $this; + } + + /** + * The subtype of the analytics property. This affects the billable event + * count. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsPropertyType property_type = 5; + * @return int + */ + public function getPropertyType() + { + return $this->property_type; + } + + /** + * The subtype of the analytics property. This affects the billable event + * count. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsPropertyType property_type = 5; + * @param int $var + * @return $this + */ + public function setPropertyType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsPropertyType::class); + $this->property_type = $var; + + return $this; + } + + /** + * Total event count that the property received during the requested month. + * + * Generated from protobuf field int64 total_event_count = 6; + * @return int|string + */ + public function getTotalEventCount() + { + return $this->total_event_count; + } + + /** + * Total event count that the property received during the requested month. + * + * Generated from protobuf field int64 total_event_count = 6; + * @param int|string $var + * @return $this + */ + public function setTotalEventCount($var) + { + GPBUtil::checkInt64($var); + $this->total_event_count = $var; + + return $this; + } + + /** + * The number of events for which the property is billed in the requested + * month. + * + * Generated from protobuf field int64 billable_event_count = 7; + * @return int|string + */ + public function getBillableEventCount() + { + return $this->billable_event_count; + } + + /** + * The number of events for which the property is billed in the requested + * month. + * + * Generated from protobuf field int64 billable_event_count = 7; + * @param int|string $var + * @return $this + */ + public function setBillableEventCount($var) + { + GPBUtil::checkInt64($var); + $this->billable_event_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PropertyUsage::class, \Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse_PropertyUsage::class); + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelRequest.php new file mode 100644 index 000000000000..7212d7c51045 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelRequest.php @@ -0,0 +1,166 @@ +google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + */ +class SetPropertyServiceLevelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent AnalyticsAccountLink scope where this property is in. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * + * Generated from protobuf field string analytics_account_link = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $analytics_account_link = ''; + /** + * Required. The Analytics property to change the ServiceLevel setting. This + * field is the name of the Google Analytics Admin API property resource. + * Format: analyticsadmin.googleapis.com/properties/{property_id} + * + * Generated from protobuf field string analytics_property = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $analytics_property = ''; + /** + * Required. The service level to set for this property. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel service_level = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_level = 0; + + /** + * @param string $analyticsAccountLink Required. The parent AnalyticsAccountLink scope where this property is in. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * + * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\SetPropertyServiceLevelRequest + * + * @experimental + */ + public static function build(string $analyticsAccountLink): self + { + return (new self()) + ->setAnalyticsAccountLink($analyticsAccountLink); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $analytics_account_link + * Required. The parent AnalyticsAccountLink scope where this property is in. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * @type string $analytics_property + * Required. The Analytics property to change the ServiceLevel setting. This + * field is the name of the Google Analytics Admin API property resource. + * Format: analyticsadmin.googleapis.com/properties/{property_id} + * @type int $service_level + * Required. The service level to set for this property. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent AnalyticsAccountLink scope where this property is in. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * + * Generated from protobuf field string analytics_account_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAnalyticsAccountLink() + { + return $this->analytics_account_link; + } + + /** + * Required. The parent AnalyticsAccountLink scope where this property is in. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * + * Generated from protobuf field string analytics_account_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAnalyticsAccountLink($var) + { + GPBUtil::checkString($var, True); + $this->analytics_account_link = $var; + + return $this; + } + + /** + * Required. The Analytics property to change the ServiceLevel setting. This + * field is the name of the Google Analytics Admin API property resource. + * Format: analyticsadmin.googleapis.com/properties/{property_id} + * + * Generated from protobuf field string analytics_property = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAnalyticsProperty() + { + return $this->analytics_property; + } + + /** + * Required. The Analytics property to change the ServiceLevel setting. This + * field is the name of the Google Analytics Admin API property resource. + * Format: analyticsadmin.googleapis.com/properties/{property_id} + * + * Generated from protobuf field string analytics_property = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAnalyticsProperty($var) + { + GPBUtil::checkString($var, True); + $this->analytics_property = $var; + + return $this; + } + + /** + * Required. The service level to set for this property. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel service_level = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getServiceLevel() + { + return $this->service_level; + } + + /** + * Required. The service level to set for this property. + * + * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel service_level = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setServiceLevel($var) + { + GPBUtil::checkEnum($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsServiceLevel::class); + $this->service_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelResponse.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelResponse.php new file mode 100644 index 000000000000..c4b7adc3c69e --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelResponse.php @@ -0,0 +1,33 @@ +google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + */ +class SetPropertyServiceLevelResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php new file mode 100644 index 000000000000..6042237643e6 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php @@ -0,0 +1,94 @@ +setAnalyticsAccount($formattedAnalyticsAccountLinkAnalyticsAccount); + $request = (new CreateAnalyticsAccountLinkRequest()) + ->setParent($formattedParent) + ->setAnalyticsAccountLink($analyticsAccountLink); + + // Call the API and handle any network failures. + try { + /** @var AnalyticsAccountLink $response */ + $response = $marketingplatformAdminServiceClient->createAnalyticsAccountLink($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MarketingplatformAdminServiceClient::organizationName('[ORGANIZATION]'); + $formattedAnalyticsAccountLinkAnalyticsAccount = MarketingplatformAdminServiceClient::accountName( + '[ACCOUNT]' + ); + + create_analytics_account_link_sample( + $formattedParent, + $formattedAnalyticsAccountLinkAnalyticsAccount + ); +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAnalyticsAccountLink_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php new file mode 100644 index 000000000000..a07c70e46b47 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $marketingplatformAdminServiceClient->deleteAnalyticsAccountLink($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MarketingplatformAdminServiceClient::analyticsAccountLinkName( + '[ORGANIZATION]', + '[ANALYTICS_ACCOUNT_LINK]' + ); + + delete_analytics_account_link_sample($formattedName); +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteAnalyticsAccountLink_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php new file mode 100644 index 000000000000..89e57230a8e8 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php @@ -0,0 +1,75 @@ +setOrganization($formattedOrganization); + + // Call the API and handle any network failures. + try { + /** @var FindSalesPartnerManagedClientsResponse $response */ + $response = $marketingplatformAdminServiceClient->findSalesPartnerManagedClients($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedOrganization = MarketingplatformAdminServiceClient::organizationName('[ORGANIZATION]'); + + find_sales_partner_managed_clients_sample($formattedOrganization); +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_FindSalesPartnerManagedClients_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php new file mode 100644 index 000000000000..8120d8adf2c7 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Organization $response */ + $response = $marketingplatformAdminServiceClient->getOrganization($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MarketingplatformAdminServiceClient::organizationName('[ORGANIZATION]'); + + get_organization_sample($formattedName); +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetOrganization_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php new file mode 100644 index 000000000000..24f83c1ddf6f --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $marketingplatformAdminServiceClient->listAnalyticsAccountLinks($request); + + /** @var AnalyticsAccountLink $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MarketingplatformAdminServiceClient::organizationName('[ORGANIZATION]'); + + list_analytics_account_links_sample($formattedParent); +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAnalyticsAccountLinks_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php new file mode 100644 index 000000000000..89ea3ac3a5e2 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php @@ -0,0 +1,62 @@ +listOrganizations($request); + + /** @var Organization $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListOrganizations_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php new file mode 100644 index 000000000000..bf30ae63a7bf --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php @@ -0,0 +1,86 @@ +setOrganization($organization) + ->setMonth($month); + + // Call the API and handle any network failures. + try { + /** @var ReportPropertyUsageResponse $response */ + $response = $marketingplatformAdminServiceClient->reportPropertyUsage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $organization = '[ORGANIZATION]'; + $month = '[MONTH]'; + + report_property_usage_sample($organization, $month); +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ReportPropertyUsage_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php new file mode 100644 index 000000000000..f60fb428da21 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php @@ -0,0 +1,90 @@ +setAnalyticsAccountLink($analyticsAccountLink) + ->setAnalyticsProperty($formattedAnalyticsProperty) + ->setServiceLevel($serviceLevel); + + // Call the API and handle any network failures. + try { + /** @var SetPropertyServiceLevelResponse $response */ + $response = $marketingplatformAdminServiceClient->setPropertyServiceLevel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $analyticsAccountLink = '[ANALYTICS_ACCOUNT_LINK]'; + $formattedAnalyticsProperty = MarketingplatformAdminServiceClient::propertyName('[PROPERTY]'); + $serviceLevel = AnalyticsServiceLevel::ANALYTICS_SERVICE_LEVEL_UNSPECIFIED; + + set_property_service_level_sample( + $analyticsAccountLink, + $formattedAnalyticsProperty, + $serviceLevel + ); +} +// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_SetPropertyServiceLevel_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/Client/MarketingplatformAdminServiceClient.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/Client/MarketingplatformAdminServiceClient.php new file mode 100644 index 000000000000..5b4cec576612 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/Client/MarketingplatformAdminServiceClient.php @@ -0,0 +1,565 @@ + createAnalyticsAccountLinkAsync(CreateAnalyticsAccountLinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAnalyticsAccountLinkAsync(DeleteAnalyticsAccountLinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface findSalesPartnerManagedClientsAsync(FindSalesPartnerManagedClientsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOrganizationAsync(GetOrganizationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAnalyticsAccountLinksAsync(ListAnalyticsAccountLinksRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrganizationsAsync(ListOrganizationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface reportPropertyUsageAsync(ReportPropertyUsageRequest $request, array $optionalArgs = []) + * @method PromiseInterface setPropertyServiceLevelAsync(SetPropertyServiceLevelRequest $request, array $optionalArgs = []) + */ +final class MarketingplatformAdminServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.marketingplatform.admin.v1alpha.MarketingplatformAdminService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'marketingplatformadmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'marketingplatformadmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/marketingplatformadmin.analytics.read', + 'https://www.googleapis.com/auth/marketingplatformadmin.analytics.update', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/marketingplatform_admin_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/marketingplatform_admin_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/marketingplatform_admin_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/marketingplatform_admin_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * 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(string $account): string + { + return self::getPathTemplate('account')->render([ + 'account' => $account, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * analytics_account_link resource. + * + * @param string $organization + * @param string $analyticsAccountLink + * + * @return string The formatted analytics_account_link resource. + * + * @experimental + */ + public static function analyticsAccountLinkName(string $organization, string $analyticsAccountLink): string + { + return self::getPathTemplate('analyticsAccountLink')->render([ + 'organization' => $organization, + 'analytics_account_link' => $analyticsAccountLink, + ]); + } + + /** + * 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(string $organization): string + { + return self::getPathTemplate('organization')->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(string $property): string + { + return self::getPathTemplate('property')->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} + * - analyticsAccountLink: organizations/{organization}/analyticsAccountLinks/{analytics_account_link} + * - 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(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 'marketingplatformadmin.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use + * Google\Ads\MarketingPlatform\Admin\V1alpha\MarketingplatformAdminServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new MarketingplatformAdminServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates the link between the Analytics account and the Google Marketing + * Platform organization. + * + * User needs to be an org user, and admin on the Analytics account to create + * the link. If the account is already linked to an organization, user needs + * to unlink the account from the current organization, then try link again. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::createAnalyticsAccountLinkAsync()} . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php + * + * @param CreateAnalyticsAccountLinkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 AnalyticsAccountLink + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest $request, array $callOptions = []): AnalyticsAccountLink + { + return $this->startApiCall('CreateAnalyticsAccountLink', $request, $callOptions)->wait(); + } + + /** + * Deletes the AnalyticsAccountLink, which detaches the Analytics account from + * the Google Marketing Platform organization. + * + * User needs to be an org user, and admin on the Analytics account in order + * to delete the link. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::deleteAnalyticsAccountLinkAsync()} . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php + * + * @param DeleteAnalyticsAccountLinkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 Thrown if the API call fails. + * + * @experimental + */ + public function deleteAnalyticsAccountLink(DeleteAnalyticsAccountLinkRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAnalyticsAccountLink', $request, $callOptions)->wait(); + } + + /** + * Returns a list of clients managed by the sales partner organization. + * + * User needs to be an OrgAdmin/BillingAdmin on the sales partner organization + * in order to view the end clients. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::findSalesPartnerManagedClientsAsync()} + * . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php + * + * @param FindSalesPartnerManagedClientsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 FindSalesPartnerManagedClientsResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function findSalesPartnerManagedClients(FindSalesPartnerManagedClientsRequest $request, array $callOptions = []): FindSalesPartnerManagedClientsResponse + { + return $this->startApiCall('FindSalesPartnerManagedClients', $request, $callOptions)->wait(); + } + + /** + * Lookup for a single organization. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::getOrganizationAsync()} . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php + * + * @param GetOrganizationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 Organization + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getOrganization(GetOrganizationRequest $request, array $callOptions = []): Organization + { + return $this->startApiCall('GetOrganization', $request, $callOptions)->wait(); + } + + /** + * Lists the Google Analytics accounts link to the specified Google Marketing + * Platform organization. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::listAnalyticsAccountLinksAsync()} . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php + * + * @param ListAnalyticsAccountLinksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAnalyticsAccountLinks', $request, $callOptions); + } + + /** + * Returns a list of organizations that the user has access to. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::listOrganizationsAsync()} . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php + * + * @param ListOrganizationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listOrganizations(ListOrganizationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOrganizations', $request, $callOptions); + } + + /** + * Get the usage and billing data for properties within the organization for + * the specified month. + * + * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the + * organization in order to view the billing and usage data. + * + * Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on + * the sales partner org in order to view the billing and usage data, or + * OrgAdmin/BillingAdmin on the sales partner client org in order to view the + * usage data only. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::reportPropertyUsageAsync()} . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php + * + * @param ReportPropertyUsageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 ReportPropertyUsageResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function reportPropertyUsage(ReportPropertyUsageRequest $request, array $callOptions = []): ReportPropertyUsageResponse + { + return $this->startApiCall('ReportPropertyUsage', $request, $callOptions)->wait(); + } + + /** + * Updates the service level for an Analytics property. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::setPropertyServiceLevelAsync()} . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php + * + * @param SetPropertyServiceLevelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 SetPropertyServiceLevelResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function setPropertyServiceLevel(SetPropertyServiceLevelRequest $request, array $callOptions = []): SetPropertyServiceLevelResponse + { + return $this->startApiCall('SetPropertyServiceLevel', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/gapic_metadata.json b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/gapic_metadata.json new file mode 100644 index 000000000000..ff2104782c8e --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.marketingplatform.admin.v1alpha", + "libraryPackage": "Google\\Ads\\MarketingPlatform\\Admin\\V1alpha", + "services": { + "MarketingplatformAdminService": { + "clients": { + "grpc": { + "libraryClient": "MarketingplatformAdminServiceGapicClient", + "rpcs": { + "CreateAnalyticsAccountLink": { + "methods": [ + "createAnalyticsAccountLink" + ] + }, + "DeleteAnalyticsAccountLink": { + "methods": [ + "deleteAnalyticsAccountLink" + ] + }, + "FindSalesPartnerManagedClients": { + "methods": [ + "findSalesPartnerManagedClients" + ] + }, + "GetOrganization": { + "methods": [ + "getOrganization" + ] + }, + "ListAnalyticsAccountLinks": { + "methods": [ + "listAnalyticsAccountLinks" + ] + }, + "ListOrganizations": { + "methods": [ + "listOrganizations" + ] + }, + "ReportPropertyUsage": { + "methods": [ + "reportPropertyUsage" + ] + }, + "SetPropertyServiceLevel": { + "methods": [ + "setPropertyServiceLevel" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_client_config.json b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_client_config.json new file mode 100644 index 000000000000..21a2f2499a87 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_client_config.json @@ -0,0 +1,75 @@ +{ + "interfaces": { + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "UNKNOWN" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateAnalyticsAccountLink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteAnalyticsAccountLink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "FindSalesPartnerManagedClients": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetOrganization": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAnalyticsAccountLinks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListOrganizations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ReportPropertyUsage": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetPropertyServiceLevel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php new file mode 100644 index 000000000000..d25b5bef386e --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php @@ -0,0 +1,138 @@ + [ + 'google.marketingplatform.admin.v1alpha.MarketingplatformAdminService' => [ + 'CreateAnalyticsAccountLink' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAnalyticsAccountLink' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'FindSalesPartnerManagedClients' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\FindSalesPartnerManagedClientsResponse', + 'headerParams' => [ + [ + 'keyName' => 'organization', + 'fieldAccessors' => [ + 'getOrganization', + ], + ], + ], + ], + 'GetOrganization' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\Organization', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAnalyticsAccountLinks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAnalyticsAccountLinks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\ListAnalyticsAccountLinksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrganizations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOrganizations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\ListOrganizationsResponse', + ], + 'ReportPropertyUsage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse', + 'headerParams' => [ + [ + 'keyName' => 'organization', + 'fieldAccessors' => [ + 'getOrganization', + ], + ], + ], + ], + 'SetPropertyServiceLevel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\SetPropertyServiceLevelResponse', + 'headerParams' => [ + [ + 'keyName' => 'analytics_account_link', + 'fieldAccessors' => [ + 'getAnalyticsAccountLink', + ], + ], + ], + ], + 'templateMap' => [ + 'account' => 'accounts/{account}', + 'analyticsAccountLink' => 'organizations/{organization}/analyticsAccountLinks/{analytics_account_link}', + 'organization' => 'organizations/{organization}', + 'property' => 'properties/{property}', + ], + ], + ], +]; diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php new file mode 100644 index 000000000000..49883f457e7f --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php @@ -0,0 +1,114 @@ + [ + 'google.marketingplatform.admin.v1alpha.MarketingplatformAdminService' => [ + 'CreateAnalyticsAccountLink' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/{parent=organizations/*}/analyticsAccountLinks', + 'body' => 'analytics_account_link', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAnalyticsAccountLink' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1alpha/{name=organizations/*/analyticsAccountLinks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FindSalesPartnerManagedClients' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/{organization=organizations/*}:findSalesPartnerManagedClients', + 'body' => '*', + 'placeholders' => [ + 'organization' => [ + 'getters' => [ + 'getOrganization', + ], + ], + ], + ], + 'GetOrganization' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha/{name=organizations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAnalyticsAccountLinks' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha/{parent=organizations/*}/analyticsAccountLinks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrganizations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha/organizations', + ], + 'ReportPropertyUsage' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/{organization=organizations/*}:reportPropertyUsage', + 'body' => '*', + 'placeholders' => [ + 'organization' => [ + 'getters' => [ + 'getOrganization', + ], + ], + ], + ], + 'SetPropertyServiceLevel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/{analytics_account_link=organizations/*/analyticsAccountLinks/*}:setPropertyServiceLevel', + 'body' => '*', + 'placeholders' => [ + 'analytics_account_link' => [ + 'getters' => [ + 'getAnalyticsAccountLink', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php new file mode 100644 index 000000000000..30b37de0e432 --- /dev/null +++ b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php @@ -0,0 +1,661 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MarketingplatformAdminServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MarketingplatformAdminServiceClient($options); + } + + /** @test */ + public function createAnalyticsAccountLinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $analyticsAccount = 'analyticsAccount1988159092'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AnalyticsAccountLink(); + $expectedResponse->setName($name); + $expectedResponse->setAnalyticsAccount($analyticsAccount); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $analyticsAccountLink = new AnalyticsAccountLink(); + $analyticsAccountLinkAnalyticsAccount = $gapicClient->accountName('[ACCOUNT]'); + $analyticsAccountLink->setAnalyticsAccount($analyticsAccountLinkAnalyticsAccount); + $request = (new CreateAnalyticsAccountLinkRequest()) + ->setParent($formattedParent) + ->setAnalyticsAccountLink($analyticsAccountLink); + $response = $gapicClient->createAnalyticsAccountLink($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateAnalyticsAccountLink', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAnalyticsAccountLink(); + $this->assertProtobufEquals($analyticsAccountLink, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAnalyticsAccountLinkExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $analyticsAccountLink = new AnalyticsAccountLink(); + $analyticsAccountLinkAnalyticsAccount = $gapicClient->accountName('[ACCOUNT]'); + $analyticsAccountLink->setAnalyticsAccount($analyticsAccountLinkAnalyticsAccount); + $request = (new CreateAnalyticsAccountLinkRequest()) + ->setParent($formattedParent) + ->setAnalyticsAccountLink($analyticsAccountLink); + try { + $gapicClient->createAnalyticsAccountLink($request); + // 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 deleteAnalyticsAccountLinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->analyticsAccountLinkName('[ORGANIZATION]', '[ANALYTICS_ACCOUNT_LINK]'); + $request = (new DeleteAnalyticsAccountLinkRequest()) + ->setName($formattedName); + $gapicClient->deleteAnalyticsAccountLink($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/DeleteAnalyticsAccountLink', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAnalyticsAccountLinkExceptionTest() + { + $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->analyticsAccountLinkName('[ORGANIZATION]', '[ANALYTICS_ACCOUNT_LINK]'); + $request = (new DeleteAnalyticsAccountLinkRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAnalyticsAccountLink($request); + // 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 findSalesPartnerManagedClientsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new FindSalesPartnerManagedClientsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedOrganization = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new FindSalesPartnerManagedClientsRequest()) + ->setOrganization($formattedOrganization); + $response = $gapicClient->findSalesPartnerManagedClients($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/FindSalesPartnerManagedClients', $actualFuncCall); + $actualValue = $actualRequestObject->getOrganization(); + $this->assertProtobufEquals($formattedOrganization, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function findSalesPartnerManagedClientsExceptionTest() + { + $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 + $formattedOrganization = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new FindSalesPartnerManagedClientsRequest()) + ->setOrganization($formattedOrganization); + try { + $gapicClient->findSalesPartnerManagedClients($request); + // 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 getOrganizationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Organization(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new GetOrganizationRequest()) + ->setName($formattedName); + $response = $gapicClient->getOrganization($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/GetOrganization', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrganizationExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $request = (new GetOrganizationRequest()) + ->setName($formattedName); + try { + $gapicClient->getOrganization($request); + // 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 listAnalyticsAccountLinksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $analyticsAccountLinksElement = new AnalyticsAccountLink(); + $analyticsAccountLinks = [ + $analyticsAccountLinksElement, + ]; + $expectedResponse = new ListAnalyticsAccountLinksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAnalyticsAccountLinks($analyticsAccountLinks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new ListAnalyticsAccountLinksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAnalyticsAccountLinks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAnalyticsAccountLinks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListAnalyticsAccountLinks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAnalyticsAccountLinksExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $request = (new ListAnalyticsAccountLinksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAnalyticsAccountLinks($request); + // 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 listOrganizationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $organizationsElement = new Organization(); + $organizations = [ + $organizationsElement, + ]; + $expectedResponse = new ListOrganizationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOrganizations($organizations); + $transport->addResponse($expectedResponse); + $request = new ListOrganizationsRequest(); + $response = $gapicClient->listOrganizations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOrganizations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListOrganizations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrganizationsExceptionTest() + { + $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); + $request = new ListOrganizationsRequest(); + try { + $gapicClient->listOrganizations($request); + // 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 reportPropertyUsageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReportPropertyUsageResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $organization = 'organization1178922291'; + $month = 'month104080000'; + $request = (new ReportPropertyUsageRequest()) + ->setOrganization($organization) + ->setMonth($month); + $response = $gapicClient->reportPropertyUsage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ReportPropertyUsage', $actualFuncCall); + $actualValue = $actualRequestObject->getOrganization(); + $this->assertProtobufEquals($organization, $actualValue); + $actualValue = $actualRequestObject->getMonth(); + $this->assertProtobufEquals($month, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reportPropertyUsageExceptionTest() + { + $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 + $organization = 'organization1178922291'; + $month = 'month104080000'; + $request = (new ReportPropertyUsageRequest()) + ->setOrganization($organization) + ->setMonth($month); + try { + $gapicClient->reportPropertyUsage($request); + // 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 setPropertyServiceLevelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SetPropertyServiceLevelResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $analyticsAccountLink = 'analyticsAccountLink-545363227'; + $formattedAnalyticsProperty = $gapicClient->propertyName('[PROPERTY]'); + $serviceLevel = AnalyticsServiceLevel::ANALYTICS_SERVICE_LEVEL_UNSPECIFIED; + $request = (new SetPropertyServiceLevelRequest()) + ->setAnalyticsAccountLink($analyticsAccountLink) + ->setAnalyticsProperty($formattedAnalyticsProperty) + ->setServiceLevel($serviceLevel); + $response = $gapicClient->setPropertyServiceLevel($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/SetPropertyServiceLevel', $actualFuncCall); + $actualValue = $actualRequestObject->getAnalyticsAccountLink(); + $this->assertProtobufEquals($analyticsAccountLink, $actualValue); + $actualValue = $actualRequestObject->getAnalyticsProperty(); + $this->assertProtobufEquals($formattedAnalyticsProperty, $actualValue); + $actualValue = $actualRequestObject->getServiceLevel(); + $this->assertProtobufEquals($serviceLevel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setPropertyServiceLevelExceptionTest() + { + $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 + $analyticsAccountLink = 'analyticsAccountLink-545363227'; + $formattedAnalyticsProperty = $gapicClient->propertyName('[PROPERTY]'); + $serviceLevel = AnalyticsServiceLevel::ANALYTICS_SERVICE_LEVEL_UNSPECIFIED; + $request = (new SetPropertyServiceLevelRequest()) + ->setAnalyticsAccountLink($analyticsAccountLink) + ->setAnalyticsProperty($formattedAnalyticsProperty) + ->setServiceLevel($serviceLevel); + try { + $gapicClient->setPropertyServiceLevel($request); + // 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 createAnalyticsAccountLinkAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $analyticsAccount = 'analyticsAccount1988159092'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AnalyticsAccountLink(); + $expectedResponse->setName($name); + $expectedResponse->setAnalyticsAccount($analyticsAccount); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $analyticsAccountLink = new AnalyticsAccountLink(); + $analyticsAccountLinkAnalyticsAccount = $gapicClient->accountName('[ACCOUNT]'); + $analyticsAccountLink->setAnalyticsAccount($analyticsAccountLinkAnalyticsAccount); + $request = (new CreateAnalyticsAccountLinkRequest()) + ->setParent($formattedParent) + ->setAnalyticsAccountLink($analyticsAccountLink); + $response = $gapicClient->createAnalyticsAccountLinkAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateAnalyticsAccountLink', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAnalyticsAccountLink(); + $this->assertProtobufEquals($analyticsAccountLink, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From e6817648376c89c557e8ade90f27d0682343d7f6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 30 Oct 2025 22:19:12 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../V1Alpha/MarketingplatformAdmin.php | Bin 4265 -> 6468 bytes .../metadata/V1Alpha/Resources.php | Bin 1932 -> 2255 bytes .../find_sales_partner_managed_clients.php | 0 .../list_organizations.php | 0 .../report_property_usage.php | 0 .../src}/V1alpha/AnalyticsPropertyType.php | 0 .../src/V1alpha/AnalyticsServiceLevel.php | 2 +- .../MarketingplatformAdminServiceClient.php | 139 +++- .../FindSalesPartnerManagedClientsRequest.php | 0 ...FindSalesPartnerManagedClientsResponse.php | 0 .../ClientData.php | 0 .../src}/V1alpha/ListOrganizationsRequest.php | 0 .../V1alpha/ListOrganizationsResponse.php | 0 .../V1alpha/ReportPropertyUsageRequest.php | 0 .../V1alpha/ReportPropertyUsageResponse.php | 0 .../ReportPropertyUsageResponse/BillInfo.php | 0 .../PropertyUsage.php | 0 .../src/V1alpha/gapic_metadata.json | 15 + ...gplatform_admin_service_client_config.json | 15 + ...atform_admin_service_descriptor_config.php | 36 + ...tform_admin_service_rest_client_config.php | 28 + ...arketingplatformAdminServiceClientTest.php | 210 ++++++ .../Admin/V1Alpha/MarketingplatformAdmin.php | 107 --- .../Admin/V1Alpha/Resources.php | Bin 2255 -> 0 bytes .../Admin/V1alpha/AnalyticsAccountLink.php | 202 ------ .../Admin/V1alpha/AnalyticsServiceLevel.php | 61 -- .../CreateAnalyticsAccountLinkRequest.php | 132 ---- .../DeleteAnalyticsAccountLinkRequest.php | 91 --- .../Admin/V1alpha/GetOrganizationRequest.php | 86 --- .../Admin/V1alpha/LinkVerificationState.php | 63 -- .../ListAnalyticsAccountLinksRequest.php | 182 ----- .../ListAnalyticsAccountLinksResponse.php | 105 --- .../Admin/V1alpha/Organization.php | 105 --- .../SetPropertyServiceLevelRequest.php | 166 ----- .../SetPropertyServiceLevelResponse.php | 33 - .../create_analytics_account_link.php | 94 --- .../delete_analytics_account_link.php | 78 --- .../get_organization.php | 72 -- .../list_analytics_account_links.php | 78 --- .../set_property_service_level.php | 90 --- .../MarketingplatformAdminServiceClient.php | 565 --------------- .../v1alpha/src/V1alpha/gapic_metadata.json | 58 -- ...gplatform_admin_service_client_config.json | 75 -- ...atform_admin_service_descriptor_config.php | 138 ---- ...tform_admin_service_rest_client_config.php | 114 --- ...arketingplatformAdminServiceClientTest.php | 661 ------------------ 46 files changed, 435 insertions(+), 3366 deletions(-) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha => AdsMarketingPlatformAdmin}/samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha => AdsMarketingPlatformAdmin}/samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha => AdsMarketingPlatformAdmin}/samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/AnalyticsPropertyType.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/FindSalesPartnerManagedClientsRequest.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/FindSalesPartnerManagedClientsResponse.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/FindSalesPartnerManagedClientsResponse/ClientData.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/ListOrganizationsRequest.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/ListOrganizationsResponse.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/ReportPropertyUsageRequest.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/ReportPropertyUsageResponse.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/ReportPropertyUsageResponse/BillInfo.php (100%) rename {owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin => AdsMarketingPlatformAdmin/src}/V1alpha/ReportPropertyUsageResponse/PropertyUsage.php (100%) delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/MarketingplatformAdmin.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/Resources.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsAccountLink.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsServiceLevel.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/CreateAnalyticsAccountLinkRequest.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/DeleteAnalyticsAccountLinkRequest.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/GetOrganizationRequest.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/LinkVerificationState.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksRequest.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksResponse.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/Organization.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelRequest.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelResponse.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/Client/MarketingplatformAdminServiceClient.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/gapic_metadata.json delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_client_config.json delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php delete mode 100644 owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php diff --git a/AdsMarketingPlatformAdmin/metadata/V1Alpha/MarketingplatformAdmin.php b/AdsMarketingPlatformAdmin/metadata/V1Alpha/MarketingplatformAdmin.php index c61a0aa0312e069f62b003cce89ed805f5484c88..61ac1830f80fce6e55bd8442ad06749da0f9b7e1 100644 GIT binary patch delta 1771 zcma)6&rcIU6wdCp*nI_sfxxmNks?Z(*oJCi#9$~85-lhoBxsDAp&ejl*NK_E;90flQ(?>=c&0)1jks3<9it{9tT?{ zY(qRRG8wFlnA2r!?{l{ECqqb;h_c3E{iOtO_(ZpBIg9d^OEF(v3e*SSQ>LDCC<%#Y zT2iH6rg)E244$A~h!ML`a#C1F!kqU0M0S*7A_w{maUG9Nd5%jwx-sXoqE?#T8A437 zS4Ie;Y;NfCVaw&jmnfVKMJw0vF`QxJC(;;eJdf&^3pvdTd9zMzs)ipjKwU5`%P{Rl zM=*$ICOAZ~9>fTXxWxkWT^X8c@tPr4VJ51tqBdwOn7(V_4a3H(rDCg0HQ;>SS+l8O z7BpU41qa?4c;6r%KonvE1CJ~qE2X`4#k$i0vV`) z)*1wE7qoGWc)=ny)>GW7zm_0Y5ri&4YytbkSR|$0jAu~IREPt?rblI2iYyKHFR6Xqiq?w>+dU?_oM_0r;!v=(hx|AuE7J zIM1#SOGU`25EAN8WMCAnNCuVYc4EX4ADvJq?QW;>3x%=KFBj9j9Qd5JldC7H>^ z!Kp=MnaQa>sb#4-LNV%G%8q`HK9M1w&cX4)u0dg*&aUx3u3@e|@u7af0j|!TZl10# z0t`YbTne}p28THMxi|*72rvrCb4g>U;)j}NY-S+9WVDHUGB5uvmS2oql9T@lN^ZU) M_@8<6X|YNs0AGeY;s5{u diff --git a/AdsMarketingPlatformAdmin/metadata/V1Alpha/Resources.php b/AdsMarketingPlatformAdmin/metadata/V1Alpha/Resources.php index 70c3cd04ece1cb8fed693765fa1972e75e291bba..e04334ee8e5bf18f23bba551f992ad6192efcfd6 100644 GIT binary patch delta 346 zcmeC-KQFi;i-~C}&*mJa66SiXc1A8y$GpUx%970F;^5SxvdrXEpVYF{9HAI>E@ekQ zN1wboO1O)j9xCVtp#)m`(Om1Wqu1A=Q zEae*SALQcc=NJ?Tv>nwqsLFyvonQh2OhQUra=6S3^7rux4G>^v*u%dei;3wf=jI%y66Vdy>}wbSOST4@ diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php b/AdsMarketingPlatformAdmin/samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php rename to AdsMarketingPlatformAdmin/samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php b/AdsMarketingPlatformAdmin/samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php rename to AdsMarketingPlatformAdmin/samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php b/AdsMarketingPlatformAdmin/samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php rename to AdsMarketingPlatformAdmin/samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsPropertyType.php b/AdsMarketingPlatformAdmin/src/V1alpha/AnalyticsPropertyType.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsPropertyType.php rename to AdsMarketingPlatformAdmin/src/V1alpha/AnalyticsPropertyType.php diff --git a/AdsMarketingPlatformAdmin/src/V1alpha/AnalyticsServiceLevel.php b/AdsMarketingPlatformAdmin/src/V1alpha/AnalyticsServiceLevel.php index e42cc8fe0f91..d7f4fce38ecf 100644 --- a/AdsMarketingPlatformAdmin/src/V1alpha/AnalyticsServiceLevel.php +++ b/AdsMarketingPlatformAdmin/src/V1alpha/AnalyticsServiceLevel.php @@ -1,6 +1,6 @@ createAnalyticsAccountLinkAsync(CreateAnalyticsAccountLinkRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteAnalyticsAccountLinkAsync(DeleteAnalyticsAccountLinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface findSalesPartnerManagedClientsAsync(FindSalesPartnerManagedClientsRequest $request, array $optionalArgs = []) * @method PromiseInterface getOrganizationAsync(GetOrganizationRequest $request, array $optionalArgs = []) * @method PromiseInterface listAnalyticsAccountLinksAsync(ListAnalyticsAccountLinksRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrganizationsAsync(ListOrganizationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface reportPropertyUsageAsync(ReportPropertyUsageRequest $request, array $optionalArgs = []) * @method PromiseInterface setPropertyServiceLevelAsync(SetPropertyServiceLevelRequest $request, array $optionalArgs = []) */ final class MarketingplatformAdminServiceClient @@ -109,7 +117,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/marketingplatform_admin_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/marketingplatform_admin_service_rest_client_config.php', ], ], ]; @@ -331,8 +340,10 @@ public function __call($method, $args) * * @experimental */ - public function createAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest $request, array $callOptions = []): AnalyticsAccountLink - { + public function createAnalyticsAccountLink( + CreateAnalyticsAccountLinkRequest $request, + array $callOptions = [] + ): AnalyticsAccountLink { return $this->startApiCall('CreateAnalyticsAccountLink', $request, $callOptions)->wait(); } @@ -362,11 +373,48 @@ public function createAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest $re * * @experimental */ - public function deleteAnalyticsAccountLink(DeleteAnalyticsAccountLinkRequest $request, array $callOptions = []): void - { + public function deleteAnalyticsAccountLink( + DeleteAnalyticsAccountLinkRequest $request, + array $callOptions = [] + ): void { $this->startApiCall('DeleteAnalyticsAccountLink', $request, $callOptions)->wait(); } + /** + * Returns a list of clients managed by the sales partner organization. + * + * User needs to be an OrgAdmin/BillingAdmin on the sales partner organization + * in order to view the end clients. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::findSalesPartnerManagedClientsAsync()} + * . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php + * + * @param FindSalesPartnerManagedClientsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 FindSalesPartnerManagedClientsResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function findSalesPartnerManagedClients( + FindSalesPartnerManagedClientsRequest $request, + array $callOptions = [] + ): FindSalesPartnerManagedClientsResponse { + return $this->startApiCall('FindSalesPartnerManagedClients', $request, $callOptions)->wait(); + } + /** * Lookup for a single organization. * @@ -421,11 +469,82 @@ public function getOrganization(GetOrganizationRequest $request, array $callOpti * * @experimental */ - public function listAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest $request, array $callOptions = []): PagedListResponse - { + public function listAnalyticsAccountLinks( + ListAnalyticsAccountLinksRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListAnalyticsAccountLinks', $request, $callOptions); } + /** + * Returns a list of organizations that the user has access to. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::listOrganizationsAsync()} . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php + * + * @param ListOrganizationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listOrganizations(ListOrganizationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOrganizations', $request, $callOptions); + } + + /** + * Get the usage and billing data for properties within the organization for + * the specified month. + * + * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the + * organization in order to view the billing and usage data. + * + * Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on + * the sales partner org in order to view the billing and usage data, or + * OrgAdmin/BillingAdmin on the sales partner client org in order to view the + * usage data only. + * + * The async variant is + * {@see MarketingplatformAdminServiceClient::reportPropertyUsageAsync()} . + * + * @example samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php + * + * @param ReportPropertyUsageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * 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 ReportPropertyUsageResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function reportPropertyUsage( + ReportPropertyUsageRequest $request, + array $callOptions = [] + ): ReportPropertyUsageResponse { + return $this->startApiCall('ReportPropertyUsage', $request, $callOptions)->wait(); + } + /** * Updates the service level for an Analytics property. * @@ -450,8 +569,10 @@ public function listAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest $requ * * @experimental */ - public function setPropertyServiceLevel(SetPropertyServiceLevelRequest $request, array $callOptions = []): SetPropertyServiceLevelResponse - { + public function setPropertyServiceLevel( + SetPropertyServiceLevelRequest $request, + array $callOptions = [] + ): SetPropertyServiceLevelResponse { return $this->startApiCall('SetPropertyServiceLevel', $request, $callOptions)->wait(); } } diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsRequest.php b/AdsMarketingPlatformAdmin/src/V1alpha/FindSalesPartnerManagedClientsRequest.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsRequest.php rename to AdsMarketingPlatformAdmin/src/V1alpha/FindSalesPartnerManagedClientsRequest.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse.php b/AdsMarketingPlatformAdmin/src/V1alpha/FindSalesPartnerManagedClientsResponse.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse.php rename to AdsMarketingPlatformAdmin/src/V1alpha/FindSalesPartnerManagedClientsResponse.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse/ClientData.php b/AdsMarketingPlatformAdmin/src/V1alpha/FindSalesPartnerManagedClientsResponse/ClientData.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/FindSalesPartnerManagedClientsResponse/ClientData.php rename to AdsMarketingPlatformAdmin/src/V1alpha/FindSalesPartnerManagedClientsResponse/ClientData.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsRequest.php b/AdsMarketingPlatformAdmin/src/V1alpha/ListOrganizationsRequest.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsRequest.php rename to AdsMarketingPlatformAdmin/src/V1alpha/ListOrganizationsRequest.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsResponse.php b/AdsMarketingPlatformAdmin/src/V1alpha/ListOrganizationsResponse.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListOrganizationsResponse.php rename to AdsMarketingPlatformAdmin/src/V1alpha/ListOrganizationsResponse.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageRequest.php b/AdsMarketingPlatformAdmin/src/V1alpha/ReportPropertyUsageRequest.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageRequest.php rename to AdsMarketingPlatformAdmin/src/V1alpha/ReportPropertyUsageRequest.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse.php b/AdsMarketingPlatformAdmin/src/V1alpha/ReportPropertyUsageResponse.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse.php rename to AdsMarketingPlatformAdmin/src/V1alpha/ReportPropertyUsageResponse.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/BillInfo.php b/AdsMarketingPlatformAdmin/src/V1alpha/ReportPropertyUsageResponse/BillInfo.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/BillInfo.php rename to AdsMarketingPlatformAdmin/src/V1alpha/ReportPropertyUsageResponse/BillInfo.php diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/PropertyUsage.php b/AdsMarketingPlatformAdmin/src/V1alpha/ReportPropertyUsageResponse/PropertyUsage.php similarity index 100% rename from owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ReportPropertyUsageResponse/PropertyUsage.php rename to AdsMarketingPlatformAdmin/src/V1alpha/ReportPropertyUsageResponse/PropertyUsage.php diff --git a/AdsMarketingPlatformAdmin/src/V1alpha/gapic_metadata.json b/AdsMarketingPlatformAdmin/src/V1alpha/gapic_metadata.json index 4066f7b204b7..ff2104782c8e 100644 --- a/AdsMarketingPlatformAdmin/src/V1alpha/gapic_metadata.json +++ b/AdsMarketingPlatformAdmin/src/V1alpha/gapic_metadata.json @@ -20,6 +20,11 @@ "deleteAnalyticsAccountLink" ] }, + "FindSalesPartnerManagedClients": { + "methods": [ + "findSalesPartnerManagedClients" + ] + }, "GetOrganization": { "methods": [ "getOrganization" @@ -30,6 +35,16 @@ "listAnalyticsAccountLinks" ] }, + "ListOrganizations": { + "methods": [ + "listOrganizations" + ] + }, + "ReportPropertyUsage": { + "methods": [ + "reportPropertyUsage" + ] + }, "SetPropertyServiceLevel": { "methods": [ "setPropertyServiceLevel" diff --git a/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_client_config.json b/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_client_config.json index 4ffda61291aa..21a2f2499a87 100644 --- a/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_client_config.json +++ b/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_client_config.json @@ -39,6 +39,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "FindSalesPartnerManagedClients": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetOrganization": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", @@ -49,6 +54,16 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "ListOrganizations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ReportPropertyUsage": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "SetPropertyServiceLevel": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", diff --git a/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php b/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php index 279e5fb82782..bbaeb7f1388a 100644 --- a/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php +++ b/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php @@ -47,6 +47,18 @@ ], ], ], + 'FindSalesPartnerManagedClients' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\FindSalesPartnerManagedClientsResponse', + 'headerParams' => [ + [ + 'keyName' => 'organization', + 'fieldAccessors' => [ + 'getOrganization', + ], + ], + ], + ], 'GetOrganization' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\Organization', @@ -79,6 +91,30 @@ ], ], ], + 'ListOrganizations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOrganizations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\ListOrganizationsResponse', + ], + 'ReportPropertyUsage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse', + 'headerParams' => [ + [ + 'keyName' => 'organization', + 'fieldAccessors' => [ + 'getOrganization', + ], + ], + ], + ], 'SetPropertyServiceLevel' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\SetPropertyServiceLevelResponse', diff --git a/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php b/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php index 268599714999..8dcd724827e3 100644 --- a/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php +++ b/AdsMarketingPlatformAdmin/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php @@ -46,6 +46,18 @@ ], ], ], + 'FindSalesPartnerManagedClients' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/{organization=organizations/*}:findSalesPartnerManagedClients', + 'body' => '*', + 'placeholders' => [ + 'organization' => [ + 'getters' => [ + 'getOrganization', + ], + ], + ], + ], 'GetOrganization' => [ 'method' => 'get', 'uriTemplate' => '/v1alpha/{name=organizations/*}', @@ -68,6 +80,22 @@ ], ], ], + 'ListOrganizations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha/organizations', + ], + 'ReportPropertyUsage' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/{organization=organizations/*}:reportPropertyUsage', + 'body' => '*', + 'placeholders' => [ + 'organization' => [ + 'getters' => [ + 'getOrganization', + ], + ], + ], + ], 'SetPropertyServiceLevel' => [ 'method' => 'post', 'uriTemplate' => '/v1alpha/{analytics_account_link=organizations/*/analyticsAccountLinks/*}:setPropertyServiceLevel', diff --git a/AdsMarketingPlatformAdmin/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php b/AdsMarketingPlatformAdmin/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php index bafdf669b1ca..247cefeac659 100644 --- a/AdsMarketingPlatformAdmin/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php +++ b/AdsMarketingPlatformAdmin/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php @@ -27,10 +27,16 @@ use Google\Ads\MarketingPlatform\Admin\V1alpha\Client\MarketingplatformAdminServiceClient; use Google\Ads\MarketingPlatform\Admin\V1alpha\CreateAnalyticsAccountLinkRequest; use Google\Ads\MarketingPlatform\Admin\V1alpha\DeleteAnalyticsAccountLinkRequest; +use Google\Ads\MarketingPlatform\Admin\V1alpha\FindSalesPartnerManagedClientsRequest; +use Google\Ads\MarketingPlatform\Admin\V1alpha\FindSalesPartnerManagedClientsResponse; use Google\Ads\MarketingPlatform\Admin\V1alpha\GetOrganizationRequest; use Google\Ads\MarketingPlatform\Admin\V1alpha\ListAnalyticsAccountLinksRequest; use Google\Ads\MarketingPlatform\Admin\V1alpha\ListAnalyticsAccountLinksResponse; +use Google\Ads\MarketingPlatform\Admin\V1alpha\ListOrganizationsRequest; +use Google\Ads\MarketingPlatform\Admin\V1alpha\ListOrganizationsResponse; use Google\Ads\MarketingPlatform\Admin\V1alpha\Organization; +use Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageRequest; +use Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse; use Google\Ads\MarketingPlatform\Admin\V1alpha\SetPropertyServiceLevelRequest; use Google\Ads\MarketingPlatform\Admin\V1alpha\SetPropertyServiceLevelResponse; use Google\ApiCore\ApiException; @@ -220,6 +226,72 @@ public function deleteAnalyticsAccountLinkExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function findSalesPartnerManagedClientsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new FindSalesPartnerManagedClientsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedOrganization = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new FindSalesPartnerManagedClientsRequest())->setOrganization($formattedOrganization); + $response = $gapicClient->findSalesPartnerManagedClients($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/FindSalesPartnerManagedClients', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getOrganization(); + $this->assertProtobufEquals($formattedOrganization, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function findSalesPartnerManagedClientsExceptionTest() + { + $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 + $formattedOrganization = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new FindSalesPartnerManagedClientsRequest())->setOrganization($formattedOrganization); + try { + $gapicClient->findSalesPartnerManagedClients($request); + // 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 getOrganizationTest() { @@ -364,6 +436,144 @@ public function listAnalyticsAccountLinksExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function listOrganizationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $organizationsElement = new Organization(); + $organizations = [$organizationsElement]; + $expectedResponse = new ListOrganizationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOrganizations($organizations); + $transport->addResponse($expectedResponse); + $request = new ListOrganizationsRequest(); + $response = $gapicClient->listOrganizations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOrganizations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListOrganizations', + $actualFuncCall + ); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrganizationsExceptionTest() + { + $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); + $request = new ListOrganizationsRequest(); + try { + $gapicClient->listOrganizations($request); + // 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 reportPropertyUsageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReportPropertyUsageResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $organization = 'organization1178922291'; + $month = 'month104080000'; + $request = (new ReportPropertyUsageRequest())->setOrganization($organization)->setMonth($month); + $response = $gapicClient->reportPropertyUsage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ReportPropertyUsage', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getOrganization(); + $this->assertProtobufEquals($organization, $actualValue); + $actualValue = $actualRequestObject->getMonth(); + $this->assertProtobufEquals($month, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reportPropertyUsageExceptionTest() + { + $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 + $organization = 'organization1178922291'; + $month = 'month104080000'; + $request = (new ReportPropertyUsageRequest())->setOrganization($organization)->setMonth($month); + try { + $gapicClient->reportPropertyUsage($request); + // 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 setPropertyServiceLevelTest() { diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/MarketingplatformAdmin.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/MarketingplatformAdmin.php deleted file mode 100644 index 61ac1830f80f..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/MarketingplatformAdmin.php +++ /dev/null @@ -1,107 +0,0 @@ -internalAddGeneratedFile( - ' -’* -Dgoogle/marketingplatform/admin/v1alpha/marketingplatform_admin.proto&google.marketingplatform.admin.v1alphagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto6google/marketingplatform/admin/v1alpha/resources.protogoogle/protobuf/empty.protogoogle/type/date.protogoogle/type/money.proto"b -GetOrganizationRequestH -name ( B:àAúA4 -2marketingplatformadmin.googleapis.com/Organization"K -ListOrganizationsRequest - page_size (BàA - -page_token ( BàA" -ListOrganizationsResponseK - organizations ( 24.google.marketingplatform.admin.v1alpha.Organization -next_page_token ( "‘ -%FindSalesPartnerManagedClientsRequestP - organization ( B:àAúA4 -2marketingplatformadmin.googleapis.com/Organization - is_active (BàA"¿ -&FindSalesPartnerManagedClientsResponsen - client_data ( 2Y.google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse.ClientData¤ - -ClientDataJ - organization ( 24.google.marketingplatform.admin.v1alpha.Organization% - -start_date ( 2.google.type.Date# -end_date ( 2.google.type.Date"§ - ListAnalyticsAccountLinksRequestR -parent ( BBàAúA<:marketingplatformadmin.googleapis.com/AnalyticsAccountLink - page_size (BàA - -page_token ( BàA"› -!ListAnalyticsAccountLinksResponse] -analytics_account_links ( 2<.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink -next_page_token ( "Ú -!CreateAnalyticsAccountLinkRequestR -parent ( BBàAúA<:marketingplatformadmin.googleapis.com/AnalyticsAccountLinka -analytics_account_link ( 2<.google.marketingplatform.admin.v1alpha.AnalyticsAccountLinkBàA"u -!DeleteAnalyticsAccountLinkRequestP -name ( BBàAúA< -:marketingplatformadmin.googleapis.com/AnalyticsAccountLink"ì -SetPropertyServiceLevelRequest# -analytics_account_link ( BàAJ -analytics_property ( B.àAúA( -&analyticsadmin.googleapis.com/PropertyY - service_level (2=.google.marketingplatform.admin.v1alpha.AnalyticsServiceLevelBàA"! -SetPropertyServiceLevelResponse"K -ReportPropertyUsageRequest - organization ( BàA -month ( BàA"Ï -ReportPropertyUsageResponsej -property_usages ( 2Q.google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.PropertyUsage_ - bill_info ( 2L.google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse.BillInfo° - PropertyUsage -property (  - display_name (  - -account_id (T - service_level (2=.google.marketingplatform.admin.v1alpha.AnalyticsServiceLevelT - property_type (2=.google.marketingplatform.admin.v1alpha.AnalyticsPropertyType -total_event_count ( -billable_event_count (¯ -BillInfo$ -base_fee ( 2.google.type.Money% - event_fee ( 2.google.type.Money3 -price_protection_credit ( 2.google.type.Money! -total ( 2.google.type.Money2ú -MarketingplatformAdminService· -GetOrganization>.google.marketingplatform.admin.v1alpha.GetOrganizationRequest4.google.marketingplatform.admin.v1alpha.Organization".ÚAname‚Óä“!/v1alpha/{name=organizations/*}¸ -ListOrganizations@.google.marketingplatform.admin.v1alpha.ListOrganizationsRequestA.google.marketingplatform.admin.v1alpha.ListOrganizationsResponse"‚Óä“/v1alpha/organizations’ -FindSalesPartnerManagedClientsM.google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsRequestN.google.marketingplatform.admin.v1alpha.FindSalesPartnerManagedClientsResponse"Q‚Óä“K"F/v1alpha/{organization=organizations/*}:findSalesPartnerManagedClients:*ú -ListAnalyticsAccountLinksH.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequestI.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse"HÚAparent‚Óä“97/v1alpha/{parent=organizations/*}/analyticsAccountLinksž -CreateAnalyticsAccountLinkI.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest<.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink"wÚAparent,analytics_account_link‚Óä“Q"7/v1alpha/{parent=organizations/*}/analyticsAccountLinks:analytics_account_linkÇ -DeleteAnalyticsAccountLinkI.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest.google.protobuf.Empty"FÚAname‚Óä“9*7/v1alpha/{name=organizations/*/analyticsAccountLinks/*}² -SetPropertyServiceLevelF.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequestG.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse"…ÚAanalytics_account_link‚Óä“f"a/v1alpha/{analytics_account_link=organizations/*/analyticsAccountLinks/*}:setPropertyServiceLevel:*õ -ReportPropertyUsageB.google.marketingplatform.admin.v1alpha.ReportPropertyUsageRequestC.google.marketingplatform.admin.v1alpha.ReportPropertyUsageResponse"UÚA organization‚Óä“@";/v1alpha/{organization=organizations/*}:reportPropertyUsage:*¹ÊA%marketingplatformadmin.googleapis.comÒAhttps://www.googleapis.com/auth/marketingplatformadmin.analytics.read,https://www.googleapis.com/auth/marketingplatformadmin.analytics.updateBé -.com.google.ads.marketingplatform.admin.v1alphaBMarketingplatformAdminProtoPZKgoogle.golang.org/genproto/googleapis/marketingplatform/admin/v1alpha;adminª*Google.Ads.MarketingPlatform.Admin.V1AlphaÊ*Google\\Ads\\MarketingPlatform\\Admin\\V1alphaê.Google::Ads::MarketingPlatform::Admin::V1alphaêA? -&analyticsadmin.googleapis.com/Propertyproperties/{property}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/Resources.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/GPBMetadata/Google/Marketingplatform/Admin/V1Alpha/Resources.php deleted file mode 100644 index e04334ee8e5bf18f23bba551f992ad6192efcfd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2255 zcmbVNO>f&q5Ur%NXcuna5Dx0JMZ0y}S`iX5aey4?y2Z+(4Z?~50-by9rGKJ52I!$bp}(LMp;;SQ28y7n#d9GjASe=l%F|co~9+@Pzn; z;g}5I#SF%m1coe#12^#C#bh`n47$NMq#j{1gsm>@bSsDa#8{SACE~CVwb=Zqxq7=cz|PUpCsAr zmp8N7NMy77&ydJ=0D$Y^D1v656}$nE|AmtakGe35am;^qY2;9!#uR(>HSh5d4zU*z z9=(hmPJB0}fe%GM*LO+%5lnLm>~0uvO%7qs&k!q2u;S4SmMJo$-cjibS!=<}FQO1)qvcT;B8l6rT$s7c7;Bbw!p@KMtp2% zPV%ZMUa9OF1z>-vbXqwr$m>NizaYvx6}}Ei^&;g>`ElO(y!;sLZBHz z!51Fq;7kdlL+U0nI%0Uq_8pG8yMHL(?mNk%m3}EpPb3lFpr-y^xki6gfOM>%4Klcu~ghZ>>6R{8j0 zcnK%eLG5!(Kk7L>&Ft$(n$y<$T6>w(Iv{VM(?X`;^ey;m9qRdur<}^$G8Mi!L&D;j zH4DiNDu&rLG}AhFtaD?9Jc}al0=s5Q?;!J>QxS5ngZ0judE91I+5z9J1Df4-`^?y^ zHUF&wal7;B#)Ig6o2Yp=U!7565Ju&f)9h}H0uTEmna`*)B7S0l%3_PW&pi*4%lk*Q zagx}hj5wFVB8|*&`6;(ZIkU)ragoogle.marketingplatform.admin.v1alpha.AnalyticsAccountLink - */ -class AnalyticsAccountLink extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Resource name of this AnalyticsAccountLink. Note the resource - * ID is the same as the ID of the Analtyics account. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * Example: "organizations/xyz/analyticsAccountLinks/1234" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. Immutable. The resource name of the AnalyticsAdmin API account. - * The account ID will be used as the ID of this AnalyticsAccountLink - * resource, which will become the final component of the resource name. - * Format: analyticsadmin.googleapis.com/accounts/{account_id} - * - * Generated from protobuf field string analytics_account = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $analytics_account = ''; - /** - * Output only. The human-readable name for the Analytics account. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. The verification state of the link between the Analytics - * account and the parent organization. - * - * Generated from protobuf field .google.marketingplatform.admin.v1alpha.LinkVerificationState link_verification_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $link_verification_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Resource name of this AnalyticsAccountLink. Note the resource - * ID is the same as the ID of the Analtyics account. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * Example: "organizations/xyz/analyticsAccountLinks/1234" - * @type string $analytics_account - * Required. Immutable. The resource name of the AnalyticsAdmin API account. - * The account ID will be used as the ID of this AnalyticsAccountLink - * resource, which will become the final component of the resource name. - * Format: analyticsadmin.googleapis.com/accounts/{account_id} - * @type string $display_name - * Output only. The human-readable name for the Analytics account. - * @type int $link_verification_state - * Output only. The verification state of the link between the Analytics - * account and the parent organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Resource name of this AnalyticsAccountLink. Note the resource - * ID is the same as the ID of the Analtyics account. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * Example: "organizations/xyz/analyticsAccountLinks/1234" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Resource name of this AnalyticsAccountLink. Note the resource - * ID is the same as the ID of the Analtyics account. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * Example: "organizations/xyz/analyticsAccountLinks/1234" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. The resource name of the AnalyticsAdmin API account. - * The account ID will be used as the ID of this AnalyticsAccountLink - * resource, which will become the final component of the resource name. - * Format: analyticsadmin.googleapis.com/accounts/{account_id} - * - * Generated from protobuf field string analytics_account = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getAnalyticsAccount() - { - return $this->analytics_account; - } - - /** - * Required. Immutable. The resource name of the AnalyticsAdmin API account. - * The account ID will be used as the ID of this AnalyticsAccountLink - * resource, which will become the final component of the resource name. - * Format: analyticsadmin.googleapis.com/accounts/{account_id} - * - * Generated from protobuf field string analytics_account = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAnalyticsAccount($var) - { - GPBUtil::checkString($var, True); - $this->analytics_account = $var; - - return $this; - } - - /** - * Output only. The human-readable name for the Analytics account. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The human-readable name for the Analytics account. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The verification state of the link between the Analytics - * account and the parent organization. - * - * Generated from protobuf field .google.marketingplatform.admin.v1alpha.LinkVerificationState link_verification_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLinkVerificationState() - { - return $this->link_verification_state; - } - - /** - * Output only. The verification state of the link between the Analytics - * account and the parent organization. - * - * Generated from protobuf field .google.marketingplatform.admin.v1alpha.LinkVerificationState link_verification_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLinkVerificationState($var) - { - GPBUtil::checkEnum($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\LinkVerificationState::class); - $this->link_verification_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsServiceLevel.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsServiceLevel.php deleted file mode 100644 index d7f4fce38ecf..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/AnalyticsServiceLevel.php +++ /dev/null @@ -1,61 +0,0 @@ -google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel - */ -class AnalyticsServiceLevel -{ - /** - * Service level unspecified. - * - * Generated from protobuf enum ANALYTICS_SERVICE_LEVEL_UNSPECIFIED = 0; - */ - const ANALYTICS_SERVICE_LEVEL_UNSPECIFIED = 0; - /** - * The standard version of Google Analytics. - * - * Generated from protobuf enum ANALYTICS_SERVICE_LEVEL_STANDARD = 1; - */ - const ANALYTICS_SERVICE_LEVEL_STANDARD = 1; - /** - * The premium version of Google Analytics. - * - * Generated from protobuf enum ANALYTICS_SERVICE_LEVEL_360 = 2; - */ - const ANALYTICS_SERVICE_LEVEL_360 = 2; - - private static $valueToName = [ - self::ANALYTICS_SERVICE_LEVEL_UNSPECIFIED => 'ANALYTICS_SERVICE_LEVEL_UNSPECIFIED', - self::ANALYTICS_SERVICE_LEVEL_STANDARD => 'ANALYTICS_SERVICE_LEVEL_STANDARD', - self::ANALYTICS_SERVICE_LEVEL_360 => 'ANALYTICS_SERVICE_LEVEL_360', - ]; - - 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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/CreateAnalyticsAccountLinkRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/CreateAnalyticsAccountLinkRequest.php deleted file mode 100644 index c4532ac815a5..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/CreateAnalyticsAccountLinkRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest - */ -class CreateAnalyticsAccountLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this Analytics account link will be - * created. Format: organizations/{org_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Analytics account link to create. - * - * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_link = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $analytics_account_link = null; - - /** - * @param string $parent Required. The parent resource where this Analytics account link will be - * created. Format: organizations/{org_id} - * Please see {@see MarketingplatformAdminServiceClient::organizationName()} for help formatting this field. - * @param \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink $analyticsAccountLink Required. The Analytics account link to create. - * - * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\CreateAnalyticsAccountLinkRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink $analyticsAccountLink): self - { - return (new self()) - ->setParent($parent) - ->setAnalyticsAccountLink($analyticsAccountLink); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this Analytics account link will be - * created. Format: organizations/{org_id} - * @type \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink $analytics_account_link - * Required. The Analytics account link to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this Analytics account link will be - * created. Format: organizations/{org_id} - * - * 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 parent resource where this Analytics account link will be - * created. Format: organizations/{org_id} - * - * 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 Analytics account link to create. - * - * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_link = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink|null - */ - public function getAnalyticsAccountLink() - { - return $this->analytics_account_link; - } - - public function hasAnalyticsAccountLink() - { - return isset($this->analytics_account_link); - } - - public function clearAnalyticsAccountLink() - { - unset($this->analytics_account_link); - } - - /** - * Required. The Analytics account link to create. - * - * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_link = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink $var - * @return $this - */ - public function setAnalyticsAccountLink($var) - { - GPBUtil::checkMessage($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink::class); - $this->analytics_account_link = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/DeleteAnalyticsAccountLinkRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/DeleteAnalyticsAccountLinkRequest.php deleted file mode 100644 index 96cc8db8c9a0..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/DeleteAnalyticsAccountLinkRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest - */ -class DeleteAnalyticsAccountLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Analytics account link to delete. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the Analytics account link to delete. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * Please see {@see MarketingplatformAdminServiceClient::analyticsAccountLinkName()} for help formatting this field. - * - * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\DeleteAnalyticsAccountLinkRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Analytics account link to delete. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Analytics account link to delete. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * - * 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 Analytics account link to delete. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * - * 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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/GetOrganizationRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/GetOrganizationRequest.php deleted file mode 100644 index 6e4b0cf0fef6..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/GetOrganizationRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.marketingplatform.admin.v1alpha.GetOrganizationRequest - */ -class GetOrganizationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Organization to retrieve. - * Format: organizations/{org_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the Organization to retrieve. - * Format: organizations/{org_id} - * Please see {@see MarketingplatformAdminServiceClient::organizationName()} for help formatting this field. - * - * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\GetOrganizationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Organization to retrieve. - * Format: organizations/{org_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Organization to retrieve. - * Format: organizations/{org_id} - * - * 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 Organization to retrieve. - * Format: organizations/{org_id} - * - * 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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/LinkVerificationState.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/LinkVerificationState.php deleted file mode 100644 index e1c0b237300b..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/LinkVerificationState.php +++ /dev/null @@ -1,63 +0,0 @@ -google.marketingplatform.admin.v1alpha.LinkVerificationState - */ -class LinkVerificationState -{ - /** - * The link state is unknown. - * - * Generated from protobuf enum LINK_VERIFICATION_STATE_UNSPECIFIED = 0; - */ - const LINK_VERIFICATION_STATE_UNSPECIFIED = 0; - /** - * The link is established. - * - * Generated from protobuf enum LINK_VERIFICATION_STATE_VERIFIED = 1; - */ - const LINK_VERIFICATION_STATE_VERIFIED = 1; - /** - * The link is requested, but hasn't been approved by the product account - * admin. - * - * Generated from protobuf enum LINK_VERIFICATION_STATE_NOT_VERIFIED = 2; - */ - const LINK_VERIFICATION_STATE_NOT_VERIFIED = 2; - - private static $valueToName = [ - self::LINK_VERIFICATION_STATE_UNSPECIFIED => 'LINK_VERIFICATION_STATE_UNSPECIFIED', - self::LINK_VERIFICATION_STATE_VERIFIED => 'LINK_VERIFICATION_STATE_VERIFIED', - self::LINK_VERIFICATION_STATE_NOT_VERIFIED => 'LINK_VERIFICATION_STATE_NOT_VERIFIED', - ]; - - 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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksRequest.php deleted file mode 100644 index 2f09170cac7b..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest - */ -class ListAnalyticsAccountLinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent organization, which owns this collection of Analytics - * account links. Format: organizations/{org_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of Analytics account links to return in one - * call. The service may return fewer than this value. - * If unspecified, at most 50 Analytics account links will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous ListAnalyticsAccountLinks - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListAnalyticsAccountLinks` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent organization, which owns this collection of Analytics - * account links. Format: organizations/{org_id} - * Please see {@see MarketingplatformAdminServiceClient::organizationName()} for help formatting this field. - * - * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\ListAnalyticsAccountLinksRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent organization, which owns this collection of Analytics - * account links. Format: organizations/{org_id} - * @type int $page_size - * Optional. The maximum number of Analytics account links to return in one - * call. The service may return fewer than this value. - * If unspecified, at most 50 Analytics account links will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A page token, received from a previous ListAnalyticsAccountLinks - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListAnalyticsAccountLinks` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent organization, which owns this collection of Analytics - * account links. Format: organizations/{org_id} - * - * 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 parent organization, which owns this collection of Analytics - * account links. Format: organizations/{org_id} - * - * 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. The maximum number of Analytics account links to return in one - * call. The service may return fewer than this value. - * If unspecified, at most 50 Analytics account links will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of Analytics account links to return in one - * call. The service may return fewer than this value. - * If unspecified, at most 50 Analytics account links will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous ListAnalyticsAccountLinks - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListAnalyticsAccountLinks` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous ListAnalyticsAccountLinks - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListAnalyticsAccountLinks` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksResponse.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksResponse.php deleted file mode 100644 index b3da65fa4a89..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/ListAnalyticsAccountLinksResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse - */ -class ListAnalyticsAccountLinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Analytics account links in this organization. - * - * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_links = 1; - */ - private $analytics_account_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; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink>|\Google\Protobuf\Internal\RepeatedField $analytics_account_links - * Analytics account links in this organization. - * @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\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Analytics account links in this organization. - * - * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_links = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnalyticsAccountLinks() - { - return $this->analytics_account_links; - } - - /** - * Analytics account links in this organization. - * - * Generated from protobuf field repeated .google.marketingplatform.admin.v1alpha.AnalyticsAccountLink analytics_account_links = 1; - * @param array<\Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnalyticsAccountLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink::class); - $this->analytics_account_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/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/Organization.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/Organization.php deleted file mode 100644 index 118a5624bbd1..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/Organization.php +++ /dev/null @@ -1,105 +0,0 @@ -google.marketingplatform.admin.v1alpha.Organization - */ -class Organization extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the GMP organization. - * Format: organizations/{org_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * The human-readable name for the organization. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the GMP organization. - * Format: organizations/{org_id} - * @type string $display_name - * The human-readable name for the organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the GMP organization. - * Format: organizations/{org_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the GMP organization. - * Format: organizations/{org_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The human-readable name for the organization. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human-readable name for the organization. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelRequest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelRequest.php deleted file mode 100644 index 7212d7c51045..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest - */ -class SetPropertyServiceLevelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent AnalyticsAccountLink scope where this property is in. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * - * Generated from protobuf field string analytics_account_link = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $analytics_account_link = ''; - /** - * Required. The Analytics property to change the ServiceLevel setting. This - * field is the name of the Google Analytics Admin API property resource. - * Format: analyticsadmin.googleapis.com/properties/{property_id} - * - * Generated from protobuf field string analytics_property = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $analytics_property = ''; - /** - * Required. The service level to set for this property. - * - * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel service_level = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_level = 0; - - /** - * @param string $analyticsAccountLink Required. The parent AnalyticsAccountLink scope where this property is in. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * - * @return \Google\Ads\MarketingPlatform\Admin\V1alpha\SetPropertyServiceLevelRequest - * - * @experimental - */ - public static function build(string $analyticsAccountLink): self - { - return (new self()) - ->setAnalyticsAccountLink($analyticsAccountLink); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $analytics_account_link - * Required. The parent AnalyticsAccountLink scope where this property is in. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * @type string $analytics_property - * Required. The Analytics property to change the ServiceLevel setting. This - * field is the name of the Google Analytics Admin API property resource. - * Format: analyticsadmin.googleapis.com/properties/{property_id} - * @type int $service_level - * Required. The service level to set for this property. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent AnalyticsAccountLink scope where this property is in. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * - * Generated from protobuf field string analytics_account_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAnalyticsAccountLink() - { - return $this->analytics_account_link; - } - - /** - * Required. The parent AnalyticsAccountLink scope where this property is in. - * Format: - * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} - * - * Generated from protobuf field string analytics_account_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAnalyticsAccountLink($var) - { - GPBUtil::checkString($var, True); - $this->analytics_account_link = $var; - - return $this; - } - - /** - * Required. The Analytics property to change the ServiceLevel setting. This - * field is the name of the Google Analytics Admin API property resource. - * Format: analyticsadmin.googleapis.com/properties/{property_id} - * - * Generated from protobuf field string analytics_property = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAnalyticsProperty() - { - return $this->analytics_property; - } - - /** - * Required. The Analytics property to change the ServiceLevel setting. This - * field is the name of the Google Analytics Admin API property resource. - * Format: analyticsadmin.googleapis.com/properties/{property_id} - * - * Generated from protobuf field string analytics_property = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAnalyticsProperty($var) - { - GPBUtil::checkString($var, True); - $this->analytics_property = $var; - - return $this; - } - - /** - * Required. The service level to set for this property. - * - * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel service_level = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getServiceLevel() - { - return $this->service_level; - } - - /** - * Required. The service level to set for this property. - * - * Generated from protobuf field .google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel service_level = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setServiceLevel($var) - { - GPBUtil::checkEnum($var, \Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsServiceLevel::class); - $this->service_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelResponse.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelResponse.php deleted file mode 100644 index c4b7adc3c69e..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/proto/src/Google/Ads/MarketingPlatform/Admin/V1alpha/SetPropertyServiceLevelResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse - */ -class SetPropertyServiceLevelResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Marketingplatform\Admin\V1Alpha\MarketingplatformAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php deleted file mode 100644 index 6042237643e6..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php +++ /dev/null @@ -1,94 +0,0 @@ -setAnalyticsAccount($formattedAnalyticsAccountLinkAnalyticsAccount); - $request = (new CreateAnalyticsAccountLinkRequest()) - ->setParent($formattedParent) - ->setAnalyticsAccountLink($analyticsAccountLink); - - // Call the API and handle any network failures. - try { - /** @var AnalyticsAccountLink $response */ - $response = $marketingplatformAdminServiceClient->createAnalyticsAccountLink($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MarketingplatformAdminServiceClient::organizationName('[ORGANIZATION]'); - $formattedAnalyticsAccountLinkAnalyticsAccount = MarketingplatformAdminServiceClient::accountName( - '[ACCOUNT]' - ); - - create_analytics_account_link_sample( - $formattedParent, - $formattedAnalyticsAccountLinkAnalyticsAccount - ); -} -// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAnalyticsAccountLink_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php deleted file mode 100644 index a07c70e46b47..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $marketingplatformAdminServiceClient->deleteAnalyticsAccountLink($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MarketingplatformAdminServiceClient::analyticsAccountLinkName( - '[ORGANIZATION]', - '[ANALYTICS_ACCOUNT_LINK]' - ); - - delete_analytics_account_link_sample($formattedName); -} -// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteAnalyticsAccountLink_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php deleted file mode 100644 index 8120d8adf2c7..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Organization $response */ - $response = $marketingplatformAdminServiceClient->getOrganization($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MarketingplatformAdminServiceClient::organizationName('[ORGANIZATION]'); - - get_organization_sample($formattedName); -} -// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetOrganization_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php deleted file mode 100644 index 24f83c1ddf6f..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $marketingplatformAdminServiceClient->listAnalyticsAccountLinks($request); - - /** @var AnalyticsAccountLink $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MarketingplatformAdminServiceClient::organizationName('[ORGANIZATION]'); - - list_analytics_account_links_sample($formattedParent); -} -// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAnalyticsAccountLinks_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php deleted file mode 100644 index f60fb428da21..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php +++ /dev/null @@ -1,90 +0,0 @@ -setAnalyticsAccountLink($analyticsAccountLink) - ->setAnalyticsProperty($formattedAnalyticsProperty) - ->setServiceLevel($serviceLevel); - - // Call the API and handle any network failures. - try { - /** @var SetPropertyServiceLevelResponse $response */ - $response = $marketingplatformAdminServiceClient->setPropertyServiceLevel($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $analyticsAccountLink = '[ANALYTICS_ACCOUNT_LINK]'; - $formattedAnalyticsProperty = MarketingplatformAdminServiceClient::propertyName('[PROPERTY]'); - $serviceLevel = AnalyticsServiceLevel::ANALYTICS_SERVICE_LEVEL_UNSPECIFIED; - - set_property_service_level_sample( - $analyticsAccountLink, - $formattedAnalyticsProperty, - $serviceLevel - ); -} -// [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_SetPropertyServiceLevel_sync] diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/Client/MarketingplatformAdminServiceClient.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/Client/MarketingplatformAdminServiceClient.php deleted file mode 100644 index 5b4cec576612..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/Client/MarketingplatformAdminServiceClient.php +++ /dev/null @@ -1,565 +0,0 @@ - createAnalyticsAccountLinkAsync(CreateAnalyticsAccountLinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAnalyticsAccountLinkAsync(DeleteAnalyticsAccountLinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface findSalesPartnerManagedClientsAsync(FindSalesPartnerManagedClientsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOrganizationAsync(GetOrganizationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAnalyticsAccountLinksAsync(ListAnalyticsAccountLinksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOrganizationsAsync(ListOrganizationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface reportPropertyUsageAsync(ReportPropertyUsageRequest $request, array $optionalArgs = []) - * @method PromiseInterface setPropertyServiceLevelAsync(SetPropertyServiceLevelRequest $request, array $optionalArgs = []) - */ -final class MarketingplatformAdminServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.marketingplatform.admin.v1alpha.MarketingplatformAdminService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'marketingplatformadmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'marketingplatformadmin.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/marketingplatformadmin.analytics.read', - 'https://www.googleapis.com/auth/marketingplatformadmin.analytics.update', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/marketingplatform_admin_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/marketingplatform_admin_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/marketingplatform_admin_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/marketingplatform_admin_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * 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(string $account): string - { - return self::getPathTemplate('account')->render([ - 'account' => $account, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * analytics_account_link resource. - * - * @param string $organization - * @param string $analyticsAccountLink - * - * @return string The formatted analytics_account_link resource. - * - * @experimental - */ - public static function analyticsAccountLinkName(string $organization, string $analyticsAccountLink): string - { - return self::getPathTemplate('analyticsAccountLink')->render([ - 'organization' => $organization, - 'analytics_account_link' => $analyticsAccountLink, - ]); - } - - /** - * 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(string $organization): string - { - return self::getPathTemplate('organization')->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(string $property): string - { - return self::getPathTemplate('property')->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} - * - analyticsAccountLink: organizations/{organization}/analyticsAccountLinks/{analytics_account_link} - * - 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(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 'marketingplatformadmin.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use - * Google\Ads\MarketingPlatform\Admin\V1alpha\MarketingplatformAdminServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new MarketingplatformAdminServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates the link between the Analytics account and the Google Marketing - * Platform organization. - * - * User needs to be an org user, and admin on the Analytics account to create - * the link. If the account is already linked to an organization, user needs - * to unlink the account from the current organization, then try link again. - * - * The async variant is - * {@see MarketingplatformAdminServiceClient::createAnalyticsAccountLinkAsync()} . - * - * @example samples/V1alpha/MarketingplatformAdminServiceClient/create_analytics_account_link.php - * - * @param CreateAnalyticsAccountLinkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * 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 AnalyticsAccountLink - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest $request, array $callOptions = []): AnalyticsAccountLink - { - return $this->startApiCall('CreateAnalyticsAccountLink', $request, $callOptions)->wait(); - } - - /** - * Deletes the AnalyticsAccountLink, which detaches the Analytics account from - * the Google Marketing Platform organization. - * - * User needs to be an org user, and admin on the Analytics account in order - * to delete the link. - * - * The async variant is - * {@see MarketingplatformAdminServiceClient::deleteAnalyticsAccountLinkAsync()} . - * - * @example samples/V1alpha/MarketingplatformAdminServiceClient/delete_analytics_account_link.php - * - * @param DeleteAnalyticsAccountLinkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * 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 Thrown if the API call fails. - * - * @experimental - */ - public function deleteAnalyticsAccountLink(DeleteAnalyticsAccountLinkRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAnalyticsAccountLink', $request, $callOptions)->wait(); - } - - /** - * Returns a list of clients managed by the sales partner organization. - * - * User needs to be an OrgAdmin/BillingAdmin on the sales partner organization - * in order to view the end clients. - * - * The async variant is - * {@see MarketingplatformAdminServiceClient::findSalesPartnerManagedClientsAsync()} - * . - * - * @example samples/V1alpha/MarketingplatformAdminServiceClient/find_sales_partner_managed_clients.php - * - * @param FindSalesPartnerManagedClientsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * 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 FindSalesPartnerManagedClientsResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function findSalesPartnerManagedClients(FindSalesPartnerManagedClientsRequest $request, array $callOptions = []): FindSalesPartnerManagedClientsResponse - { - return $this->startApiCall('FindSalesPartnerManagedClients', $request, $callOptions)->wait(); - } - - /** - * Lookup for a single organization. - * - * The async variant is - * {@see MarketingplatformAdminServiceClient::getOrganizationAsync()} . - * - * @example samples/V1alpha/MarketingplatformAdminServiceClient/get_organization.php - * - * @param GetOrganizationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * 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 Organization - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getOrganization(GetOrganizationRequest $request, array $callOptions = []): Organization - { - return $this->startApiCall('GetOrganization', $request, $callOptions)->wait(); - } - - /** - * Lists the Google Analytics accounts link to the specified Google Marketing - * Platform organization. - * - * The async variant is - * {@see MarketingplatformAdminServiceClient::listAnalyticsAccountLinksAsync()} . - * - * @example samples/V1alpha/MarketingplatformAdminServiceClient/list_analytics_account_links.php - * - * @param ListAnalyticsAccountLinksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * 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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function listAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAnalyticsAccountLinks', $request, $callOptions); - } - - /** - * Returns a list of organizations that the user has access to. - * - * The async variant is - * {@see MarketingplatformAdminServiceClient::listOrganizationsAsync()} . - * - * @example samples/V1alpha/MarketingplatformAdminServiceClient/list_organizations.php - * - * @param ListOrganizationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * 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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function listOrganizations(ListOrganizationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOrganizations', $request, $callOptions); - } - - /** - * Get the usage and billing data for properties within the organization for - * the specified month. - * - * Per direct client org, user needs to be OrgAdmin/BillingAdmin on the - * organization in order to view the billing and usage data. - * - * Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on - * the sales partner org in order to view the billing and usage data, or - * OrgAdmin/BillingAdmin on the sales partner client org in order to view the - * usage data only. - * - * The async variant is - * {@see MarketingplatformAdminServiceClient::reportPropertyUsageAsync()} . - * - * @example samples/V1alpha/MarketingplatformAdminServiceClient/report_property_usage.php - * - * @param ReportPropertyUsageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * 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 ReportPropertyUsageResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function reportPropertyUsage(ReportPropertyUsageRequest $request, array $callOptions = []): ReportPropertyUsageResponse - { - return $this->startApiCall('ReportPropertyUsage', $request, $callOptions)->wait(); - } - - /** - * Updates the service level for an Analytics property. - * - * The async variant is - * {@see MarketingplatformAdminServiceClient::setPropertyServiceLevelAsync()} . - * - * @example samples/V1alpha/MarketingplatformAdminServiceClient/set_property_service_level.php - * - * @param SetPropertyServiceLevelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * 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 SetPropertyServiceLevelResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function setPropertyServiceLevel(SetPropertyServiceLevelRequest $request, array $callOptions = []): SetPropertyServiceLevelResponse - { - return $this->startApiCall('SetPropertyServiceLevel', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/gapic_metadata.json b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/gapic_metadata.json deleted file mode 100644 index ff2104782c8e..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.marketingplatform.admin.v1alpha", - "libraryPackage": "Google\\Ads\\MarketingPlatform\\Admin\\V1alpha", - "services": { - "MarketingplatformAdminService": { - "clients": { - "grpc": { - "libraryClient": "MarketingplatformAdminServiceGapicClient", - "rpcs": { - "CreateAnalyticsAccountLink": { - "methods": [ - "createAnalyticsAccountLink" - ] - }, - "DeleteAnalyticsAccountLink": { - "methods": [ - "deleteAnalyticsAccountLink" - ] - }, - "FindSalesPartnerManagedClients": { - "methods": [ - "findSalesPartnerManagedClients" - ] - }, - "GetOrganization": { - "methods": [ - "getOrganization" - ] - }, - "ListAnalyticsAccountLinks": { - "methods": [ - "listAnalyticsAccountLinks" - ] - }, - "ListOrganizations": { - "methods": [ - "listOrganizations" - ] - }, - "ReportPropertyUsage": { - "methods": [ - "reportPropertyUsage" - ] - }, - "SetPropertyServiceLevel": { - "methods": [ - "setPropertyServiceLevel" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_client_config.json b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_client_config.json deleted file mode 100644 index 21a2f2499a87..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_client_config.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "interfaces": { - "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "UNKNOWN" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateAnalyticsAccountLink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteAnalyticsAccountLink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "FindSalesPartnerManagedClients": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetOrganization": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAnalyticsAccountLinks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListOrganizations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ReportPropertyUsage": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetPropertyServiceLevel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php deleted file mode 100644 index d25b5bef386e..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_descriptor_config.php +++ /dev/null @@ -1,138 +0,0 @@ - [ - 'google.marketingplatform.admin.v1alpha.MarketingplatformAdminService' => [ - 'CreateAnalyticsAccountLink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\AnalyticsAccountLink', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAnalyticsAccountLink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'FindSalesPartnerManagedClients' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\FindSalesPartnerManagedClientsResponse', - 'headerParams' => [ - [ - 'keyName' => 'organization', - 'fieldAccessors' => [ - 'getOrganization', - ], - ], - ], - ], - 'GetOrganization' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\Organization', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAnalyticsAccountLinks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAnalyticsAccountLinks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\ListAnalyticsAccountLinksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrganizations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOrganizations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\ListOrganizationsResponse', - ], - 'ReportPropertyUsage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\ReportPropertyUsageResponse', - 'headerParams' => [ - [ - 'keyName' => 'organization', - 'fieldAccessors' => [ - 'getOrganization', - ], - ], - ], - ], - 'SetPropertyServiceLevel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Ads\MarketingPlatform\Admin\V1alpha\SetPropertyServiceLevelResponse', - 'headerParams' => [ - [ - 'keyName' => 'analytics_account_link', - 'fieldAccessors' => [ - 'getAnalyticsAccountLink', - ], - ], - ], - ], - 'templateMap' => [ - 'account' => 'accounts/{account}', - 'analyticsAccountLink' => 'organizations/{organization}/analyticsAccountLinks/{analytics_account_link}', - 'organization' => 'organizations/{organization}', - 'property' => 'properties/{property}', - ], - ], - ], -]; diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php deleted file mode 100644 index 49883f457e7f..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/src/V1alpha/resources/marketingplatform_admin_service_rest_client_config.php +++ /dev/null @@ -1,114 +0,0 @@ - [ - 'google.marketingplatform.admin.v1alpha.MarketingplatformAdminService' => [ - 'CreateAnalyticsAccountLink' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha/{parent=organizations/*}/analyticsAccountLinks', - 'body' => 'analytics_account_link', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAnalyticsAccountLink' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1alpha/{name=organizations/*/analyticsAccountLinks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FindSalesPartnerManagedClients' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha/{organization=organizations/*}:findSalesPartnerManagedClients', - 'body' => '*', - 'placeholders' => [ - 'organization' => [ - 'getters' => [ - 'getOrganization', - ], - ], - ], - ], - 'GetOrganization' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha/{name=organizations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAnalyticsAccountLinks' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha/{parent=organizations/*}/analyticsAccountLinks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrganizations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha/organizations', - ], - 'ReportPropertyUsage' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha/{organization=organizations/*}:reportPropertyUsage', - 'body' => '*', - 'placeholders' => [ - 'organization' => [ - 'getters' => [ - 'getOrganization', - ], - ], - ], - ], - 'SetPropertyServiceLevel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha/{analytics_account_link=organizations/*/analyticsAccountLinks/*}:setPropertyServiceLevel', - 'body' => '*', - 'placeholders' => [ - 'analytics_account_link' => [ - 'getters' => [ - 'getAnalyticsAccountLink', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php b/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php deleted file mode 100644 index 30b37de0e432..000000000000 --- a/owl-bot-staging/AdsMarketingPlatformAdmin/v1alpha/tests/Unit/V1alpha/Client/MarketingplatformAdminServiceClientTest.php +++ /dev/null @@ -1,661 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MarketingplatformAdminServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MarketingplatformAdminServiceClient($options); - } - - /** @test */ - public function createAnalyticsAccountLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $analyticsAccount = 'analyticsAccount1988159092'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AnalyticsAccountLink(); - $expectedResponse->setName($name); - $expectedResponse->setAnalyticsAccount($analyticsAccount); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $analyticsAccountLink = new AnalyticsAccountLink(); - $analyticsAccountLinkAnalyticsAccount = $gapicClient->accountName('[ACCOUNT]'); - $analyticsAccountLink->setAnalyticsAccount($analyticsAccountLinkAnalyticsAccount); - $request = (new CreateAnalyticsAccountLinkRequest()) - ->setParent($formattedParent) - ->setAnalyticsAccountLink($analyticsAccountLink); - $response = $gapicClient->createAnalyticsAccountLink($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateAnalyticsAccountLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAnalyticsAccountLink(); - $this->assertProtobufEquals($analyticsAccountLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAnalyticsAccountLinkExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $analyticsAccountLink = new AnalyticsAccountLink(); - $analyticsAccountLinkAnalyticsAccount = $gapicClient->accountName('[ACCOUNT]'); - $analyticsAccountLink->setAnalyticsAccount($analyticsAccountLinkAnalyticsAccount); - $request = (new CreateAnalyticsAccountLinkRequest()) - ->setParent($formattedParent) - ->setAnalyticsAccountLink($analyticsAccountLink); - try { - $gapicClient->createAnalyticsAccountLink($request); - // 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 deleteAnalyticsAccountLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->analyticsAccountLinkName('[ORGANIZATION]', '[ANALYTICS_ACCOUNT_LINK]'); - $request = (new DeleteAnalyticsAccountLinkRequest()) - ->setName($formattedName); - $gapicClient->deleteAnalyticsAccountLink($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/DeleteAnalyticsAccountLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAnalyticsAccountLinkExceptionTest() - { - $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->analyticsAccountLinkName('[ORGANIZATION]', '[ANALYTICS_ACCOUNT_LINK]'); - $request = (new DeleteAnalyticsAccountLinkRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAnalyticsAccountLink($request); - // 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 findSalesPartnerManagedClientsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new FindSalesPartnerManagedClientsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedOrganization = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new FindSalesPartnerManagedClientsRequest()) - ->setOrganization($formattedOrganization); - $response = $gapicClient->findSalesPartnerManagedClients($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/FindSalesPartnerManagedClients', $actualFuncCall); - $actualValue = $actualRequestObject->getOrganization(); - $this->assertProtobufEquals($formattedOrganization, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function findSalesPartnerManagedClientsExceptionTest() - { - $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 - $formattedOrganization = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new FindSalesPartnerManagedClientsRequest()) - ->setOrganization($formattedOrganization); - try { - $gapicClient->findSalesPartnerManagedClients($request); - // 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 getOrganizationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Organization(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new GetOrganizationRequest()) - ->setName($formattedName); - $response = $gapicClient->getOrganization($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/GetOrganization', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOrganizationExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $request = (new GetOrganizationRequest()) - ->setName($formattedName); - try { - $gapicClient->getOrganization($request); - // 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 listAnalyticsAccountLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $analyticsAccountLinksElement = new AnalyticsAccountLink(); - $analyticsAccountLinks = [ - $analyticsAccountLinksElement, - ]; - $expectedResponse = new ListAnalyticsAccountLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAnalyticsAccountLinks($analyticsAccountLinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new ListAnalyticsAccountLinksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAnalyticsAccountLinks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAnalyticsAccountLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListAnalyticsAccountLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAnalyticsAccountLinksExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $request = (new ListAnalyticsAccountLinksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAnalyticsAccountLinks($request); - // 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 listOrganizationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $organizationsElement = new Organization(); - $organizations = [ - $organizationsElement, - ]; - $expectedResponse = new ListOrganizationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOrganizations($organizations); - $transport->addResponse($expectedResponse); - $request = new ListOrganizationsRequest(); - $response = $gapicClient->listOrganizations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOrganizations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ListOrganizations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrganizationsExceptionTest() - { - $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); - $request = new ListOrganizationsRequest(); - try { - $gapicClient->listOrganizations($request); - // 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 reportPropertyUsageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReportPropertyUsageResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $organization = 'organization1178922291'; - $month = 'month104080000'; - $request = (new ReportPropertyUsageRequest()) - ->setOrganization($organization) - ->setMonth($month); - $response = $gapicClient->reportPropertyUsage($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/ReportPropertyUsage', $actualFuncCall); - $actualValue = $actualRequestObject->getOrganization(); - $this->assertProtobufEquals($organization, $actualValue); - $actualValue = $actualRequestObject->getMonth(); - $this->assertProtobufEquals($month, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reportPropertyUsageExceptionTest() - { - $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 - $organization = 'organization1178922291'; - $month = 'month104080000'; - $request = (new ReportPropertyUsageRequest()) - ->setOrganization($organization) - ->setMonth($month); - try { - $gapicClient->reportPropertyUsage($request); - // 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 setPropertyServiceLevelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SetPropertyServiceLevelResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $analyticsAccountLink = 'analyticsAccountLink-545363227'; - $formattedAnalyticsProperty = $gapicClient->propertyName('[PROPERTY]'); - $serviceLevel = AnalyticsServiceLevel::ANALYTICS_SERVICE_LEVEL_UNSPECIFIED; - $request = (new SetPropertyServiceLevelRequest()) - ->setAnalyticsAccountLink($analyticsAccountLink) - ->setAnalyticsProperty($formattedAnalyticsProperty) - ->setServiceLevel($serviceLevel); - $response = $gapicClient->setPropertyServiceLevel($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/SetPropertyServiceLevel', $actualFuncCall); - $actualValue = $actualRequestObject->getAnalyticsAccountLink(); - $this->assertProtobufEquals($analyticsAccountLink, $actualValue); - $actualValue = $actualRequestObject->getAnalyticsProperty(); - $this->assertProtobufEquals($formattedAnalyticsProperty, $actualValue); - $actualValue = $actualRequestObject->getServiceLevel(); - $this->assertProtobufEquals($serviceLevel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setPropertyServiceLevelExceptionTest() - { - $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 - $analyticsAccountLink = 'analyticsAccountLink-545363227'; - $formattedAnalyticsProperty = $gapicClient->propertyName('[PROPERTY]'); - $serviceLevel = AnalyticsServiceLevel::ANALYTICS_SERVICE_LEVEL_UNSPECIFIED; - $request = (new SetPropertyServiceLevelRequest()) - ->setAnalyticsAccountLink($analyticsAccountLink) - ->setAnalyticsProperty($formattedAnalyticsProperty) - ->setServiceLevel($serviceLevel); - try { - $gapicClient->setPropertyServiceLevel($request); - // 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 createAnalyticsAccountLinkAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $analyticsAccount = 'analyticsAccount1988159092'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AnalyticsAccountLink(); - $expectedResponse->setName($name); - $expectedResponse->setAnalyticsAccount($analyticsAccount); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $analyticsAccountLink = new AnalyticsAccountLink(); - $analyticsAccountLinkAnalyticsAccount = $gapicClient->accountName('[ACCOUNT]'); - $analyticsAccountLink->setAnalyticsAccount($analyticsAccountLinkAnalyticsAccount); - $request = (new CreateAnalyticsAccountLinkRequest()) - ->setParent($formattedParent) - ->setAnalyticsAccountLink($analyticsAccountLink); - $response = $gapicClient->createAnalyticsAccountLinkAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.marketingplatform.admin.v1alpha.MarketingplatformAdminService/CreateAnalyticsAccountLink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAnalyticsAccountLink(); - $this->assertProtobufEquals($analyticsAccountLink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}