From 064593d0ff4402d4d179d69fd2d9eb6d1a9baec2 Mon Sep 17 00:00:00 2001 From: Hector Mendoza Jacobo Date: Fri, 25 Oct 2024 21:55:47 +0000 Subject: [PATCH 1/2] Add the AdManager component --- .repo-metadata-full.json | 8 + AdsAdManager/.OwlBot.yaml | 4 + AdsAdManager/.gitattributes | 7 + AdsAdManager/.github/pull_request_template.md | 24 + AdsAdManager/CONTRIBUTING.md | 10 + AdsAdManager/LICENSE | 202 + AdsAdManager/README.md | 45 + AdsAdManager/VERSION | 1 + AdsAdManager/composer.json | 30 + AdsAdManager/metadata/V1/AdUnitEnums.php | Bin 0 -> 1115 bytes AdsAdManager/metadata/V1/AdUnitMessages.php | Bin 0 -> 3739 bytes AdsAdManager/metadata/V1/AdUnitService.php | 67 + AdsAdManager/metadata/V1/AdmanagerError.php | 37 + AdsAdManager/metadata/V1/AppliedLabel.php | 33 + .../metadata/V1/CompanyCreditStatusEnum.php | Bin 0 -> 1005 bytes AdsAdManager/metadata/V1/CompanyMessages.php | Bin 0 -> 2216 bytes AdsAdManager/metadata/V1/CompanyService.php | 53 + AdsAdManager/metadata/V1/CompanyTypeEnum.php | Bin 0 -> 968 bytes AdsAdManager/metadata/V1/ContactMessages.php | 34 + AdsAdManager/metadata/V1/CustomFieldEnums.php | Bin 0 -> 1388 bytes .../metadata/V1/CustomFieldMessages.php | 46 + .../metadata/V1/CustomFieldService.php | 52 + AdsAdManager/metadata/V1/CustomFieldValue.php | Bin 0 -> 1252 bytes .../metadata/V1/CustomTargetingKeyEnums.php | Bin 0 -> 1285 bytes .../V1/CustomTargetingKeyMessages.php | 39 + .../metadata/V1/CustomTargetingKeyService.php | 53 + .../metadata/V1/CustomTargetingValueEnums.php | Bin 0 -> 1200 bytes .../V1/CustomTargetingValueMessages.php | 38 + .../V1/CustomTargetingValueService.php | 53 + .../V1/EntitySignalsMappingMessages.php | Bin 0 -> 1411 bytes .../V1/EntitySignalsMappingService.php | 73 + .../metadata/V1/EnvironmentTypeEnum.php | Bin 0 -> 942 bytes AdsAdManager/metadata/V1/FrequencyCap.php | Bin 0 -> 1071 bytes AdsAdManager/metadata/V1/LabelMessages.php | 32 + AdsAdManager/metadata/V1/NetworkMessages.php | 44 + AdsAdManager/metadata/V1/NetworkService.php | 42 + AdsAdManager/metadata/V1/OrderEnums.php | Bin 0 -> 966 bytes AdsAdManager/metadata/V1/OrderMessages.php | 79 + AdsAdManager/metadata/V1/OrderService.php | 53 + AdsAdManager/metadata/V1/PlacementEnums.php | Bin 0 -> 929 bytes .../metadata/V1/PlacementMessages.php | 43 + AdsAdManager/metadata/V1/PlacementService.php | 53 + AdsAdManager/metadata/V1/ReportService.php | Bin 0 -> 35098 bytes AdsAdManager/metadata/V1/RoleEnums.php | Bin 0 -> 880 bytes AdsAdManager/metadata/V1/RoleMessages.php | 38 + AdsAdManager/metadata/V1/RoleService.php | 52 + AdsAdManager/metadata/V1/Size.php | 33 + AdsAdManager/metadata/V1/SizeTypeEnum.php | Bin 0 -> 958 bytes .../metadata/V1/TaxonomyCategoryMessages.php | 40 + .../metadata/V1/TaxonomyCategoryService.php | 52 + AdsAdManager/metadata/V1/TaxonomyTypeEnum.php | Bin 0 -> 1055 bytes AdsAdManager/metadata/V1/TeamMessages.php | 33 + AdsAdManager/metadata/V1/TimeUnitEnum.php | Bin 0 -> 950 bytes AdsAdManager/metadata/V1/UserMessages.php | 42 + AdsAdManager/metadata/V1/UserService.php | 37 + AdsAdManager/owlbot.py | 56 + AdsAdManager/phpunit.xml.dist | 16 + .../V1/AdUnitServiceClient/get_ad_unit.php | 72 + .../list_ad_unit_sizes.php | 75 + .../V1/AdUnitServiceClient/list_ad_units.php | 75 + .../V1/CompanyServiceClient/get_company.php | 72 + .../CompanyServiceClient/list_companies.php | 75 + .../get_custom_field.php | 72 + .../list_custom_fields.php | 75 + .../get_custom_targeting_key.php | 76 + .../list_custom_targeting_keys.php | 75 + .../get_custom_targeting_value.php | 77 + .../list_custom_targeting_values.php | 79 + .../batch_create_entity_signals_mappings.php | 99 + .../batch_update_entity_signals_mappings.php | 95 + .../create_entity_signals_mapping.php | 84 + .../get_entity_signals_mapping.php | 76 + .../list_entity_signals_mappings.php | 75 + .../update_entity_signals_mapping.php | 78 + .../V1/NetworkServiceClient/get_network.php | 72 + .../V1/NetworkServiceClient/list_networks.php | 57 + .../V1/OrderServiceClient/get_order.php | 72 + .../V1/OrderServiceClient/list_orders.php | 80 + .../PlacementServiceClient/get_placement.php | 72 + .../list_placements.php | 75 + .../V1/ReportServiceClient/create_report.php | 105 + .../fetch_report_result_rows.php | 60 + .../V1/ReportServiceClient/get_report.php | 72 + .../V1/ReportServiceClient/list_reports.php | 75 + .../V1/ReportServiceClient/run_report.php | 91 + .../V1/ReportServiceClient/update_report.php | 101 + .../samples/V1/RoleServiceClient/get_role.php | 72 + .../V1/RoleServiceClient/list_roles.php | 75 + .../get_taxonomy_category.php | 75 + .../list_taxonomy_categories.php | 75 + .../samples/V1/UserServiceClient/get_user.php | 75 + AdsAdManager/src/V1/AdManagerError.php | 241 + AdsAdManager/src/V1/AdUnit.php | 1049 +++++ AdsAdManager/src/V1/AdUnitParent.php | 143 + AdsAdManager/src/V1/AdUnitSize.php | 153 + AdsAdManager/src/V1/AdUnitStatusEnum.php | 34 + .../src/V1/AdUnitStatusEnum/AdUnitStatus.php | 69 + AdsAdManager/src/V1/AppliedLabel.php | 105 + ...atchCreateEntitySignalsMappingsRequest.php | 132 + ...tchCreateEntitySignalsMappingsResponse.php | 67 + ...atchUpdateEntitySignalsMappingsRequest.php | 132 + ...tchUpdateEntitySignalsMappingsResponse.php | 67 + .../src/V1/Client/AdUnitServiceClient.php | 317 ++ .../src/V1/Client/CompanyServiceClient.php | 289 ++ .../V1/Client/CustomFieldServiceClient.php | 289 ++ .../CustomTargetingKeyServiceClient.php | 296 ++ .../CustomTargetingValueServiceClient.php | 303 ++ .../EntitySignalsMappingServiceClient.php | 424 ++ .../src/V1/Client/NetworkServiceClient.php | 271 ++ .../src/V1/Client/OrderServiceClient.php | 294 ++ .../src/V1/Client/PlacementServiceClient.php | 289 ++ .../src/V1/Client/ReportServiceClient.php | 471 ++ .../src/V1/Client/RoleServiceClient.php | 289 ++ .../Client/TaxonomyCategoryServiceClient.php | 294 ++ .../src/V1/Client/UserServiceClient.php | 247 + AdsAdManager/src/V1/Company.php | 649 +++ .../src/V1/CompanyCreditStatusEnum.php | 34 + .../CompanyCreditStatus.php | 117 + AdsAdManager/src/V1/CompanyTypeEnum.php | 34 + .../src/V1/CompanyTypeEnum/CompanyType.php | 84 + AdsAdManager/src/V1/Contact.php | 112 + .../V1/CreateEntitySignalsMappingRequest.php | 132 + AdsAdManager/src/V1/CreateReportRequest.php | 132 + AdsAdManager/src/V1/CustomField.php | 355 ++ .../src/V1/CustomFieldDataTypeEnum.php | 34 + .../CustomFieldDataType.php | 77 + .../src/V1/CustomFieldEntityTypeEnum.php | 34 + .../CustomFieldEntityType.php | 83 + AdsAdManager/src/V1/CustomFieldOption.php | 105 + AdsAdManager/src/V1/CustomFieldStatusEnum.php | 34 + .../CustomFieldStatus.php | 62 + AdsAdManager/src/V1/CustomFieldValue.php | 115 + .../src/V1/CustomFieldValue/Value.php | 176 + .../src/V1/CustomFieldVisibilityEnum.php | 34 + .../CustomFieldVisibility.php | 70 + AdsAdManager/src/V1/CustomTargetingKey.php | 295 ++ .../CustomTargetingKeyReportableTypeEnum.php | 34 + .../CustomTargetingKeyReportableType.php | 69 + .../src/V1/CustomTargetingKeyStatusEnum.php | 34 + .../CustomTargetingKeyStatus.php | 62 + .../src/V1/CustomTargetingKeyTypeEnum.php | 34 + .../CustomTargetingKeyType.php | 62 + AdsAdManager/src/V1/CustomTargetingValue.php | 231 + .../V1/CustomTargetingValueMatchTypeEnum.php | 34 + .../CustomTargetingValueMatchType.php | 111 + .../src/V1/CustomTargetingValueStatusEnum.php | 34 + .../CustomTargetingValueStatus.php | 62 + AdsAdManager/src/V1/EntitySignalsMapping.php | 255 + AdsAdManager/src/V1/EnvironmentTypeEnum.php | 34 + .../EnvironmentTypeEnum/EnvironmentType.php | 62 + .../src/V1/FetchReportResultRowsRequest.php | 170 + .../src/V1/FetchReportResultRowsResponse.php | 283 ++ AdsAdManager/src/V1/FrequencyCap.php | 165 + AdsAdManager/src/V1/GetAdUnitRequest.php | 86 + AdsAdManager/src/V1/GetCompanyRequest.php | 86 + AdsAdManager/src/V1/GetCustomFieldRequest.php | 86 + .../src/V1/GetCustomTargetingKeyRequest.php | 91 + .../src/V1/GetCustomTargetingValueRequest.php | 91 + .../src/V1/GetEntitySignalsMappingRequest.php | 91 + AdsAdManager/src/V1/GetNetworkRequest.php | 86 + AdsAdManager/src/V1/GetOrderRequest.php | 86 + AdsAdManager/src/V1/GetPlacementRequest.php | 86 + AdsAdManager/src/V1/GetReportRequest.php | 86 + AdsAdManager/src/V1/GetRoleRequest.php | 86 + .../src/V1/GetTaxonomyCategoryRequest.php | 86 + AdsAdManager/src/V1/GetUserRequest.php | 86 + AdsAdManager/src/V1/Label.php | 71 + AdsAdManager/src/V1/LabelFrequencyCap.php | 115 + .../src/V1/ListAdUnitSizesRequest.php | 296 ++ .../src/V1/ListAdUnitSizesResponse.php | 171 + AdsAdManager/src/V1/ListAdUnitsRequest.php | 296 ++ AdsAdManager/src/V1/ListAdUnitsResponse.php | 171 + AdsAdManager/src/V1/ListCompaniesRequest.php | 296 ++ AdsAdManager/src/V1/ListCompaniesResponse.php | 172 + .../src/V1/ListCustomFieldsRequest.php | 296 ++ .../src/V1/ListCustomFieldsResponse.php | 172 + .../src/V1/ListCustomTargetingKeysRequest.php | 296 ++ .../V1/ListCustomTargetingKeysResponse.php | 172 + .../V1/ListCustomTargetingValuesRequest.php | 309 ++ .../V1/ListCustomTargetingValuesResponse.php | 172 + .../V1/ListEntitySignalsMappingsRequest.php | 304 ++ .../V1/ListEntitySignalsMappingsResponse.php | 172 + AdsAdManager/src/V1/ListNetworksRequest.php | 33 + AdsAdManager/src/V1/ListNetworksResponse.php | 67 + AdsAdManager/src/V1/ListOrdersRequest.php | 296 ++ AdsAdManager/src/V1/ListOrdersResponse.php | 172 + AdsAdManager/src/V1/ListPlacementsRequest.php | 296 ++ .../src/V1/ListPlacementsResponse.php | 172 + AdsAdManager/src/V1/ListReportsRequest.php | 296 ++ AdsAdManager/src/V1/ListReportsResponse.php | 172 + AdsAdManager/src/V1/ListRolesRequest.php | 292 ++ AdsAdManager/src/V1/ListRolesResponse.php | 171 + .../src/V1/ListTaxonomyCategoriesRequest.php | 296 ++ .../src/V1/ListTaxonomyCategoriesResponse.php | 172 + AdsAdManager/src/V1/Network.php | 393 ++ AdsAdManager/src/V1/Order.php | 1169 +++++ AdsAdManager/src/V1/OrderStatusEnum.php | 34 + .../src/V1/OrderStatusEnum/OrderStatus.php | 100 + AdsAdManager/src/V1/Placement.php | 339 ++ AdsAdManager/src/V1/PlacementStatusEnum.php | 34 + .../PlacementStatusEnum/PlacementStatus.php | 69 + AdsAdManager/src/V1/Report.php | 391 ++ AdsAdManager/src/V1/Report/DataTable.php | 34 + .../V1/Report/DataTable/MetricValueGroup.php | 287 ++ AdsAdManager/src/V1/Report/DataTable/Row.php | 134 + AdsAdManager/src/V1/Report/DateRange.php | 109 + .../V1/Report/DateRange/FixedDateRange.php | 122 + .../V1/Report/DateRange/RelativeDateRange.php | 276 ++ AdsAdManager/src/V1/Report/Dimension.php | 4169 +++++++++++++++++ AdsAdManager/src/V1/Report/Field.php | 109 + AdsAdManager/src/V1/Report/Filter.php | 175 + .../src/V1/Report/Filter/FieldFilter.php | 286 ++ .../src/V1/Report/Filter/FilterList.php | 68 + .../src/V1/Report/Filter/Operation.php | 132 + AdsAdManager/src/V1/Report/Flag.php | 118 + AdsAdManager/src/V1/Report/Metric.php | 1306 ++++++ .../src/V1/Report/MetricValueType.php | 83 + AdsAdManager/src/V1/Report/ReportType.php | 55 + AdsAdManager/src/V1/Report/Slice.php | 114 + AdsAdManager/src/V1/Report/Sort.php | 252 + .../src/V1/Report/TimePeriodColumn.php | 76 + AdsAdManager/src/V1/Report/Value.php | 274 ++ AdsAdManager/src/V1/Report/Value/IntList.php | 68 + .../src/V1/Report/Value/StringList.php | 68 + AdsAdManager/src/V1/Report/Visibility.php | 65 + AdsAdManager/src/V1/ReportDefinition.php | 667 +++ AdsAdManager/src/V1/Role.php | 241 + AdsAdManager/src/V1/RoleStatusEnum.php | 34 + .../src/V1/RoleStatusEnum/RoleStatus.php | 62 + AdsAdManager/src/V1/RunReportMetadata.php | 105 + AdsAdManager/src/V1/RunReportRequest.php | 86 + AdsAdManager/src/V1/RunReportResponse.php | 71 + AdsAdManager/src/V1/Schedule.php | 306 ++ AdsAdManager/src/V1/Schedule/Frequency.php | 97 + .../src/V1/Schedule/MonthlySchedule.php | 72 + .../src/V1/Schedule/WeeklySchedule.php | 68 + AdsAdManager/src/V1/ScheduleOptions.php | 149 + .../V1/ScheduleOptions/DeliveryCondition.php | 62 + AdsAdManager/src/V1/Size.php | 163 + AdsAdManager/src/V1/SizeTypeEnum.php | 34 + AdsAdManager/src/V1/SizeTypeEnum/SizeType.php | 103 + AdsAdManager/src/V1/SmartSizeModeEnum.php | 34 + .../V1/SmartSizeModeEnum/SmartSizeMode.php | 70 + AdsAdManager/src/V1/TargetWindowEnum.php | 34 + .../src/V1/TargetWindowEnum/TargetWindow.php | 63 + AdsAdManager/src/V1/TaxonomyCategory.php | 317 ++ AdsAdManager/src/V1/TaxonomyTypeEnum.php | 34 + .../src/V1/TaxonomyTypeEnum/TaxonomyType.php | 84 + AdsAdManager/src/V1/Team.php | 109 + AdsAdManager/src/V1/TimeUnitEnum.php | 33 + AdsAdManager/src/V1/TimeUnitEnum/TimeUnit.php | 105 + .../V1/UpdateEntitySignalsMappingRequest.php | 157 + AdsAdManager/src/V1/UpdateReportRequest.php | 136 + AdsAdManager/src/V1/User.php | 379 ++ AdsAdManager/src/V1/gapic_metadata.json | 296 ++ .../ad_unit_service_client_config.json | 37 + .../ad_unit_service_descriptor_config.php | 84 + .../ad_unit_service_rest_client_config.php | 81 + .../company_service_client_config.json | 32 + .../company_service_descriptor_config.php | 64 + .../company_service_rest_client_config.php | 70 + .../custom_field_service_client_config.json | 32 + ...custom_field_service_descriptor_config.php | 64 + ...ustom_field_service_rest_client_config.php | 70 + ...m_targeting_key_service_client_config.json | 32 + ...argeting_key_service_descriptor_config.php | 64 + ...rgeting_key_service_rest_client_config.php | 70 + ...targeting_value_service_client_config.json | 32 + ...geting_value_service_descriptor_config.php | 64 + ...eting_value_service_rest_client_config.php | 70 + ...signals_mapping_service_client_config.json | 52 + ...nals_mapping_service_descriptor_config.php | 113 + ...als_mapping_service_rest_client_config.php | 122 + .../network_service_client_config.json | 32 + .../network_service_descriptor_config.php | 47 + .../network_service_rest_client_config.php | 63 + .../order_service_client_config.json | 44 + .../order_service_descriptor_config.php | 64 + .../order_service_rest_client_config.php | 70 + .../placement_service_client_config.json | 32 + .../placement_service_descriptor_config.php | 64 + .../placement_service_rest_client_config.php | 70 + .../report_service_client_config.json | 52 + .../report_service_descriptor_config.php | 120 + .../report_service_rest_client_config.php | 121 + .../resources/role_service_client_config.json | 32 + .../role_service_descriptor_config.php | 64 + .../role_service_rest_client_config.php | 70 + ...xonomy_category_service_client_config.json | 32 + ...omy_category_service_descriptor_config.php | 64 + ...my_category_service_rest_client_config.php | 70 + .../resources/user_service_client_config.json | 27 + .../user_service_descriptor_config.php | 43 + .../user_service_rest_client_config.php | 59 + .../V1/Client/AdUnitServiceClientTest.php | 348 ++ .../V1/Client/CompanyServiceClientTest.php | 272 ++ .../Client/CustomFieldServiceClientTest.php | 244 + .../CustomTargetingKeyServiceClientTest.php | 247 + .../CustomTargetingValueServiceClientTest.php | 261 ++ .../EntitySignalsMappingServiceClientTest.php | 561 +++ .../V1/Client/NetworkServiceClientTest.php | 248 + .../Unit/V1/Client/OrderServiceClientTest.php | 292 ++ .../V1/Client/PlacementServiceClientTest.php | 248 + .../V1/Client/ReportServiceClientTest.php | 646 +++ .../Unit/V1/Client/RoleServiceClientTest.php | 248 + .../TaxonomyCategoryServiceClientTest.php | 248 + .../Unit/V1/Client/UserServiceClientTest.php | 189 + composer.json | 5 +- 308 files changed, 43635 insertions(+), 1 deletion(-) create mode 100644 AdsAdManager/.OwlBot.yaml create mode 100644 AdsAdManager/.gitattributes create mode 100644 AdsAdManager/.github/pull_request_template.md create mode 100644 AdsAdManager/CONTRIBUTING.md create mode 100644 AdsAdManager/LICENSE create mode 100644 AdsAdManager/README.md create mode 100644 AdsAdManager/VERSION create mode 100644 AdsAdManager/composer.json create mode 100644 AdsAdManager/metadata/V1/AdUnitEnums.php create mode 100644 AdsAdManager/metadata/V1/AdUnitMessages.php create mode 100644 AdsAdManager/metadata/V1/AdUnitService.php create mode 100644 AdsAdManager/metadata/V1/AdmanagerError.php create mode 100644 AdsAdManager/metadata/V1/AppliedLabel.php create mode 100644 AdsAdManager/metadata/V1/CompanyCreditStatusEnum.php create mode 100644 AdsAdManager/metadata/V1/CompanyMessages.php create mode 100644 AdsAdManager/metadata/V1/CompanyService.php create mode 100644 AdsAdManager/metadata/V1/CompanyTypeEnum.php create mode 100644 AdsAdManager/metadata/V1/ContactMessages.php create mode 100644 AdsAdManager/metadata/V1/CustomFieldEnums.php create mode 100644 AdsAdManager/metadata/V1/CustomFieldMessages.php create mode 100644 AdsAdManager/metadata/V1/CustomFieldService.php create mode 100644 AdsAdManager/metadata/V1/CustomFieldValue.php create mode 100644 AdsAdManager/metadata/V1/CustomTargetingKeyEnums.php create mode 100644 AdsAdManager/metadata/V1/CustomTargetingKeyMessages.php create mode 100644 AdsAdManager/metadata/V1/CustomTargetingKeyService.php create mode 100644 AdsAdManager/metadata/V1/CustomTargetingValueEnums.php create mode 100644 AdsAdManager/metadata/V1/CustomTargetingValueMessages.php create mode 100644 AdsAdManager/metadata/V1/CustomTargetingValueService.php create mode 100644 AdsAdManager/metadata/V1/EntitySignalsMappingMessages.php create mode 100644 AdsAdManager/metadata/V1/EntitySignalsMappingService.php create mode 100644 AdsAdManager/metadata/V1/EnvironmentTypeEnum.php create mode 100644 AdsAdManager/metadata/V1/FrequencyCap.php create mode 100644 AdsAdManager/metadata/V1/LabelMessages.php create mode 100644 AdsAdManager/metadata/V1/NetworkMessages.php create mode 100644 AdsAdManager/metadata/V1/NetworkService.php create mode 100644 AdsAdManager/metadata/V1/OrderEnums.php create mode 100644 AdsAdManager/metadata/V1/OrderMessages.php create mode 100644 AdsAdManager/metadata/V1/OrderService.php create mode 100644 AdsAdManager/metadata/V1/PlacementEnums.php create mode 100644 AdsAdManager/metadata/V1/PlacementMessages.php create mode 100644 AdsAdManager/metadata/V1/PlacementService.php create mode 100644 AdsAdManager/metadata/V1/ReportService.php create mode 100644 AdsAdManager/metadata/V1/RoleEnums.php create mode 100644 AdsAdManager/metadata/V1/RoleMessages.php create mode 100644 AdsAdManager/metadata/V1/RoleService.php create mode 100644 AdsAdManager/metadata/V1/Size.php create mode 100644 AdsAdManager/metadata/V1/SizeTypeEnum.php create mode 100644 AdsAdManager/metadata/V1/TaxonomyCategoryMessages.php create mode 100644 AdsAdManager/metadata/V1/TaxonomyCategoryService.php create mode 100644 AdsAdManager/metadata/V1/TaxonomyTypeEnum.php create mode 100644 AdsAdManager/metadata/V1/TeamMessages.php create mode 100644 AdsAdManager/metadata/V1/TimeUnitEnum.php create mode 100644 AdsAdManager/metadata/V1/UserMessages.php create mode 100644 AdsAdManager/metadata/V1/UserService.php create mode 100644 AdsAdManager/owlbot.py create mode 100644 AdsAdManager/phpunit.xml.dist create mode 100644 AdsAdManager/samples/V1/AdUnitServiceClient/get_ad_unit.php create mode 100644 AdsAdManager/samples/V1/AdUnitServiceClient/list_ad_unit_sizes.php create mode 100644 AdsAdManager/samples/V1/AdUnitServiceClient/list_ad_units.php create mode 100644 AdsAdManager/samples/V1/CompanyServiceClient/get_company.php create mode 100644 AdsAdManager/samples/V1/CompanyServiceClient/list_companies.php create mode 100644 AdsAdManager/samples/V1/CustomFieldServiceClient/get_custom_field.php create mode 100644 AdsAdManager/samples/V1/CustomFieldServiceClient/list_custom_fields.php create mode 100644 AdsAdManager/samples/V1/CustomTargetingKeyServiceClient/get_custom_targeting_key.php create mode 100644 AdsAdManager/samples/V1/CustomTargetingKeyServiceClient/list_custom_targeting_keys.php create mode 100644 AdsAdManager/samples/V1/CustomTargetingValueServiceClient/get_custom_targeting_value.php create mode 100644 AdsAdManager/samples/V1/CustomTargetingValueServiceClient/list_custom_targeting_values.php create mode 100644 AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/batch_create_entity_signals_mappings.php create mode 100644 AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/batch_update_entity_signals_mappings.php create mode 100644 AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/create_entity_signals_mapping.php create mode 100644 AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/get_entity_signals_mapping.php create mode 100644 AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/list_entity_signals_mappings.php create mode 100644 AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/update_entity_signals_mapping.php create mode 100644 AdsAdManager/samples/V1/NetworkServiceClient/get_network.php create mode 100644 AdsAdManager/samples/V1/NetworkServiceClient/list_networks.php create mode 100644 AdsAdManager/samples/V1/OrderServiceClient/get_order.php create mode 100644 AdsAdManager/samples/V1/OrderServiceClient/list_orders.php create mode 100644 AdsAdManager/samples/V1/PlacementServiceClient/get_placement.php create mode 100644 AdsAdManager/samples/V1/PlacementServiceClient/list_placements.php create mode 100644 AdsAdManager/samples/V1/ReportServiceClient/create_report.php create mode 100644 AdsAdManager/samples/V1/ReportServiceClient/fetch_report_result_rows.php create mode 100644 AdsAdManager/samples/V1/ReportServiceClient/get_report.php create mode 100644 AdsAdManager/samples/V1/ReportServiceClient/list_reports.php create mode 100644 AdsAdManager/samples/V1/ReportServiceClient/run_report.php create mode 100644 AdsAdManager/samples/V1/ReportServiceClient/update_report.php create mode 100644 AdsAdManager/samples/V1/RoleServiceClient/get_role.php create mode 100644 AdsAdManager/samples/V1/RoleServiceClient/list_roles.php create mode 100644 AdsAdManager/samples/V1/TaxonomyCategoryServiceClient/get_taxonomy_category.php create mode 100644 AdsAdManager/samples/V1/TaxonomyCategoryServiceClient/list_taxonomy_categories.php create mode 100644 AdsAdManager/samples/V1/UserServiceClient/get_user.php create mode 100644 AdsAdManager/src/V1/AdManagerError.php create mode 100644 AdsAdManager/src/V1/AdUnit.php create mode 100644 AdsAdManager/src/V1/AdUnitParent.php create mode 100644 AdsAdManager/src/V1/AdUnitSize.php create mode 100644 AdsAdManager/src/V1/AdUnitStatusEnum.php create mode 100644 AdsAdManager/src/V1/AdUnitStatusEnum/AdUnitStatus.php create mode 100644 AdsAdManager/src/V1/AppliedLabel.php create mode 100644 AdsAdManager/src/V1/BatchCreateEntitySignalsMappingsRequest.php create mode 100644 AdsAdManager/src/V1/BatchCreateEntitySignalsMappingsResponse.php create mode 100644 AdsAdManager/src/V1/BatchUpdateEntitySignalsMappingsRequest.php create mode 100644 AdsAdManager/src/V1/BatchUpdateEntitySignalsMappingsResponse.php create mode 100644 AdsAdManager/src/V1/Client/AdUnitServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/CompanyServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/CustomFieldServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/CustomTargetingKeyServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/CustomTargetingValueServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/EntitySignalsMappingServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/NetworkServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/OrderServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/PlacementServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/ReportServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/RoleServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/TaxonomyCategoryServiceClient.php create mode 100644 AdsAdManager/src/V1/Client/UserServiceClient.php create mode 100644 AdsAdManager/src/V1/Company.php create mode 100644 AdsAdManager/src/V1/CompanyCreditStatusEnum.php create mode 100644 AdsAdManager/src/V1/CompanyCreditStatusEnum/CompanyCreditStatus.php create mode 100644 AdsAdManager/src/V1/CompanyTypeEnum.php create mode 100644 AdsAdManager/src/V1/CompanyTypeEnum/CompanyType.php create mode 100644 AdsAdManager/src/V1/Contact.php create mode 100644 AdsAdManager/src/V1/CreateEntitySignalsMappingRequest.php create mode 100644 AdsAdManager/src/V1/CreateReportRequest.php create mode 100644 AdsAdManager/src/V1/CustomField.php create mode 100644 AdsAdManager/src/V1/CustomFieldDataTypeEnum.php create mode 100644 AdsAdManager/src/V1/CustomFieldDataTypeEnum/CustomFieldDataType.php create mode 100644 AdsAdManager/src/V1/CustomFieldEntityTypeEnum.php create mode 100644 AdsAdManager/src/V1/CustomFieldEntityTypeEnum/CustomFieldEntityType.php create mode 100644 AdsAdManager/src/V1/CustomFieldOption.php create mode 100644 AdsAdManager/src/V1/CustomFieldStatusEnum.php create mode 100644 AdsAdManager/src/V1/CustomFieldStatusEnum/CustomFieldStatus.php create mode 100644 AdsAdManager/src/V1/CustomFieldValue.php create mode 100644 AdsAdManager/src/V1/CustomFieldValue/Value.php create mode 100644 AdsAdManager/src/V1/CustomFieldVisibilityEnum.php create mode 100644 AdsAdManager/src/V1/CustomFieldVisibilityEnum/CustomFieldVisibility.php create mode 100644 AdsAdManager/src/V1/CustomTargetingKey.php create mode 100644 AdsAdManager/src/V1/CustomTargetingKeyReportableTypeEnum.php create mode 100644 AdsAdManager/src/V1/CustomTargetingKeyReportableTypeEnum/CustomTargetingKeyReportableType.php create mode 100644 AdsAdManager/src/V1/CustomTargetingKeyStatusEnum.php create mode 100644 AdsAdManager/src/V1/CustomTargetingKeyStatusEnum/CustomTargetingKeyStatus.php create mode 100644 AdsAdManager/src/V1/CustomTargetingKeyTypeEnum.php create mode 100644 AdsAdManager/src/V1/CustomTargetingKeyTypeEnum/CustomTargetingKeyType.php create mode 100644 AdsAdManager/src/V1/CustomTargetingValue.php create mode 100644 AdsAdManager/src/V1/CustomTargetingValueMatchTypeEnum.php create mode 100644 AdsAdManager/src/V1/CustomTargetingValueMatchTypeEnum/CustomTargetingValueMatchType.php create mode 100644 AdsAdManager/src/V1/CustomTargetingValueStatusEnum.php create mode 100644 AdsAdManager/src/V1/CustomTargetingValueStatusEnum/CustomTargetingValueStatus.php create mode 100644 AdsAdManager/src/V1/EntitySignalsMapping.php create mode 100644 AdsAdManager/src/V1/EnvironmentTypeEnum.php create mode 100644 AdsAdManager/src/V1/EnvironmentTypeEnum/EnvironmentType.php create mode 100644 AdsAdManager/src/V1/FetchReportResultRowsRequest.php create mode 100644 AdsAdManager/src/V1/FetchReportResultRowsResponse.php create mode 100644 AdsAdManager/src/V1/FrequencyCap.php create mode 100644 AdsAdManager/src/V1/GetAdUnitRequest.php create mode 100644 AdsAdManager/src/V1/GetCompanyRequest.php create mode 100644 AdsAdManager/src/V1/GetCustomFieldRequest.php create mode 100644 AdsAdManager/src/V1/GetCustomTargetingKeyRequest.php create mode 100644 AdsAdManager/src/V1/GetCustomTargetingValueRequest.php create mode 100644 AdsAdManager/src/V1/GetEntitySignalsMappingRequest.php create mode 100644 AdsAdManager/src/V1/GetNetworkRequest.php create mode 100644 AdsAdManager/src/V1/GetOrderRequest.php create mode 100644 AdsAdManager/src/V1/GetPlacementRequest.php create mode 100644 AdsAdManager/src/V1/GetReportRequest.php create mode 100644 AdsAdManager/src/V1/GetRoleRequest.php create mode 100644 AdsAdManager/src/V1/GetTaxonomyCategoryRequest.php create mode 100644 AdsAdManager/src/V1/GetUserRequest.php create mode 100644 AdsAdManager/src/V1/Label.php create mode 100644 AdsAdManager/src/V1/LabelFrequencyCap.php create mode 100644 AdsAdManager/src/V1/ListAdUnitSizesRequest.php create mode 100644 AdsAdManager/src/V1/ListAdUnitSizesResponse.php create mode 100644 AdsAdManager/src/V1/ListAdUnitsRequest.php create mode 100644 AdsAdManager/src/V1/ListAdUnitsResponse.php create mode 100644 AdsAdManager/src/V1/ListCompaniesRequest.php create mode 100644 AdsAdManager/src/V1/ListCompaniesResponse.php create mode 100644 AdsAdManager/src/V1/ListCustomFieldsRequest.php create mode 100644 AdsAdManager/src/V1/ListCustomFieldsResponse.php create mode 100644 AdsAdManager/src/V1/ListCustomTargetingKeysRequest.php create mode 100644 AdsAdManager/src/V1/ListCustomTargetingKeysResponse.php create mode 100644 AdsAdManager/src/V1/ListCustomTargetingValuesRequest.php create mode 100644 AdsAdManager/src/V1/ListCustomTargetingValuesResponse.php create mode 100644 AdsAdManager/src/V1/ListEntitySignalsMappingsRequest.php create mode 100644 AdsAdManager/src/V1/ListEntitySignalsMappingsResponse.php create mode 100644 AdsAdManager/src/V1/ListNetworksRequest.php create mode 100644 AdsAdManager/src/V1/ListNetworksResponse.php create mode 100644 AdsAdManager/src/V1/ListOrdersRequest.php create mode 100644 AdsAdManager/src/V1/ListOrdersResponse.php create mode 100644 AdsAdManager/src/V1/ListPlacementsRequest.php create mode 100644 AdsAdManager/src/V1/ListPlacementsResponse.php create mode 100644 AdsAdManager/src/V1/ListReportsRequest.php create mode 100644 AdsAdManager/src/V1/ListReportsResponse.php create mode 100644 AdsAdManager/src/V1/ListRolesRequest.php create mode 100644 AdsAdManager/src/V1/ListRolesResponse.php create mode 100644 AdsAdManager/src/V1/ListTaxonomyCategoriesRequest.php create mode 100644 AdsAdManager/src/V1/ListTaxonomyCategoriesResponse.php create mode 100644 AdsAdManager/src/V1/Network.php create mode 100644 AdsAdManager/src/V1/Order.php create mode 100644 AdsAdManager/src/V1/OrderStatusEnum.php create mode 100644 AdsAdManager/src/V1/OrderStatusEnum/OrderStatus.php create mode 100644 AdsAdManager/src/V1/Placement.php create mode 100644 AdsAdManager/src/V1/PlacementStatusEnum.php create mode 100644 AdsAdManager/src/V1/PlacementStatusEnum/PlacementStatus.php create mode 100644 AdsAdManager/src/V1/Report.php create mode 100644 AdsAdManager/src/V1/Report/DataTable.php create mode 100644 AdsAdManager/src/V1/Report/DataTable/MetricValueGroup.php create mode 100644 AdsAdManager/src/V1/Report/DataTable/Row.php create mode 100644 AdsAdManager/src/V1/Report/DateRange.php create mode 100644 AdsAdManager/src/V1/Report/DateRange/FixedDateRange.php create mode 100644 AdsAdManager/src/V1/Report/DateRange/RelativeDateRange.php create mode 100644 AdsAdManager/src/V1/Report/Dimension.php create mode 100644 AdsAdManager/src/V1/Report/Field.php create mode 100644 AdsAdManager/src/V1/Report/Filter.php create mode 100644 AdsAdManager/src/V1/Report/Filter/FieldFilter.php create mode 100644 AdsAdManager/src/V1/Report/Filter/FilterList.php create mode 100644 AdsAdManager/src/V1/Report/Filter/Operation.php create mode 100644 AdsAdManager/src/V1/Report/Flag.php create mode 100644 AdsAdManager/src/V1/Report/Metric.php create mode 100644 AdsAdManager/src/V1/Report/MetricValueType.php create mode 100644 AdsAdManager/src/V1/Report/ReportType.php create mode 100644 AdsAdManager/src/V1/Report/Slice.php create mode 100644 AdsAdManager/src/V1/Report/Sort.php create mode 100644 AdsAdManager/src/V1/Report/TimePeriodColumn.php create mode 100644 AdsAdManager/src/V1/Report/Value.php create mode 100644 AdsAdManager/src/V1/Report/Value/IntList.php create mode 100644 AdsAdManager/src/V1/Report/Value/StringList.php create mode 100644 AdsAdManager/src/V1/Report/Visibility.php create mode 100644 AdsAdManager/src/V1/ReportDefinition.php create mode 100644 AdsAdManager/src/V1/Role.php create mode 100644 AdsAdManager/src/V1/RoleStatusEnum.php create mode 100644 AdsAdManager/src/V1/RoleStatusEnum/RoleStatus.php create mode 100644 AdsAdManager/src/V1/RunReportMetadata.php create mode 100644 AdsAdManager/src/V1/RunReportRequest.php create mode 100644 AdsAdManager/src/V1/RunReportResponse.php create mode 100644 AdsAdManager/src/V1/Schedule.php create mode 100644 AdsAdManager/src/V1/Schedule/Frequency.php create mode 100644 AdsAdManager/src/V1/Schedule/MonthlySchedule.php create mode 100644 AdsAdManager/src/V1/Schedule/WeeklySchedule.php create mode 100644 AdsAdManager/src/V1/ScheduleOptions.php create mode 100644 AdsAdManager/src/V1/ScheduleOptions/DeliveryCondition.php create mode 100644 AdsAdManager/src/V1/Size.php create mode 100644 AdsAdManager/src/V1/SizeTypeEnum.php create mode 100644 AdsAdManager/src/V1/SizeTypeEnum/SizeType.php create mode 100644 AdsAdManager/src/V1/SmartSizeModeEnum.php create mode 100644 AdsAdManager/src/V1/SmartSizeModeEnum/SmartSizeMode.php create mode 100644 AdsAdManager/src/V1/TargetWindowEnum.php create mode 100644 AdsAdManager/src/V1/TargetWindowEnum/TargetWindow.php create mode 100644 AdsAdManager/src/V1/TaxonomyCategory.php create mode 100644 AdsAdManager/src/V1/TaxonomyTypeEnum.php create mode 100644 AdsAdManager/src/V1/TaxonomyTypeEnum/TaxonomyType.php create mode 100644 AdsAdManager/src/V1/Team.php create mode 100644 AdsAdManager/src/V1/TimeUnitEnum.php create mode 100644 AdsAdManager/src/V1/TimeUnitEnum/TimeUnit.php create mode 100644 AdsAdManager/src/V1/UpdateEntitySignalsMappingRequest.php create mode 100644 AdsAdManager/src/V1/UpdateReportRequest.php create mode 100644 AdsAdManager/src/V1/User.php create mode 100644 AdsAdManager/src/V1/gapic_metadata.json create mode 100644 AdsAdManager/src/V1/resources/ad_unit_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/ad_unit_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/ad_unit_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/company_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/company_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/company_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/custom_field_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/custom_field_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/custom_field_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/custom_targeting_key_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/custom_targeting_key_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/custom_targeting_key_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/custom_targeting_value_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/custom_targeting_value_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/custom_targeting_value_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/entity_signals_mapping_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/entity_signals_mapping_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/entity_signals_mapping_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/network_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/network_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/network_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/order_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/order_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/order_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/placement_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/placement_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/placement_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/report_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/report_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/report_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/role_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/role_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/role_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/taxonomy_category_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/taxonomy_category_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/taxonomy_category_service_rest_client_config.php create mode 100644 AdsAdManager/src/V1/resources/user_service_client_config.json create mode 100644 AdsAdManager/src/V1/resources/user_service_descriptor_config.php create mode 100644 AdsAdManager/src/V1/resources/user_service_rest_client_config.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/AdUnitServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/CompanyServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/CustomFieldServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/CustomTargetingKeyServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/CustomTargetingValueServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/EntitySignalsMappingServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/NetworkServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/OrderServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/PlacementServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/ReportServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/RoleServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/TaxonomyCategoryServiceClientTest.php create mode 100644 AdsAdManager/tests/Unit/V1/Client/UserServiceClientTest.php diff --git a/.repo-metadata-full.json b/.repo-metadata-full.json index 14057a6a5f24..98e0ec780eb1 100644 --- a/.repo-metadata-full.json +++ b/.repo-metadata-full.json @@ -15,6 +15,14 @@ "library_type": "GAPIC_AUTO", "api_shortname": "accesscontextmanager" }, + "AdsAdManager": { + "language": "php", + "distribution_name": "googleads/ad-manager", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/googleads/ad-manager/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "admanager" + }, "AdsMarketingPlatformAdmin": { "language": "php", "distribution_name": "google/ads-marketingplatform-admin", diff --git a/AdsAdManager/.OwlBot.yaml b/AdsAdManager/.OwlBot.yaml new file mode 100644 index 000000000000..bb14e9bf83e7 --- /dev/null +++ b/AdsAdManager/.OwlBot.yaml @@ -0,0 +1,4 @@ +deep-copy-regex: + - source: /google/ads/admanager/(v1)/.*-php/(.*) + dest: /owl-bot-staging/AdsAdManager/$1/$2 +api-name: AdsAdManager diff --git a/AdsAdManager/.gitattributes b/AdsAdManager/.gitattributes new file mode 100644 index 000000000000..4bf0fe6f415b --- /dev/null +++ b/AdsAdManager/.gitattributes @@ -0,0 +1,7 @@ +/*.xml.dist export-ignore +/.OwlBot.yaml export-ignore +/.github export-ignore +/owlbot.py export-ignore +/src/**/gapic_metadata.json export-ignore +/samples export-ignore +/tests export-ignore diff --git a/AdsAdManager/.github/pull_request_template.md b/AdsAdManager/.github/pull_request_template.md new file mode 100644 index 000000000000..183b69e825e8 --- /dev/null +++ b/AdsAdManager/.github/pull_request_template.md @@ -0,0 +1,24 @@ +**PLEASE READ THIS ENTIRE MESSAGE** + +Hello, and thank you for your contribution! Please note that this repository is +a read-only split of `googleapis/google-cloud-php`. As such, we are +unable to accept pull requests to this repository. + +We welcome your pull request and would be happy to consider it for inclusion in +our library if you follow these steps: + +* Clone the parent client library repository: + +```sh +$ git clone git@github.com:googleapis/google-cloud-php.git +``` + +* Move your changes into the correct location in that library. Library code +belongs in `AdsAdManager/src`, and tests in `AdsAdManager/tests`. + +* Push the changes in a new branch to a fork, and open a new pull request +[here](https://github.com/googleapis/google-cloud-php). + +Thanks again, and we look forward to seeing your proposed change! + +The Google Cloud PHP team diff --git a/AdsAdManager/CONTRIBUTING.md b/AdsAdManager/CONTRIBUTING.md new file mode 100644 index 000000000000..76ea811cacdb --- /dev/null +++ b/AdsAdManager/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. We accept +and review pull requests against the main +[Google Cloud PHP](https://github.com/googleapis/google-cloud-php) +repository, which contains all of our client libraries. You will also need to +sign a Contributor License Agreement. For more details about how to contribute, +see the +[CONTRIBUTING.md](https://github.com/googleapis/google-cloud-php/blob/main/CONTRIBUTING.md) +file in the main Google Cloud PHP repository. diff --git a/AdsAdManager/LICENSE b/AdsAdManager/LICENSE new file mode 100644 index 000000000000..8f71f43fee3f --- /dev/null +++ b/AdsAdManager/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/AdsAdManager/README.md b/AdsAdManager/README.md new file mode 100644 index 000000000000..db0957696102 --- /dev/null +++ b/AdsAdManager/README.md @@ -0,0 +1,45 @@ +# Google Ads Ad Manager for PHP + +> Idiomatic PHP client for [Google Ads Ad Manager](https://developers.google.com/ad-manager/api/beta). + +[![Latest Stable Version](https://poser.pugx.org/googleads/ad-manager/v/stable)](https://packagist.org/packages/googleads/ad-manager) [![Packagist](https://img.shields.io/packagist/dm/googleads/ad-manager.svg)](https://packagist.org/packages/googleads/ad-manager) + +* [API documentation](https://cloud.google.com/php/docs/reference/googleads/ad-manager/latest) + +**NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any +support requests, bug reports, or development contributions should be directed to +that project. + +### Installation + +To begin, install the preferred dependency manager for PHP, [Composer](https://getcomposer.org/). + +Now, install this component: + +```sh +$ composer require googleads/ad-manager +``` + +> Browse the complete list of [Google Cloud APIs](https://cloud.google.com/php/docs/reference) +> for PHP + +This component supports both REST over HTTP/1.1 and gRPC. In order to take advantage of the benefits +offered by gRPC (such as streaming methods) please see our +[gRPC installation guide](https://cloud.google.com/php/grpc). + +### Authentication + +Please see our [Authentication guide](https://github.com/googleapis/google-cloud-php/blob/main/AUTHENTICATION.md) for more information +on authenticating your client. Once authenticated, you'll be ready to start making requests. + +### Sample + +See the [samples directory](https://github.com/googleapis/php-ads-ad-manager/tree/main/samples) for a canonical list of samples. + +### Version + +This component is considered alpha. As such, it is still a work-in-progress and is more likely to get backwards-incompatible updates. + +### Next Steps + +1. Understand the [official documentation](https://developers.google.com/ad-manager/api/beta). diff --git a/AdsAdManager/VERSION b/AdsAdManager/VERSION new file mode 100644 index 000000000000..77d6f4ca2371 --- /dev/null +++ b/AdsAdManager/VERSION @@ -0,0 +1 @@ +0.0.0 diff --git a/AdsAdManager/composer.json b/AdsAdManager/composer.json new file mode 100644 index 000000000000..7f03e4f66aee --- /dev/null +++ b/AdsAdManager/composer.json @@ -0,0 +1,30 @@ +{ + "name": "googleads/ad-manager", + "description": "Google Ads Ad Manager Client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\Ads\\AdManager\\": "src", + "GPBMetadata\\Google\\Ads\\Admanager\\": "metadata" + } + }, + "extra": { + "component": { + "id": "googleads/ad-manager", + "path": "AdsAdManager", + "target": "googleapis/php-ads-ad-manager" + } + }, + "require": { + "php": "^8.0", + "google/gax": "^1.34.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-grpc": "Enables use of gRPC, a universal high-performance RPC framework created by Google.", + "ext-protobuf": "Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions." + } +} diff --git a/AdsAdManager/metadata/V1/AdUnitEnums.php b/AdsAdManager/metadata/V1/AdUnitEnums.php new file mode 100644 index 0000000000000000000000000000000000000000..25564e2ab81ea80be3ee8d322809208f757197eb GIT binary patch literal 1115 zcmb7D+iuf95T$8>G76H(O9d6MluAtnIEr{nDd5CzupoAnIH{;Ctc|^KjU3xruZsZn zdyshIJNPQbmqux;K459>-Ptp9#xrx?yh~0Kcux8(Vw?)*k=b`5P8msfEMhkf$t;`C z87FSMNP>`YnGn?^hG`K^)vagfn#LJ-S%>&>?1!vHy%g7iM$~7#b=Jm%lSP4WSd=YN zxrhr8(FIEr>N3(Fb_YyQj|yt{ix9TrrMRjP_OyKf;D$6!iQ-K#l9mU8pFr?QvRN3o zBo$QPXE#Wl01*KVgCF=Whh$E}l%fB1>^zHH5yTP69n8pO&3#hF%(1&kjQ@T}E>ari z<-k(ddL$T+XlSb}b$O78m=6)!>G(`6ip=1Np4I^A)7B z{9~+jmgY^^nL>Tl)_4Ms6xEp+y5)>5#hQ$9KOSm5{YckT=~e^aj?%OAsV1#8>aeLB z)v1=Blu_>kUa8XhP6`jk3(Cb9yEuqFR*-#x`s@fI0P1rC@ zBPWxfUP8NyVQ3?%mRr=%hBDB5g*%c?K(Z*uHXa9&7k?`_6{xS;8js02vNhS^xk5 literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/AdUnitMessages.php b/AdsAdManager/metadata/V1/AdUnitMessages.php new file mode 100644 index 0000000000000000000000000000000000000000..0bd0922863bd0edb97dcc929d8e27ae578ea6ef9 GIT binary patch literal 3739 zcmbtX-Ez}L6t1HrkaY+}ltu}KEa5Mq!EQ|HbPP1L8%UXwCes9%q3)<_X>IRRmQ?LJ zkTSXK3^RR+Uh^ou=riQHkH8gYeO6`#XnP-;(> z?;zv_gmYZ+9|PFB!9p()hM%}o515C!AOikeVccb4#7MyYfD_%r4H9q)5QDajPUs01 zg;*}w2tB&6h&86Py%I+dfqOXhYEuRU0#bVz3Yvr@sI5}&B`g+EvI(Z;a+8WIlyYQY z(QGT>SOYI;AIs$dC+}gAbm+m|F;1xHB;g(9w*=VB-fBmP83a(q>VDX1^K!X+z%Jg= zP~tdX)PF?k6b|^_F!#e9mPBEjhGKg+rqZhqKzoqT-#aw)cE2O>2f%CrL5{IJX0->5 z27Z;c$PSB=<1PJ(no>D(5Hr55cAz+crbpi}Te{7l%mir<36rAu&2N|?bj9~G{yuv^PxbRac&?fr{!Yy)-Yq*<&`UdSS|%- znMFf)Xr%OUJrWz^`C&V7Ac?V=OKoCSY)B@!bwdSXFmu2lG5I!A7tNHCKM;|kZ<5-F zoz06hbJ}43uSqnnOWHnzMx}f@Ih~QB43{I84I%LN!Wh|w|xS$8L z3(wFwVu&S30z&ORXQ3ZGca{#p-d5I6m9fG;I3Tfewu`1Iv`J_sJJjt(zxhGv{-am9 zoP7<=bkEjrd_Fa{%D?_s`Q>owTnwpr9woo=;!E@9N}1b(?_&9N2E&HedpAy)q0+d1 zsm>zD9pd%;zd3}o&dQ_PU!YMLG1U?Br3=G@1x7L=Blgeecj)SOe8d&{ z#x(dce6PcefrOwOTC5IpYW~k0n$!ointernalAddGeneratedFile( + ' +¿ +-google/ads/admanager/v1/ad_unit_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"I +GetAdUnitRequest5 +name ( B\'àAúA! +admanager.googleapis.com/AdUnit"¾ +ListAdUnitsRequest8 +parent ( B(àAúA" + admanager.googleapis.com/Network + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA +skip (BàA"u +ListAdUnitsResponse1 +ad_units ( 2.google.ads.admanager.v1.AdUnit +next_page_token (  + +total_size (" +ListAdUnitSizesRequest8 +parent ( B(àAúA" + admanager.googleapis.com/Network + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA +skip (BàA"‚ +ListAdUnitSizesResponse: + ad_unit_sizes ( 2#.google.ads.admanager.v1.AdUnitSize +next_page_token (  + +total_size (2€ + AdUnitService‡ + GetAdUnit).google.ads.admanager.v1.GetAdUnitRequest.google.ads.admanager.v1.AdUnit".ÚAname‚Óä“!/v1/{name=networks/*/adUnits/*}š + ListAdUnits+.google.ads.admanager.v1.ListAdUnitsRequest,.google.ads.admanager.v1.ListAdUnitsResponse"0ÚAparent‚Óä“!/v1/{parent=networks/*}/adUnitsª +ListAdUnitSizes/.google.ads.admanager.v1.ListAdUnitSizesRequest0.google.ads.admanager.v1.ListAdUnitSizesResponse"4ÚAparent‚Óä“%#/v1/{parent=networks/*}/adUnitSizesÊAadmanager.googleapis.comB© +com.google.ads.admanager.v1BAdUnitServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/AdmanagerError.php b/AdsAdManager/metadata/V1/AdmanagerError.php new file mode 100644 index 000000000000..8fc32636626a --- /dev/null +++ b/AdsAdManager/metadata/V1/AdmanagerError.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' +– +-google/ads/admanager/v1/admanager_error.protogoogle.ads.admanager.v1"– +AdManagerError + +error_code (  +message (  + +field_path (  +trigger (  + stack_trace ( % +details ( 2.google.protobuf.AnyBª +com.google.ads.admanager.v1BAdManagerErrorProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/AppliedLabel.php b/AdsAdManager/metadata/V1/AppliedLabel.php new file mode 100644 index 000000000000..ccf44e94926e --- /dev/null +++ b/AdsAdManager/metadata/V1/AppliedLabel.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' +ì ++google/ads/admanager/v1/applied_label.protogoogle.ads.admanager.v1google/api/resource.proto"V + AppliedLabel5 +label ( B&àAúA +admanager.googleapis.com/Label +negated (B¨ +com.google.ads.admanager.v1BAppliedLabelProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CompanyCreditStatusEnum.php b/AdsAdManager/metadata/V1/CompanyCreditStatusEnum.php new file mode 100644 index 0000000000000000000000000000000000000000..da04aa2a013a71883c545d76bcf1d64ff1c9f7c5 GIT binary patch literal 1005 zcmbVLO>fgc5G8FX)xse%haBi(TZ)=W;3(pPk_JeeG*~pTMcharOV-BTxGOok)_Ps3 zMfn;02)Obu_*Lw#U8|_g1xw?vnR)X(@A>pYdYOWkaEvMDNZ<%AuA#WZFy&0JkR@=D zFPE6ZkgZaZU~WPp^5{oVHTFy@*Q^Rv+cEgL4c`5)WJaUtG^N-w zN^#7q_Ti5jXlxMX@CH18AZ5G)2bME&`_r$1^+lN~n0bBgVisIXXYRT7e zw{Lm&d{nO)&%mBNEuXfGr{IY*4L&*N!}_+d2X%qBWeU{yi2fu6Jg*2kM zf%jnl0cOfgT3)yI?PJ*(vjoxDWIS%gm}>vFiWEwTGXB5j?^etCwbdAFLz~jjGA6|j rV$R!tZZp32x;&LRU%Gv24gEBl)Tht)U-aKcRh4Ekgf<5!1}?wa3B`}d1~Ct*(oEyeL#_gzaLrlFf5MP<>5#<=5aYb;FiS$s(}Ws@qa=jJ6Ix&z z*@q&<6ztN{tz(lF%!vOY(I68R`}?3m$%RhkF^aa^Bha&48cO4dHEZDbkTwb*+wF5s z?our?ShP;51f9ubC->U`oX+0-DT z(X0&)aBdp2!kIEYCV$q5cfEmeHVb(V2MixO8s5qF)~A;Ng?Zru(|MT+083ZQ;8yc8 zO^pRwRJd0v2;Ll;G6Vx#2a9-jK|tDMTUM!?k3Y^(QK~n(&L*w^yGnTEE+M087**#kxfO9GVm1wOoocDGaswue$L`9Uwn3^x_R3wIQ&38b(*)d`bDB%) z@TyoL0Y+1sbI=loIe|pGWKR8_ti4f1w~oB^*8XJ?ot@b-vPHUyu;O&dIxE&i5Sx9W z+*`ETsJ9+nXku}@6c`8Owvc?nsit~)DmA+_T6XmX>E4A*U9OWK)??RM5N;^+UJrj6LATS-~-bN4Vt*tVQvi-c- zKo?!~fV`u}TtV17 zIUvItIQ^hjydkk=DsOIO*C89hnM`(ntB`k*U&e8E4Rr79y?Gk*&2?P)?u#PRs28(j zGfVQXOPjs?Dtma9@i{DRyZ3VY_mbo12OGaE&&QKJSjlaC a@_4rTJ}NHU!a=<780M12nK~t>g!}{Q3D=$g literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/CompanyService.php b/AdsAdManager/metadata/V1/CompanyService.php new file mode 100644 index 000000000000..f8993ba708f7 --- /dev/null +++ b/AdsAdManager/metadata/V1/CompanyService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' +ß +-google/ads/admanager/v1/company_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"K +GetCompanyRequest6 +name ( B(àAúA" + admanager.googleapis.com/Company"À +ListCompaniesRequest8 +parent ( B(àAúA" + admanager.googleapis.com/Network + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA +skip (BàA"y +ListCompaniesResponse3 + companies ( 2 .google.ads.admanager.v1.Company +next_page_token (  + +total_size (2á +CompanyServiceŒ + +GetCompany*.google.ads.admanager.v1.GetCompanyRequest .google.ads.admanager.v1.Company"0ÚAname‚Óä“#!/v1/{name=networks/*/companies/*}¢ + ListCompanies-.google.ads.admanager.v1.ListCompaniesRequest..google.ads.admanager.v1.ListCompaniesResponse"2ÚAparent‚Óä“#!/v1/{parent=networks/*}/companiesÊAadmanager.googleapis.comBª +com.google.ads.admanager.v1BCompanyServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CompanyTypeEnum.php b/AdsAdManager/metadata/V1/CompanyTypeEnum.php new file mode 100644 index 0000000000000000000000000000000000000000..b212272e79bdb310cf674b2b5515e836552396a7 GIT binary patch literal 968 zcmb7CU5nE|6t%m$52I)Z3oGcubzRslXiC|))~fx;)*@{}o2^s=VVX>{1L;hdOctsX z|AXM4(0}5ua`LgEy6l62n+bRBJ@@3E^X6TA6{D9hB#a0wNdU_Y$SVS|;F9}1f@Qi| z5dl75$220s02o*>u^cc5Bj<%`O?WDN(t?olFd_{cBr4XJ;gE>Nb+eImVz%+*CMF(X z>DtJ#5n^~vk{J60hIVgEBo45|?l6aOyFsF&gmLH1HbQ=clLYz&oTJc81%|#NP*0pL zBkDsUu~f$iO+3n|q&T8q)IW7#g`UiMiTA2X1KD z*;>>}+!2#RFdVr9lK6tgk_%gvwpt;P)iSe8{j40D!O<1e3y!VUEs`COA|<=i0R)k$ zVC|fD2C%KZa%QjJ(vn9v2&%CcN~n5On6;gvAN#2Bp9<+mMT4OvRZ(hTTsM!u*U*!H zbU6No9`2;{=jdtQ8r$8;!gCh3>0M4{w%H$DjLd;{Pk)S1cQ7}n&S+*%wVHm2v=7$h z%=C7$dpbe~-Jv<@FSLDKLyyXeB6GjM@Fu47$(nxD9`t_I&@<&V;||ij!yS5=b8;!| z+UNIWL&zh{LW7I25fYYrwA>huY3Av_eci4$@^kNKn48v6rd2U6yl>2#zi)2b+|TM& g-nq)r%Y%Hz`DvxptHJ;~e!0^td1YaXE!raV2NuLLz5oCK literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/ContactMessages.php b/AdsAdManager/metadata/V1/ContactMessages.php new file mode 100644 index 000000000000..54aed933eb50 --- /dev/null +++ b/AdsAdManager/metadata/V1/ContactMessages.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + ' +¸ +.google/ads/admanager/v1/contact_messages.protogoogle.ads.admanager.v1google/api/resource.proto"› +Contact +name ( BàA + +contact_id (BàA:dêAa + admanager.googleapis.com/Contact*networks/{network_code}/contacts/{contact}*contacts2contactB« +com.google.ads.admanager.v1BContactMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CustomFieldEnums.php b/AdsAdManager/metadata/V1/CustomFieldEnums.php new file mode 100644 index 0000000000000000000000000000000000000000..8ea7ee7cff7c1fe1f4092de4a6a1d6a92713b505 GIT binary patch literal 1388 zcmb7E%Wl&^6eXpt=m?}>1QlYzkXAI6z#(FnQoxDbU@5V!*bOR*WKEojJHoLodt9lY zZrQNlKM-vB2)>FtcACaYyTH;oGrq5rbLQSR@8Z)K?cgpAX+k)i;PE-;rxeFY#3L^X z@Hm@JX@b3I7PEjRGRCTj4b#DzsyojhG>x*vqb=-5ksr_onWV60BqTmf8fVRhm!&+K zxl=}iiA%$5mdbf@ghDc-X-qtdyH>kTIhhbnM%_HmNSUOt=6OcL<^e)pK++U<@_a`k zohGuOuL#2vXXAi*IOT-H&n`<{7BbFAz`nr0I>b{Fq!f~@`cAXZ<17lX2rxsB*7tFd zQ~2)25wLKGFL7Cd7$9Y&hnyxM2}UYSy@bU)N-S_~wS3AKbc!$a{drlDj!kjBz}RZ7 zfIP%J$>?%*j1$VUBs|D*iv$;oU5@PKTQVGwowu=ZE zRE0HHLq2QPzE{xpk`gK?=bXn>C{l~jgKJFEb5!db+m6|Hk94i4x~k$Ru5)5(?y+H8 zT1SV^YW0?c(5CGSbfa6Xh`n*#Z)=0U!;W1wCFW zsfC>J^97zC74-00t5iq3B}kg#=+4P?prBw+H#Apwv_9b4LL25l&0*a|cRB-2arB`8 z1}6)EnYPlau1k-Qba`^G!Z&K4OMq;+vss!`H$eB7kQN4M2R$vJv>nAcwpUqGIys1n z0HGW6(^~CYnVca@*_Z`DP+pOhpj;WH(H`0ub z^iDuCKqBUZ(iW<33@wkHmmaK{XD{t0uuUil=uywhWQw26ebcg zF?Y(d=U{PVf39tJ^SL6!T!Gau=94^Z{=Kw}@{t3txorePXS|u$c)hpir58nuE_L*c O-JE+CjeCJE5c&tBldFFK literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/CustomFieldMessages.php b/AdsAdManager/metadata/V1/CustomFieldMessages.php new file mode 100644 index 000000000000..6e2776c20d37 --- /dev/null +++ b/AdsAdManager/metadata/V1/CustomFieldMessages.php @@ -0,0 +1,46 @@ +internalAddGeneratedFile( + ' +È +3google/ads/admanager/v1/custom_field_messages.protogoogle.ads.admanager.v1google/api/field_behavior.protogoogle/api/resource.proto"¬ + CustomField +name ( BàA +custom_field_id (BàA + display_name ( BàA + description ( BàAU +status (2@.google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatusBàAb + entity_type (2H.google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityTypeBàA\\ + data_type (2D.google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataTypeBàAa + +visibility (2H.google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibilityBàA@ +options + ( 2*.google.ads.admanager.v1.CustomFieldOptionBàA:yêAv +$admanager.googleapis.com/CustomField3networks/{network_code}/customFields/{custom_field}* customFields2 customField"S +CustomFieldOption# +custom_field_option_id (BàA + display_name ( BàAB¯ +com.google.ads.admanager.v1BCustomFieldMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CustomFieldService.php b/AdsAdManager/metadata/V1/CustomFieldService.php new file mode 100644 index 000000000000..6960a5365982 --- /dev/null +++ b/AdsAdManager/metadata/V1/CustomFieldService.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' +ž +2google/ads/admanager/v1/custom_field_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"S +GetCustomFieldRequest: +name ( B,àAúA& +$admanager.googleapis.com/CustomField"à +ListCustomFieldsRequest8 +parent ( B(àAúA" + admanager.googleapis.com/Network + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA +skip (BàA"„ +ListCustomFieldsResponse; + custom_fields ( 2$.google.ads.admanager.v1.CustomField +next_page_token (  + +total_size (2€ +CustomFieldService› +GetCustomField..google.ads.admanager.v1.GetCustomFieldRequest$.google.ads.admanager.v1.CustomField"3ÚAname‚Óä“&$/v1/{name=networks/*/customFields/*}® +ListCustomFields0.google.ads.admanager.v1.ListCustomFieldsRequest1.google.ads.admanager.v1.ListCustomFieldsResponse"5ÚAparent‚Óä“&$/v1/{parent=networks/*}/customFieldsÊAadmanager.googleapis.comB® +com.google.ads.admanager.v1BCustomFieldServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CustomFieldValue.php b/AdsAdManager/metadata/V1/CustomFieldValue.php new file mode 100644 index 0000000000000000000000000000000000000000..6111d1bcb16167ba6a319594a129860857036bc1 GIT binary patch literal 1252 zcmb7E-EPw`6mHsWY-U2J5^Rhc0~PC}kx;nH7|>AG?qak;(=Mh+m7AQVmQp*iogzTJ z=P7sq#53>!JO$6e6^@hsXj?Cc zB11!85!P3d4q_T$sff~#8kK#@sG=mMUvyW;ct~Oi8sz%fVaftUIm1~(mjzHiz&U1i zww7=`g=0M9)yoE>hvJ_y1%i>-Z-ER1O%xYBebjX$Q1fwSk@`VVHiM%>T+cbW?lqFf zScw#tt79xcrGgz9-WkAj{^s8_wS@X+G#-q|gmU4!i>?+Rt5QEg@ilMEGNX9*nih>W z!*Jf`iPlDa&Mf1(kAAJ8=l?5;>Q0_vYZ>WPe13b<*n2R8N~j|Wnz@i3e=noES5;B< z(Dt(Ob}ekxx4gqY&GO&oQ&d}E=eQ)H($*q(mVl}qv~C2uTh__9UpV#(a`sY^(WGte zUPV{yl)hQko@y$-jyH$|(Hql1D<^8nKL*3gd`rf^({Ef(a*5%ux;fTkCMK%|a69F^! zbry5G=J})fbbpk0+Q!ee_Oo7R`G3K_X#Ae-_{Qq`R_yuO?1K$c94e ze~sW*|A3$URo=WTY_|Ji;WjVloacFR&wb9j5AjJ1Ptk~mlo3v6Xu3rFgrb;5JaVG| zP1E_DGUP^!*bgX^5gO`9(=CLDs`W&aCQ-^<+C^Rzc>!&cSt8bggv6t)ecEZeX~Lt0 z!wK^!_e0P5LYEE=(?ufZBmf~<&?F`rkug)ly0Z9@x z$Z@R;*aN!687O=MBz|!^4SW|RoN#g3_7leseeRRM|0+ImAI(XSP=U3YJ5NKG`%#Fp z0zGtTYZn!mS?+cmiA~u@7xIj3pTr*7YRD-INnj6Y;xa$x5i>+;w=2H7+TH9;YqzA$ z;QTpi6&kzU6_NXhvy@(DM~G3LvT!fgodKLxce%2c@BLCoZ#JuF716m?m6(<7!0(&z z_J3O@Z55TWXtr2obL7)b^Lq^*uQp~Px{xMWdzu6uTo;#~gS|62oLKtUv3lkRTdFp4 z4)C!vv3l0w#5vR^1|F!2iieFG62N9}V5vvAQIqb#ZB;9u>dkX_xXNKIV_GV>zdkDM z!n3vX*0F*AA-@Y?n0Sa4RTE-z0g8#SqMPGJz4@aC+p8QVjU&d%G@zB1b69hXujWZ_ z;MH1HCN^}_>h(WiXN|yHu%Ro8P__wmU2D{(d(bFhhUyq=6IHz3=>Mw0BVld%ntt}z zG&6Tue(a6f=Z|Hf7X>8rnCEVWBfP1NaNMTAr-{ literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/CustomTargetingKeyMessages.php b/AdsAdManager/metadata/V1/CustomTargetingKeyMessages.php new file mode 100644 index 000000000000..d8f35616f16f --- /dev/null +++ b/AdsAdManager/metadata/V1/CustomTargetingKeyMessages.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile( + ' +» +;google/ads/admanager/v1/custom_targeting_key_messages.protogoogle.ads.admanager.v1google/api/field_behavior.protogoogle/api/resource.proto"å +CustomTargetingKey +name ( BàA$ +custom_targeting_key_id (BàA + ad_tag_name ( BàA + display_name ( BàA] +type (2J.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyTypeBàAc +status (2N.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatusBàA| +reportable_type (2^.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableTypeBàA:žêAš ++admanager.googleapis.com/CustomTargetingKeyBnetworks/{network_code}/customTargetingKeys/{custom_targeting_key}*customTargetingKeys2customTargetingKeyB¶ +com.google.ads.admanager.v1BCustomTargetingKeyMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CustomTargetingKeyService.php b/AdsAdManager/metadata/V1/CustomTargetingKeyService.php new file mode 100644 index 000000000000..c8b81f388c75 --- /dev/null +++ b/AdsAdManager/metadata/V1/CustomTargetingKeyService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' +— + +:google/ads/admanager/v1/custom_targeting_key_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"a +GetCustomTargetingKeyRequestA +name ( B3àAúA- ++admanager.googleapis.com/CustomTargetingKey"Ê +ListCustomTargetingKeysRequest8 +parent ( B(àAúA" + admanager.googleapis.com/Network + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA +skip (BàA"š +ListCustomTargetingKeysResponseJ +custom_targeting_keys ( 2+.google.ads.admanager.v1.CustomTargetingKey +next_page_token (  + +total_size (2¿ +CustomTargetingKeyService· +GetCustomTargetingKey5.google.ads.admanager.v1.GetCustomTargetingKeyRequest+.google.ads.admanager.v1.CustomTargetingKey":ÚAname‚Óä“-+/v1/{name=networks/*/customTargetingKeys/*}Ê +ListCustomTargetingKeys7.google.ads.admanager.v1.ListCustomTargetingKeysRequest8.google.ads.admanager.v1.ListCustomTargetingKeysResponse"<ÚAparent‚Óä“-+/v1/{parent=networks/*}/customTargetingKeysÊAadmanager.googleapis.comBµ +com.google.ads.admanager.v1BCustomTargetingKeyServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CustomTargetingValueEnums.php b/AdsAdManager/metadata/V1/CustomTargetingValueEnums.php new file mode 100644 index 0000000000000000000000000000000000000000..5eabde725644136cca0119b8d889cfdf1ed613d0 GIT binary patch literal 1200 zcmbVLL2uJA6sBXFz}lheWfBPFl}YO)ma5vVV?f%bB@%6;#jOU46uGIJSxW85aV8D4 zGk=3Kcm4tgehEJV+sUfIRt`jR;`qJyz0dEx@70_1A_XttfG{GkBy%{sg7SjERB*{7 zp1@hYSP%gtzD#LCgau)53`b)Got}&KRA|O?5s@~GIgb<4#Pdw8C1yA#qIubBMtLUr zGL%@vL{b)qmpI8uNLaqiERzNRhLkNs+b1ZQ%Fo=OY&(targK6sofGELP z2D=6s-2hKDuA^bWX8_fc=Cg!GFq2rS&pypU%BZ9`p`X-6PvHV58Bu6=eHS^4B;^e1 zfH8|m;}8~@+IK(YsxYVUhM=cwrRo&8OcKFx67)zG37SeSJmuPMtDCPXtWO$;Wm*kK z7qC%qY`5=_JcUx^haG@lo1p#w zZL94Tv6gDNT4jT*%U1nM1w6m6Ilk&dp6M3V33#&Jqjm%iyAvOchas}h1`cvZgK%oU zpE#k9Y&7x1$;kJduG@E=UiCo@fNi^r+^JKo)ONrlcU1mu)PGdK-hFw7SVkA5fOpc1M17yYsyQo+=GmYf9d^x86n!W;(sf$G2r@%oEIFi;K7! z6J`Y1EKE41TDyPh_hi-CZyUPinternalAddGeneratedFile( + ' +í +=google/ads/admanager/v1/custom_targeting_value_messages.protogoogle.ads.admanager.v1google/api/field_behavior.protogoogle/api/resource.proto"“ +CustomTargetingValue +name ( BàA + ad_tag_name ( BàA + display_name ( BàAt + +match_type (2X.google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchTypeBàAàAg +status (2R.google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatusBàA:ÓêAÏ +-admanager.googleapis.com/CustomTargetingValueqnetworks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value}*customTargetingValues2customTargetingValueB¸ +com.google.ads.admanager.v1B!CustomTargetingValueMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CustomTargetingValueService.php b/AdsAdManager/metadata/V1/CustomTargetingValueService.php new file mode 100644 index 000000000000..8de715a70ffa --- /dev/null +++ b/AdsAdManager/metadata/V1/CustomTargetingValueService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' +ð + +dSu2BTyElho|(_=@~sbJUQDyS1l9egF{0p!w75^Xk2|JSP04<)NBxj zo1v$9C|IPuK8s^6Laz^6BSc%-NrVW7J2CTtwmQu=7#1+Y+*U^FHUf>SAa&1c2ZZ<$ z)0!S-TC6WdFKZ@3gR zbvPA1RCj64nPRtNiRG!&s~9_J#jslLi7=orSN9OKuXt>v>LAo{LNMbxr#sc%;@Fgq z_h>bb(Q$4BS*J!NaQ$>j6_`YcgDmcpU^ISnr&TcK?lFfbXu<^>aH$+;lGTLdHrLls zT=P_~tQ7mtc#(J`2*!CHW7AZ}k)?6&kneM({$JfvS;^fkY&Kj)Us!|M{k1FJnA@s| zIq$H|Pi3++tz9Y)$UT+>9PolY4PhS}*5koynU<>Mmv<`bWYL$H8SZuy5k!z0XA9#N zS@RQZWZyGP;r*taJz!Cif#wR(BAHFQd$ok$cbny(jfKiXvWA4ybb;hEsb7jKS2oGA zVIQQB{h{ZhK0~R7c)nhpr{x?o<9sRoYJ4t{{YfG6BCwci3w3Kx&H7k?c`wyFZC@5| zo-YF!6?*+sQV5zJ?SZukrTcxl>pbAim~`^|49vW~G?w_Id%`4u7jHH8crM}Lrw6Y0f;e^4}&c~K@Ui)!nakJrre}&D(@zb5p a&UmsjZtT5Wpx5+#tCllluDB5y5%L?b9@+x{ literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/EntitySignalsMappingService.php b/AdsAdManager/metadata/V1/EntitySignalsMappingService.php new file mode 100644 index 000000000000..6bfe888da928 --- /dev/null +++ b/AdsAdManager/metadata/V1/EntitySignalsMappingService.php @@ -0,0 +1,73 @@ +internalAddGeneratedFile( + ' +ã +ÚAparent‚Óä“/-/v1/{parent=networks/*}/entitySignalsMappingsö +CreateEntitySignalsMapping:.google.ads.admanager.v1.CreateEntitySignalsMappingRequest-.google.ads.admanager.v1.EntitySignalsMapping"mÚAparent,entity_signals_mapping‚Óä“G"-/v1/{parent=networks/*}/entitySignalsMappings:entity_signals_mapping“ +UpdateEntitySignalsMapping:.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest-.google.ads.admanager.v1.EntitySignalsMapping"‰ÚA"entity_signals_mapping,update_mask‚Óä“^2D/v1/{entity_signals_mapping.name=networks/*/entitySignalsMappings/*}:entity_signals_mappingÿ + BatchCreateEntitySignalsMappings@.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequestA.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse"VÚAparent,requests‚Óä“>"9/v1/{parent=networks/*}/entitySignalsMappings:batchCreate:*ÿ + BatchUpdateEntitySignalsMappings@.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequestA.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse"VÚAparent,requests‚Óä“>"9/v1/{parent=networks/*}/entitySignalsMappings:batchUpdate:*ÊAadmanager.googleapis.comB· +com.google.ads.admanager.v1B EntitySignalsMappingServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/EnvironmentTypeEnum.php b/AdsAdManager/metadata/V1/EnvironmentTypeEnum.php new file mode 100644 index 0000000000000000000000000000000000000000..629c52c2bd780fefe81a5114bbe24805aaf1923a GIT binary patch literal 942 zcmbVKO>fgc5G6T)v>*|MLy_PxluAt{a1`~H5ZZ*ektGsaX$UH^WNqxRyOOhOt=EwX z${*sw|KRWN2Uvg9l$KtwG`2N6^XBcm_wFRQOvr1PB1cIT2C%*Yb%~Hjp@c7DSZ85~ z5`3{qSd7vDnAkA4mtan;J13-W16O5{()R-L{kHjZv^y{ zWb2sukSeP5=YXXi<4iFcv#BOmN5>Z0=*{2ujSn_8<{@7elzF z=H%bcf=5Q>8PRX&~ze92eN@jR-I)Fr# zNj@le=K#C2PD!`+0rh7LL`g>de)iT|X>l93R#?yeZ|q;f8yiP*j$p I@5qjj-+22pLjV8( literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/FrequencyCap.php b/AdsAdManager/metadata/V1/FrequencyCap.php new file mode 100644 index 0000000000000000000000000000000000000000..2d8f433f4630e14159d1944222723a5cb8318e43 GIT binary patch literal 1071 zcmb7D!EVz)5XFgv#1a+ArIFw;K&7Sv90hI;0cz5uJ(T1SdO((}jlFhPvUknyx}u=m z`4q%AaNx{Wv0gi_p^5~S)`>mi_vX#ad-*y$&(LF-5k>@7B!tx^sB;3D;ED%4fmI$w zL_omPj3z|b0Fybqn=j#La@Xm%Kgn|T13DXVKTb!XU2=tZZtAqw1 z6;}FZk4m31swhtAXDwz75l$r00M~P)oCS(<2E_++7Lfh{l$b^CUdFZfF>GpD6#dY> z@J^T_g5kuQ5E%%XDJ~W|)p25?>Mj;<`Ue$l0Y@X~mo+-hwIau$L{6IQ0D`Dou#u^| z09e=mynpDJx1=d~uXP=l5-e_b@fv{=zh&tu?nCfwaE zlWn~Y`c$*DFNTkPTBy^UWA_2Nlj2W4O*28H)B}+{3#@+o_{LYu>h{oWrM37t*!k*^R#(ZHx0*&{d%BJ%XMpP=hn?MndQ!`(Hf!O2Tohi literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/LabelMessages.php b/AdsAdManager/metadata/V1/LabelMessages.php new file mode 100644 index 000000000000..cff18e627525 --- /dev/null +++ b/AdsAdManager/metadata/V1/LabelMessages.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' +Ž +,google/ads/admanager/v1/label_messages.protogoogle.ads.admanager.v1google/api/resource.proto"v +Label +name ( BàA:ZêAW +admanager.googleapis.com/Label&networks/{network_code}/labels/{label}*labels2labelB© +com.google.ads.admanager.v1BLabelMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/NetworkMessages.php b/AdsAdManager/metadata/V1/NetworkMessages.php new file mode 100644 index 000000000000..a56a18beed04 --- /dev/null +++ b/AdsAdManager/metadata/V1/NetworkMessages.php @@ -0,0 +1,44 @@ +internalAddGeneratedFile( + ' +¶ +.google/ads/admanager/v1/network_messages.protogoogle.ads.admanager.v1google/api/resource.proto"™ +Network +name ( BàA + display_name ( BàA + network_code ( BàA + property_code ( BàA + time_zone ( BàA + currency_code ( BàA% +secondary_currency_codes ( BàAG +effective_root_ad_unit ( B\'àAúA! +admanager.googleapis.com/AdUnit + test_network + (BàA + +network_id (BàA:QêAN + admanager.googleapis.com/Networknetworks/{network_code}*networks2networkB« +com.google.ads.admanager.v1BNetworkMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/NetworkService.php b/AdsAdManager/metadata/V1/NetworkService.php new file mode 100644 index 000000000000..a78ae63f7332 --- /dev/null +++ b/AdsAdManager/metadata/V1/NetworkService.php @@ -0,0 +1,42 @@ +internalAddGeneratedFile( + ' +× +-google/ads/admanager/v1/network_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"K +GetNetworkRequest6 +name ( B(àAúA" + admanager.googleapis.com/Network" +ListNetworksRequest"J +ListNetworksResponse2 +networks ( 2 .google.ads.admanager.v1.Network2´ +NetworkService€ + +GetNetwork*.google.ads.admanager.v1.GetNetworkRequest .google.ads.admanager.v1.Network"$ÚAname‚Óä“/v1/{name=networks/*} + ListNetworks,.google.ads.admanager.v1.ListNetworksRequest-.google.ads.admanager.v1.ListNetworksResponse"‚Óä“ /v1/networksÊAadmanager.googleapis.comBª +com.google.ads.admanager.v1BNetworkServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/OrderEnums.php b/AdsAdManager/metadata/V1/OrderEnums.php new file mode 100644 index 0000000000000000000000000000000000000000..50e78befe4b07a118820051a08f1a50b66146ea9 GIT binary patch literal 966 zcma)4%WB&|6s?oSNymj4QAnX(Ow&MYXk|=xcHLICWMfDyVaZ+;ff-9Zd9>BW1!so6h&ePq!1ond*(_iV z?vzO?7>Qh+CY}gm$%O^bUN4}snqYR*YL{sFA3f9l- z&IoqZUtZb!k6~Gd=KEFJF>I$*0kg16^z#t4|9dUUSpijHgJ9(X)VuEauNpedhi}8A z(&(M)R*TzosKzV_hmNC<( zv&l-cthu?=uA7I-b97Ri0RB`tMGbvwR~JVLLUl`9*x;;Z(2+J98P{++RvPG7hhGN{ zCqpRo6$n**q>*9KMJ}Oyr&jID=Mo$6h_FEABIpE^p@G5;SsCr$`b6j0kD|=TcVNW=ZiY7-E`q-fzLVp3-BP`$m literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/OrderMessages.php b/AdsAdManager/metadata/V1/OrderMessages.php new file mode 100644 index 000000000000..fd26aa927f01 --- /dev/null +++ b/AdsAdManager/metadata/V1/OrderMessages.php @@ -0,0 +1,79 @@ +internalAddGeneratedFile( + ' +Ç +,google/ads/admanager/v1/order_messages.protogoogle.ads.admanager.v10google/ads/admanager/v1/custom_field_value.proto)google/ads/admanager/v1/order_enums.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/timestamp.proto" +Order +name ( BàA +order_id (BàA + display_name ( BàA + programmatic (BàA9 + +trafficker ( B%àAúA +admanager.googleapis.com/UserE +advertiser_contacts ( B(àAúA" + admanager.googleapis.com/Contact< + +advertiser ( B(àAúA" + admanager.googleapis.com/CompanyA +agency_contacts ( B(àAúA" + admanager.googleapis.com/Contact8 +agency ( B(àAúA" + admanager.googleapis.com/Company< + applied_teams ( B%àAúA +admanager.googleapis.com/Team> +effective_teams ( B%àAúA +admanager.googleapis.com/Team6 +creator + ( B%àAúA +admanager.googleapis.com/User + currency_code ( BàA3 + +start_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +unlimited_end_time- (BàA +external_order_id (BàA +archived (BàA! +last_modified_by_app ( BàA4 + update_time ( 2.google.protobuf.TimestampBàA +notes ( BàA + po_number ( BàAI +status (24.google.ads.admanager.v1.OrderStatusEnum.OrderStatusBàA: + salesperson ( B%àAúA +admanager.googleapis.com/UserG +secondary_salespeople ( B(àAàAúA +admanager.googleapis.com/UserG +secondary_traffickers ( B(àAàAúA +admanager.googleapis.com/UserB +applied_labels ( 2%.google.ads.admanager.v1.AppliedLabelBàAL +effective_applied_labels ( 2%.google.ads.admanager.v1.AppliedLabelBàAK +custom_field_values& ( 2).google.ads.admanager.v1.CustomFieldValueBàA:ZêAW +admanager.googleapis.com/Order&networks/{network_code}/orders/{order}*orders2orderB© +com.google.ads.admanager.v1BOrderMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/OrderService.php b/AdsAdManager/metadata/V1/OrderService.php new file mode 100644 index 000000000000..71b9f7757efc --- /dev/null +++ b/AdsAdManager/metadata/V1/OrderService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' +µ ++google/ads/admanager/v1/order_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"G +GetOrderRequest4 +name ( B&àAúA +admanager.googleapis.com/Order"½ +ListOrdersRequest8 +parent ( B(àAúA" + admanager.googleapis.com/Network + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA +skip (BàA"q +ListOrdersResponse. +orders ( 2.google.ads.admanager.v1.Order +next_page_token (  + +total_size (2Ê + OrderServiceƒ +GetOrder(.google.ads.admanager.v1.GetOrderRequest.google.ads.admanager.v1.Order"-ÚAname‚Óä“ /v1/{name=networks/*/orders/*}– + +ListOrders*.google.ads.admanager.v1.ListOrdersRequest+.google.ads.admanager.v1.ListOrdersResponse"/ÚAparent‚Óä“ /v1/{parent=networks/*}/ordersÊAadmanager.googleapis.comB¨ +com.google.ads.admanager.v1BOrderServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/PlacementEnums.php b/AdsAdManager/metadata/V1/PlacementEnums.php new file mode 100644 index 0000000000000000000000000000000000000000..8eccdd7c4121bbd8c6e6e7a286ec98e2a528961e GIT binary patch literal 929 zcmb7C(QeZ)6s1L)kcC859`*namoaIb#8Oqfbt{mzS&2m3h-Q6&NR^wonWfZ@Y-bXn z{?I;!zu^zCoiq%lJrL<8vG4V{$M>9z_xW{>Uc-biBCsL}tiOS}CXfrRc+4|c7n=FJ5WKM;zS2h}FGNiGkaC`8q>B@&V~ZJ1iRj++x_O3UvL#Hd2rIVI zvB(H9yd^T%DVPMqDN#7V3P%$Q61j=gQGrCu-Z?^XhNXmH59S#x^aFu@@?xFQ7^K2V ze~zhKQAQQT8U3y=G=L4xB+(G}Yc~ap73B=ffjNsw=M+jzQ+u3qJ%9o1Sp{Y$dLEI_ z6cG$((U{0s&|Gm5=+b^aC90mJ+3B2CZ4DgVK&Rx`@82Ui03`}?w>y9!su1kl@-_gw z`p+^udq*oCZj#h(FSSaYy3iauLBE>l?7!q`AC~2gR#QhMgmcq766krY!9owbkVc84 zujtu7+igHEgHP_rn|iZwwFuqtYO%VSEdp=kU;5s-^{9=|fjbKQrPpe-pQ0!JtXehA z%Kbe0s8i$CinternalAddGeneratedFile( + ' +« +0google/ads/admanager/v1/placement_messages.protogoogle.ads.admanager.v1google/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/timestamp.proto"È + Placement +name ( BàA + placement_id (BàA + display_name ( BàA + description ( BàA +placement_code ( BàAQ +status (2<.google.ads.admanager.v1.PlacementStatusEnum.PlacementStatusBàAB +targeted_ad_units ( B\'àAúA! +admanager.googleapis.com/AdUnit4 + update_time ( 2.google.protobuf.TimestampBàA:nêAk +"admanager.googleapis.com/Placement.networks/{network_code}/placements/{placement}* +placements2 placementB­ +com.google.ads.admanager.v1BPlacementMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/PlacementService.php b/AdsAdManager/metadata/V1/PlacementService.php new file mode 100644 index 000000000000..2512b3925512 --- /dev/null +++ b/AdsAdManager/metadata/V1/PlacementService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' +ù +/google/ads/admanager/v1/placement_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"O +GetPlacementRequest8 +name ( B*àAúA$ +"admanager.googleapis.com/Placement"Á +ListPlacementsRequest8 +parent ( B(àAúA" + admanager.googleapis.com/Network + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA +skip (BàA"} +ListPlacementsResponse6 + +placements ( 2".google.ads.admanager.v1.Placement +next_page_token (  + +total_size (2î +PlacementService“ + GetPlacement,.google.ads.admanager.v1.GetPlacementRequest".google.ads.admanager.v1.Placement"1ÚAname‚Óä“$"/v1/{name=networks/*/placements/*}¦ +ListPlacements..google.ads.admanager.v1.ListPlacementsRequest/.google.ads.admanager.v1.ListPlacementsResponse"3ÚAparent‚Óä“$"/v1/{parent=networks/*}/placementsÊAadmanager.googleapis.comB¬ +com.google.ads.admanager.v1BPlacementServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ReportService.php b/AdsAdManager/metadata/V1/ReportService.php new file mode 100644 index 0000000000000000000000000000000000000000..128aacca11e6462f885a65908f34f2bc0d33cb3f GIT binary patch literal 35098 zcmc(I33OaXm3F#i$yUir`FV*f$FVFsiS0O&CGQF$w7Q?9#=WJxB}X|5Z`xAJ=|6I} zrn_Y@jAyd%2_zv90)*_4u){DwfUwT|L)ZyxW@A`pfUs}F&fHted-b|sy?%!OoImFn z)Ky>Ix^?T;ty}e~>OSw{g)0`w*50vVxmYdKi?h8)PxjWYDE2N?EA`4uWxn_5;@n)Z z+B;J@zEGMkR{MK4xk5wwi=8FS`*&6&iUMLri6{`a$ z1_!Feg-W$<)r!>()3Yz_Vi8q<@5 z7ZNfvU#Qi3vy4`blOiu8z3|_{;?eoiOmD4TsKftlE7h!0xl}I|=1VVy=3LY}SD3FA zfkHEOZm~R5FICFDSRh@VDQ@4<%V{EZ+d>7Je^IYwDuWUMX-vn<^L$&g1ZK6O$M9)~ky}wf5fLYO%gpEnmp^Mgpho zzoxxJwosaml*<*ALZw_A9(LN~kkA#3&X^o((`%&NcZ};~p>}0(j_tDf5~yswaC{+n+5E|c;&cqg)oB+w zS($rrv3MG6vZ|29%G_+>q<4Kxr7w7XNhok+cGlL{Q5f9YZ4EXvH zlcW2=2*5uvfcsAj_K1vu!a`|ahG`o&1U;K2eaM(Ym9mZsof3cz3ZNJ4r09BKPTWSOy^bPB6kn(c0b^fpXyGopl?DAh_wOY^1r z$?h;@tQ^|e&$(!lc|WJ$KWUdhA|WGARtw^@#W`jwE9LGbK&xwLM+;gpy8x038ym>- z*-~v`zHriFO=y=*2pM}x*Wv=o%EGpHcQE=rlD-smKPoI6Q@nvtYNlGWODzpnY7Oa_ zugnzYi`~m418v3_p|zPSinELJMXR#F>_vAcqqkjh(Ws^UIZ+_Z@l0Ml&xA?)WMO`> zXsjWfFm$XF_=9y<+xQvKSIcKBFa;GwI`&G4r`PILFjyiTyRj3}*Aj9R<_3|9a$g3i zV`L?go-frTeJ-&Jw7kmRMP~Y8N=iUcAe1DlMYReoF2~)$Xyq8!g4{aNb@XJtSQG4` ze3y@((X)Xp6;&E5Ne2^14J6XGy{+dgLL3SWxt$|RNjpRLd@4+qek#-IWAt+B)A1{KeX1HuDv<}@k0#*(Uv}y!6JW!Bn720i1H4Ico zmXQvN@jkMa7;NmgxL~PG)%M)nPC8+lDdY>Fh&^uzk+y8*#m2>i&O$TFHJB_plf07x zNQALw93g95bsei#78hzD={7JH!>t-=Gt{p%cMM7Ne7%j(#zf;HvT~tXI$o%r{Ii%% zkeF)m6C$=37`)eq?FsI520t%rPefcOEk|ddi3sPImJ<=W5C0z~q8Adv zrHGmV>bZ1|DY=|?0_r9cUf+`;(rNdF(LuuT6g|Trqyu&zEciQQEGNsN=~O-vPvvOX zpkz7b*ePws3euS{b2%$N9!b$9;CfN}r)6F;5lQ4|I~E(unvuMj<+u*xOtMBzkcsXU#+; zAD=X>81%B0jikm*Ya*4)n9=xX+>C)zb&~dcIu@A%odTViGIO8}_%n<@^W*WH1)YAF zwi)ZlYWt^^Pcw>i6S%pAB_}}}$3fH96T|s!<9blnSUTul7ODX4>n3Z}6dSwIu6fFg zWNC+8Gyb$uXE7CzxRivg>tTs+;(;rd8y(#+=LIk0!JbP{Z* zl>+h5pCN~8rgMOaZ4V}({F`98r9_Nr7=y;K5A-m_R~>K&H*~6$vH^JH93c9oDFBuaWOLkRrthcQJ<|`+ou26j=`PRoL$n{%)gEfl zLHTq>bkH3*fbDU~27QmwgVu(RR7_F&bCcTBEKiQv&FY9yb9U1~UDhDoqstni`*c}* z=mA~UUV2EEwU1t?%i2#b(ll#`ZqelIp<6XMd+9lvoPBiqJWbYqx{e8y1v(CPA*<1ApC*Q|LYl7%6gOi!fp^kQ`ch^+in#-z`O8GNNwid;UDpUBbA zhM<0X6!S!G?LWt-g-phR2@U5udQ+RRjcgu?L=TU~(KT>pI(0Jpw=nYUg#s({Y#1ja zuS_w${YMyFflXQfo9F&L3|>dK7l!Hnzl4qLWUE(pr=TM{0?mu3 z#w;ea-@3_pg1E$fr$I&&@#tY#{bbVCDHbH-loBL~23`CEd7m!4r|k|!bUII=s^e6gtz5?+z1edX~pwq(u!oG;~=9L zeO1^PB)e=H4kDUPW+Ewcj$&p4px|nxGt95JCT#2{gQru3Gjna&m_Cp6X$nr{&6p+B z`AuPC7nwe4(as-!;%0TVm4CgE5gPW za+VIp#D7!RIG1ekgK+k4c6YZTVyUUn*L;!mhp^F4c6gDL&};i0gxhx7-= zbABGyic3}k-H^?5j()Ed*F-jJrlRP8f(Q9P7}l%jcraosPdpWigJTLheOF6t7MGx` zfscfZ0kYGNu8rl5dsHXvSUeX+!)irFa*HZP7gn5oHlHl2bcNuIa;ZDHdAvfZQYjY!_|tF?sX8YO1(h05#Q22)`{ zBEf>)scX(?7IuYr&qp%!?P2gy)_E`qB%aU?W42CBrekbt!5W#eBAE<*P-`C&@llhl z?U)VD(bwt;OJqC=YuFr4csY7s*w{yQd+=z}os7fW3(I3mE%rKHmnS2K&9OABn_r1* z(lb2>Gc*5Y-C$0^@Qr3-)<`;i7)%o^#?91(N$=Nn3)jvyKub8~sw0h`(_*lL}*Z)jDZ_!O5n9JFDt8S1@q!Q5OIB|jXpfA^1s>w)V z!UPMf&RlovG~|dm0vkJNFlyjmFsuCrx2Th_DF*YOGxOVS3k>F8G>kbtm?{4+-F6|J zjR9paq%dR9_q#nmH4pbuo(#iY&IWr_@oX_xqM0cDfNy@1e$YLRczJss5}NZRx3%;H z@jm*pyOTLm+I0FMcPG1Zxt4s`?JWz4VroAUhQ;FQh6aNmzUU=G;bDK)ONK0uIoF@_ zl7VgRgc<#qmkex>Y6?Fd#`Q%5hpeBU@!}(swo((x5!k!^gnPL2wu2ImWg|)W4iJyh zk9tWb7lCgOpr|=mul%E1pE-$~312W`xc?=f=?rXcezHMFeXyu#|Ljj0T*uK-@cDra z`l%L_6)aMI+Dk

p?&5)jdu=*PG9H5pgP_|Kz25PCoMSf4v}X+wzo~6}4}yk%=i7 zwLs_dZad`xV#@G^Fz$ekz{i7_z3}=|7#6aID~*q_maP?dWHpG_81jfM+LWqe*ve`K2{HI~W$OMM@2~*i9_#ip%e<({} zpn5&qY4y%#Ba zaL|UIXyDt7l^*3Ed6wYUkeHbSO|+u$VKZeW-~%M=bh^_xA%fqHL`H66MB>-u?psqb zFLEY)+3bkHSCptpzZt@BD*T6|$E$Ehs3DP;rMOWqa+pB>GlV-b=A~FMe05W|0r*_Z zbm9FWTyFZJ7_}#v{*K18;1ndl!-P3M9>w99oj?aSMt>c`rL7LYX#6IGq8(39Wa%t^ zM2Lfu;zHV9c>V{|^u}b~zHi_M3@8F#EiCt@tkHB9Og&wV1G_PmmoTumoGj)&t-;=M zr*ZIFv@!6pF%rAfip8@geEaw#QxQm08ik7;dS@Gg51X)`f}TL$o<@rd2o+I&vrci5Mk zR8aGd$MiIQR#P#myEuU}dqXDcfG@GZ?2*H3{xTcPO188Iwrli`5bm^iAl!Qx9}3~t zK`R)q^r;Z;D|%p^xs$#^L&`&a>qX+O7JdH}K zl96t!+)F6ns8*=Rd>Ckx?tXCZ8(hVXqBsQs-=OcFdj#)6rBnuu?X3!z*1}KF4plo_ zb!J}#yM@!|d4N230shJ@e0%Lbg*M9}!i-25?6{)vnsxqBx5(7h{be{oIz(LyX*MXo z*f6G=5WL%-3BeAtGNxQGT#&6JVNiR+II~}9 z&~L!(U3{y>AV_FBDP>ehhfHT%2S?5$sY!$7)?jU+vU>FVul8ce3aO@z;i@O=oz zr%A73O;b|i;GnXP9ap2fxb2f=0e zzA(BG3M>cSgh@}K1KgO(OZ<|3P7`@<*MZKU9rMiMW!Isx68X8`#|5fjk;3hQ>BI{UnV=@PGn$#)qZ_u;>t zeUk^6J1SDu?UL6kO;LAA9%QZtFW|j7@(8mEJ_zi?M?J|nn+iGlm?s$pfn?sO^toeE z>6;Y6Imx__9#@Ju)aXM>r#i`4$HPjF+s=N9outSlB2kllO#$#?s(?0vOnZym9BSoV}8PB z8Qmt#Pf;#wUAb~ay8`DruN*$AR^lgr_^1b4wXpGQuefvZ%S`%Jw!~tee!vdFDFygg z3+Xxf4Yt7|GWg_w7t>KSiPOJ31ZPN>CXfjXV!c;^_;nlpAt)|%_#(RNPF&tT8x9kP)5A=)I4% zRm}vc`~xGYCNk`ML+o3+9#W96Nj2;os9iLu_R)R5NVSh% z>x)$T=ykqGwU1u!i&XpQ{#3)3gxaFre2<0xdcp@ZC_umQ0}Tn#Z~Z`f1n75upuGb0 zdq2=V0s4a0(yZ*>@b* z<5aDErw>lm+jsfkRLy<24^GwHzxTnZR^vTBIMs0cgAY!%9q;wQspjK-J~-8ay#F}! z7ri^g<+VKNi&XpM1HMSLS3c;ARQu&azDTuao;r>n4ZIs94a>c_oua|W@$ecSj2sd7 z`C#Ojc&!gcj*8d$V5FUSy$?p3n)`h)(%QVi2O|y613nmOa~@p8iQHSxw%K{e4up(;5-*F1QRePVXSKBYm<9FfuVGz6=z~2jqmt*<+0r7HJKNk=$NB9o{ z;-zW*VL-ezvp))mmnQee0rArO{v;q?n&O`VzTflgxXZt?t@6(T;${E-JRn~7?=J%4 zW&i#%AYS(GuK@4TPtP?3Kc|74VxNakWUcV(IQ~KaygG=#7yz%1;AaBh)#3Z40C?4E ze>nhNwb@?@fLAT{R|DWxd;PTlc-2~e9q_6?dvveMR6iR4ulDc11i-8P`>z4;YXAOQ z0KD42{|@*a%I!Cg_Da+IJ~(vO0xC!C`&&chfPJzxRF2gTw1&!I`oY#vX@Nh~8Y+$N zQ>~%W?tZv6RGQq6w1!G+`%!@IR4(*+^p>mSQWtaUE zV0SAwu)N)S)i-_szN)q^p^m->1C>z6-$Q{)s3Y*RSS#<*>dr5LyoG+XA7bIles*T3X~g0->c*et96Y zw9BsugqEiHPC&aHJ@3x6>IW@v=Yf4v3dM`pSTK*{Ame#LHfN72vnP8GF8na~`-6 z+KRsK1Gjg0LPV1g@}LGHT7i&W?YKpgFSX%TO}^~?+cf$1DAwfL z<5rVzk5o;*JvKG@_GrAPqwl#3NC$s{5)alU%{<&rfGhXvLu2QVEqK=eo^Zeux$t-u zoPmRT5%%$1c8~fZJZr1M;FW^0c;g-3Vfbj!r=pT(BsY<5y6bz0oe6FYgon}K^vd%Z z>$X`_PkJ51Gq@^AFBB(uAsDG0kys9%qk_YjE!!T4`Dwcs+*1aluyoq#h1STzgf|5S zg5!A$#&s-tH5%Sh8YCBZRpEu^6^I9ugouPnn9)p<_TV8dNlYBWI}(_{E)I$lWQG`=iz=0JiwKS(X-(g zQnv)c8RiV!T8GOjc-Bko|=;|hDg7z zghqP~8wbdq(<{R}IOWHlmtMdNWc$dVt}3q*yrLwRwju{rn+!BdDp8>et9UOsrJ|r! zl=r`rs4B-wJaVj3YS6B=@VR8OSH4PQ4Oc;@21!I}**b2ylx}T6xHN4ud=@@St+Pqn zcJhJZR46N2&4&~`R{+mHL;V|BlUmx*{s^zeU5MCa~Le_zV_Y9O3u-;aqDXfk$-HsM^B*+{lkX zH{tkjyNR{iO-24e8-y8UmOh^U;r3{T0pj(FRq6-J9KyLUDpAy zK*KeWl2TQhb3W|9o;v}y!b$=`SS;k=CitkCJ%aCF+DW-_xQj$jqEn;8DlD0)F(8B& z2y*nLI6?4p-RhlZX(7}!wm^U@x8ON87k~$G6Ojz~cJy+zl+6J1Qh0O?3=6x**qjZb zN?1AA!+?bX{VQ}nnlVYZM4Y1q)RN}ROaxkLS|U=Bjy0?r=PlqjNZ1cmiA-hWCo_(O`RPhS~fag?9!#P-Zrp&RT=JcMIbQ zZz%ep1_cUkdibD*1PZQrXi-CUjc~oe2PJES%MLy$StIPO`=Is+zTn{mEozU=7u?G7 zK}o*gmX;4n@&%W+d{B}vxWlDI?X~%Wds#jx$rs$w@#NzVr*`GQM(KB&Dys&DZ@9kRKH z3q4v|hjvTu;WZVwe%WZ{)X5rNSMi`DCphUgz_(zS(;MmJ;UUO`#jPRN2zdAa&M&()hzx_ zjKfUTQ_{_PQbRwpi6<4ur1TL-r3TTJc8m;A?h%iK-Ez*lMr^5zZ1xwIA%Od;o8$1)HvYq){2H+1|E&V zgQ7Wl0$omTdg=o{Y=`o)zE_9fqP#nv8T!fMSp*2KfeQoiqQ6`g!&^qIQ>b_q3f|+* z#_>foe8y=bdxwVo#z$-MnNocGh!?1ndriFwI`G8Ps}wSI^JHo*BXwwH_b7gwrR)&^cC{<3B&v&B;) zNG>Gv(2S>cF6DpJhC28keQ{WkES5Q)Z1JxbA#5V-2&thXr_X~RRlkjFX~{<43|I!!P#K~Oqn6DVAv6mHTxo|`j)Dmm1Fv&rTcApIDwROQ*9C}5TZB!56}&wb z#PVF6ue0DUo!GdsV*US3h*PUcSwS$dg+djg!tp9cwliV%kzQ?|rFdV# zrfKH_1T(g35Kx#)1S8YnEq21v>y;~uWfp3Xhvorg?BHRKguEDf9a&bX&K9fI(UUAn zpuj@(&)Sux1r{Ka2X*SJ!=pti|3Y-TiPQ;b0mgdUEF(=w=K~5M_4EV}=uWP6|3@HmbhGBs@50}FmV#WH*6_NwgR0ybO>(X*{+?}?5 z^nE8xHfiXKzP^wwsX~3Cqgw_6g=k4U^kYAUecS~BoEFPG?kbmjbA#=;s}L}>%ZYze z12sm~`m^Il8JCjvO3Xu*GLLik=Tio4=1L2a0js$PBbh})^HOt+e%9Id%?_}cEMmA5 zxYihfprJCxAQ$lIL?z@}1#!)evl)+vlw8?5<{qCQ?b0$T8khEIL`B2r2Rd17(wA1s zMb*CakQFnFRWNWfC)u2$8X0V}9pgyE;%yb{mxbVB!NoY&S+dTvV?|Ki(<27~axsMJ zIi!1Lu~x4fx9l#lt}LFkO0zteBnx}Yb}D=3OXZ?fsuz!2q6Ckjh{!HbS%KV2)^j7< z1X}KZ&LtaIkYN`5l2`8#TjAhhq^rtf*JD&D7F#$#xMi+z=y7nlT|x{smh23RCe=+q zL01m7j7ZoRg$hZAATDM*hTW`nuVjODTZ?(19|O?YC2J6Lx7NKXSV@e~%Sw)Pll7oh zb~sc=o%$XMlT{6Yli?fEG8ufCO}AY`TeM8dvc@DaW{dOCD-Zy7rUF5IF=(?0L8lKk zD~pSm&HXV!A}T33;^Lz%xVZYp;qA;Oa^Ur);92u5_=4aUMiNJG$;h_9kBplsYcvrV zgB3SC6N^tu=3t99Ps4q;wv%O&Q{ymMg|Xe|Pg=H+c(iA|KFG5DM_57m6Ts%FGRj^6SKUz6-erujaWf53~h%kXT zfS9f88d@(2;Fx6L!_#xI!pR;8pzRh7ILGT6q>NDnPfDBbCIlqXb4Z|P5LPp8slY;b zeWQpKQtf^BLi9C6GH@LM54R*R&LFH<@<-BadpHO2DB_UFzM;YD(u9Xn zVb@qDv&V!-p`0sq2`)c)xpq`Ue1ipObg;OT7={pjEX8oqb{E*%HuTssvVz;GT(Nor zVqY6KLKAEc+|V0y8zbE6o>op>U;ncawn(|=nQz}6-ePPXI57x|9|(AVk-Zk$X)k|v zo-*zWK}15w{WbI&qo5==yQFqBxx_9o_pQRJ~^(231&K1`j_QF?dzG7MYW7 zpsy}PukT`;+4q3b+3QdrrL!@T%}uhK=PTu7;Omwl{(HY2Dz@)MPe;!6 zT6{JydR5)r-nX@dZVp3L!=atV(;*n*Uh4y6pJc2_|2*-sJ^N3$m{8ymmH&Ol9)JE} zl;J|AHn8*5@El_wmKZ%7pN@3vmcS#AhsZ{l^>yrx7+K~Z2`iGRR_c{Z=&~2^%?~Iw z4?#8iE7fBI$BN|z%pGv{MFv1d@b7q`42$b3uzsQa literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/RoleEnums.php b/AdsAdManager/metadata/V1/RoleEnums.php new file mode 100644 index 0000000000000000000000000000000000000000..39f8c01d5c9d7f3a48757661a7ad9475a23c7ae9 GIT binary patch literal 880 zcma)4U2EGg6kYOAh8UydB@cbM>k3U_a|nA&mTmcPgJDfV^YJhYL9uUKfg>47E^H+~ zr!V^{{Z*4>*Xt;S8LnkZ=YHs%^Z9Fblaco@L5`AYjA8o|^bJBLg%*)WVVm!EC?OL2 zjHM_&fbk5bvnBZBVEN9ZDv`?wyO0Qxq}ZmhGO?$eCMestowgJyZjk4D<+-ASaJom8 z(FkEOA6}uRG1WAjxcqPsD-&gYxbE}_iBhT*T$?(+Eko`Im?z7(DT_d9s?Bo7)P`}U z8BN(QbB#XiXsXa;KgaHJ9%&{x*n}C6uyp}NO^ZFtgt>Mf9tWCRCJYN z*R${bX0aSBSBuSRx|sW;;4<*X$FCZM91TXxVC^5*8gIz!U|RmwhxavdVm#%&(01sW zI=LPH^V*MZB{UH!<%uU`(oT>&OSOw5nlbCWfBo01Zu7g|oH&np#$zU~3Xgj0&cowL k=n+a literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/RoleMessages.php b/AdsAdManager/metadata/V1/RoleMessages.php new file mode 100644 index 000000000000..be6641a6d1b4 --- /dev/null +++ b/AdsAdManager/metadata/V1/RoleMessages.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile( + ' +Ó ++google/ads/admanager/v1/role_messages.protogoogle.ads.admanager.v1google/api/field_behavior.protogoogle/api/resource.proto"› +Role +name ( BàA +role_id (BàA + display_name ( BàA + description ( BàA +built_in (BàAG +status (22.google.ads.admanager.v1.RoleStatusEnum.RoleStatusBàA:UêAR +admanager.googleapis.com/Role$networks/{network_code}/roles/{role}*roles2roleB¨ +com.google.ads.admanager.v1BRoleMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/RoleService.php b/AdsAdManager/metadata/V1/RoleService.php new file mode 100644 index 000000000000..d3021bd5ff87 --- /dev/null +++ b/AdsAdManager/metadata/V1/RoleService.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' +£ +*google/ads/admanager/v1/role_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"E +GetRoleRequest3 +name ( B%àAúA +admanager.googleapis.com/Role"¼ +ListRolesRequest8 +parent ( B(àAúA" + admanager.googleapis.com/Network + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA +skip (BàA"n +ListRolesResponse, +roles ( 2.google.ads.admanager.v1.Role +next_page_token (  + +total_size (2À + RoleService +GetRole\'.google.ads.admanager.v1.GetRoleRequest.google.ads.admanager.v1.Role",ÚAname‚Óä“/v1/{name=networks/*/roles/*}’ + ListRoles).google.ads.admanager.v1.ListRolesRequest*.google.ads.admanager.v1.ListRolesResponse".ÚAparent‚Óä“/v1/{parent=networks/*}/rolesÊAadmanager.googleapis.comB§ +com.google.ads.admanager.v1BRoleServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/Size.php b/AdsAdManager/metadata/V1/Size.php new file mode 100644 index 000000000000..f1880c9571c6 --- /dev/null +++ b/AdsAdManager/metadata/V1/Size.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' +‚ +"google/ads/admanager/v1/size.protogoogle.ads.admanager.v1google/api/field_behavior.proto"w +Size +width (BàA +height (BàAF + size_type (2..google.ads.admanager.v1.SizeTypeEnum.SizeTypeBàAB  +com.google.ads.admanager.v1B SizeProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/SizeTypeEnum.php b/AdsAdManager/metadata/V1/SizeTypeEnum.php new file mode 100644 index 0000000000000000000000000000000000000000..3e89b84e3c031ce0a57e9d8f442a5f480c0b028f GIT binary patch literal 958 zcmb7C(Q4Z;6kXai-LyVZWmCwN-TS5;n>i+wFTpcA?-o+3gM? zCnD#xQ_QUh*4tAt+1vMVHHR67+qQivQDX~KWoO{WKDhWFZS><3ZAc|$R4N#^t&^WM zaI~wy$@dy~vboS-f)`VCZTs#Q$M$EVsbhaaePmnOBmF5jaL{LasMT~09GNQR`V-Sd zV{K2}ppk1&rY>@kIn?&`XW$SGM&pUBeXIjeA4%lg)(#X;e>g*yR#!)JW=Vp>-me;X zCGBZEFm~_xW<=$hLPn={{jowvEWtD~7>}9}p@lh{WeTUUa`L}!?razGd+&HqxYdwu um2p)%-k7)kY%*S9WcjLcp0x6!Ui7#;+p2U?iofHP2Ypf?OG~W58i2nO3@Z)* literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/TaxonomyCategoryMessages.php b/AdsAdManager/metadata/V1/TaxonomyCategoryMessages.php new file mode 100644 index 000000000000..10a791d6c682 --- /dev/null +++ b/AdsAdManager/metadata/V1/TaxonomyCategoryMessages.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + ' +° +8google/ads/admanager/v1/taxonomy_category_messages.protogoogle.ads.admanager.v1google/api/field_behavior.protogoogle/api/resource.proto"ß +TaxonomyCategory +name ( BàA! +taxonomy_category_id (BàA + display_name ( BàA + grouping_only (BàA( +parent_taxonomy_category_id (BàAR + taxonomy_type (26.google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyTypeBàA +ancestor_names ( BàA+ +ancestor_taxonomy_category_ids (BàA:•êA‘ +)admanager.googleapis.com/TaxonomyCategory>networks/{network_code}/taxonomyCategories/{taxonomy_category}*taxonomyCategories2taxonomyCategoryB´ +com.google.ads.admanager.v1BTaxonomyCategoryMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/TaxonomyCategoryService.php b/AdsAdManager/metadata/V1/TaxonomyCategoryService.php new file mode 100644 index 000000000000..e0d958fa9808 --- /dev/null +++ b/AdsAdManager/metadata/V1/TaxonomyCategoryService.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' +û +7google/ads/admanager/v1/taxonomy_category_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"] +GetTaxonomyCategoryRequest? +name ( B1àAúA+ +)admanager.googleapis.com/TaxonomyCategory"É +ListTaxonomyCategoriesRequest8 +parent ( B(àAúA" + admanager.googleapis.com/Network + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA +skip (BàA"• +ListTaxonomyCategoriesResponseF +taxonomy_categories ( 2).google.ads.admanager.v1.TaxonomyCategory +next_page_token (  + +total_size (2² +TaxonomyCategoryService° +GetTaxonomyCategory3.google.ads.admanager.v1.GetTaxonomyCategoryRequest).google.ads.admanager.v1.TaxonomyCategory"9ÚAname‚Óä“,*/v1/{name=networks/*/taxonomyCategories/*}Æ +ListTaxonomyCategories6.google.ads.admanager.v1.ListTaxonomyCategoriesRequest7.google.ads.admanager.v1.ListTaxonomyCategoriesResponse";ÚAparent‚Óä“,*/v1/{parent=networks/*}/taxonomyCategoriesÊAadmanager.googleapis.comB³ +com.google.ads.admanager.v1BTaxonomyCategoryServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/TaxonomyTypeEnum.php b/AdsAdManager/metadata/V1/TaxonomyTypeEnum.php new file mode 100644 index 0000000000000000000000000000000000000000..7e0f028bad09eb63fb5d2931fd46b7d5be41f059 GIT binary patch literal 1055 zcmb7D-HOvd6t=FeFnAFPvWg1hTG%dV+U(x7R&ASX2-u|Trp1-OFiob}Kspm9lf^21 zA@NDP@+G|SDV+Rl=(?<6;3Q$bbG~!tobSAOms}*^B{T^o919Y_#TtqW0u#;z^H~fR z*>XuZ^w}zjV!~AjbqCsx3k}_JU&zpuW!xt{7%~>dq=SQ0+6q$~65hGgIs$)Yl&#iC ztP_F=%~onb4gkd~k|x+E(43AYMBo4m?3o3RHw;o~6^}R9`T+PbPE+Vse6FN3Bpdh& zpnQ^S5l22u1s3wtic%EONJKb}zQ|h*;1b6vkt8>Lml^d%#3;-I9O{$yAuKs_-&Vq8 z7Y6XEu4&#F*%Z&Bf^dpsPbaC*qeL)1m9D*BNJQPv{G@$YrOoN0C2W^9_Ifvp96-S{ zvYj15PDI9OzoaAXZ#<-zEC13Z=5S8wUV=+X9lb2%3Jm^MDWuOdPgV;ZWAhnOA;+>^y_k>mKF9{;OSRa+vwRe*(O KskIH*0PqKVuu%p8 literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/TeamMessages.php b/AdsAdManager/metadata/V1/TeamMessages.php new file mode 100644 index 000000000000..10949b444e90 --- /dev/null +++ b/AdsAdManager/metadata/V1/TeamMessages.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' + ++google/ads/admanager/v1/team_messages.protogoogle.ads.admanager.v1google/api/resource.proto"† +Team +name ( BàA +team_id (BàA:UêAR +admanager.googleapis.com/Team$networks/{network_code}/teams/{team}*teams2teamB¨ +com.google.ads.admanager.v1BTeamMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/TimeUnitEnum.php b/AdsAdManager/metadata/V1/TimeUnitEnum.php new file mode 100644 index 0000000000000000000000000000000000000000..e19c07fce545fbe6f9f6488b0c6d800d83206875 GIT binary patch literal 950 zcmb7C-D=w~7+sqFWTF?IVU)2Ott&Kz&LQkBS+*s!lbX%3X`PM@Lr`qR6*!WS<-&gQ z0E0cq*rV*JCfSb3D7~2BlWpnfd`CLx)tmGt1<&CGQ_PXT5nOzM;s(Q%Gr>ZZz(u}X zVh%&LN=bsb0io%_sp~__wEbstYsPXO;vS3{ixb>IQ6_7JD2g%f+;%&HtnfUiM9eYG zS4Ke$07WaDr6|O3;*A_EP=o{uCIv?@j51jjM{wQk0}v)C%b+j0W|GR1OyC=U@=5bW zLPD4cB;@OaWOE_`1SRCFJk0%~~q*QjRNXH{E8N0zW%YV7syh#Ww{bG+RhLXJhw zX}{2|2-fviq3p$LQt22*QQdYdEo#?5we1xAXoBw`VE6s5MWu%2sb2a4*-zqE#q)*Ah4fTuE+#yxUJ zk2cy=S_=ET#^<*cI%Wx?vB7xUi7_og*(sM$N>qaXO>w`zh~GO$lOm;tOsOoVOuBL1 o{j*sKiU7-@S_@=^7yCtzm#4Km=cVae8M!wf1+t978ms~M3tSE+-v9sr literal 0 HcmV?d00001 diff --git a/AdsAdManager/metadata/V1/UserMessages.php b/AdsAdManager/metadata/V1/UserMessages.php new file mode 100644 index 000000000000..2e50bd46d2a4 --- /dev/null +++ b/AdsAdManager/metadata/V1/UserMessages.php @@ -0,0 +1,42 @@ +internalAddGeneratedFile( + ' +ö ++google/ads/admanager/v1/user_messages.protogoogle.ads.admanager.v1google/api/resource.proto"ß +User +name ( BàA +user_id + (BàA + display_name ( BàA +email ( BàA3 +role ( B%àAúA +admanager.googleapis.com/Role +active (BàA + external_id ( BàA +service_account (BàA& +orders_ui_local_time_zone ( BàA:UêAR +admanager.googleapis.com/User$networks/{network_code}/users/{user}*users2userB¨ +com.google.ads.admanager.v1BUserMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/UserService.php b/AdsAdManager/metadata/V1/UserService.php new file mode 100644 index 000000000000..9bd35f41953e --- /dev/null +++ b/AdsAdManager/metadata/V1/UserService.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' +ß +*google/ads/admanager/v1/user_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"E +GetUserRequest3 +name ( B%àAúA +admanager.googleapis.com/User2« + UserService +GetUser\'.google.ads.admanager.v1.GetUserRequest.google.ads.admanager.v1.User",ÚAname‚Óä“/v1/{name=networks/*/users/*}ÊAadmanager.googleapis.comB§ +com.google.ads.admanager.v1BUserServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerªGoogle.Ads.AdManager.V1ÊGoogle\\Ads\\AdManager\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/owlbot.py b/AdsAdManager/owlbot.py new file mode 100644 index 000000000000..361341924d7c --- /dev/null +++ b/AdsAdManager/owlbot.py @@ -0,0 +1,56 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated parts of this library.""" + +import logging +from pathlib import Path +import subprocess + +import synthtool as s +from synthtool.languages import php +from synthtool import _tracked_paths + +logging.basicConfig(level=logging.DEBUG) + +src = Path(f"../{php.STAGING_DIR}/AdsAdManager").resolve() +dest = Path().resolve() + +# Added so that we can pass copy_excludes in the owlbot_main() call +_tracked_paths.add(src) + +php.owlbot_main(src=src, dest=dest) + +# remove class_alias code +s.replace( + "src/V*/**/*.php", + r"^// Adding a class alias for backwards compatibility with the previous class name.$" + + "\n" + + r"^class_alias\(.*\);$" + + "\n", + '') + +# format generated clients +subprocess.run([ + 'npm', + 'exec', + '--yes', + '--package=@prettier/plugin-php@^0.16', + '--', + 'prettier', + '**/Client/*', + '--write', + '--parser=php', + '--single-quote', + '--print-width=120']) diff --git a/AdsAdManager/phpunit.xml.dist b/AdsAdManager/phpunit.xml.dist new file mode 100644 index 000000000000..97699d75cfd8 --- /dev/null +++ b/AdsAdManager/phpunit.xml.dist @@ -0,0 +1,16 @@ + + + + + src + + + src/V[!a-zA-Z]* + + + + + tests/Unit + + + diff --git a/AdsAdManager/samples/V1/AdUnitServiceClient/get_ad_unit.php b/AdsAdManager/samples/V1/AdUnitServiceClient/get_ad_unit.php new file mode 100644 index 000000000000..8846a613c9d3 --- /dev/null +++ b/AdsAdManager/samples/V1/AdUnitServiceClient/get_ad_unit.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AdUnit $response */ + $response = $adUnitServiceClient->getAdUnit($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 = AdUnitServiceClient::adUnitName('[NETWORK_CODE]', '[AD_UNIT]'); + + get_ad_unit_sample($formattedName); +} +// [END admanager_v1_generated_AdUnitService_GetAdUnit_sync] diff --git a/AdsAdManager/samples/V1/AdUnitServiceClient/list_ad_unit_sizes.php b/AdsAdManager/samples/V1/AdUnitServiceClient/list_ad_unit_sizes.php new file mode 100644 index 000000000000..ab8027b0a04f --- /dev/null +++ b/AdsAdManager/samples/V1/AdUnitServiceClient/list_ad_unit_sizes.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $adUnitServiceClient->listAdUnitSizes($request); + + 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 = AdUnitServiceClient::networkName('[NETWORK_CODE]'); + + list_ad_unit_sizes_sample($formattedParent); +} +// [END admanager_v1_generated_AdUnitService_ListAdUnitSizes_sync] diff --git a/AdsAdManager/samples/V1/AdUnitServiceClient/list_ad_units.php b/AdsAdManager/samples/V1/AdUnitServiceClient/list_ad_units.php new file mode 100644 index 000000000000..f1538e9f9629 --- /dev/null +++ b/AdsAdManager/samples/V1/AdUnitServiceClient/list_ad_units.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $adUnitServiceClient->listAdUnits($request); + + 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 = AdUnitServiceClient::networkName('[NETWORK_CODE]'); + + list_ad_units_sample($formattedParent); +} +// [END admanager_v1_generated_AdUnitService_ListAdUnits_sync] diff --git a/AdsAdManager/samples/V1/CompanyServiceClient/get_company.php b/AdsAdManager/samples/V1/CompanyServiceClient/get_company.php new file mode 100644 index 000000000000..0c1e0dc60633 --- /dev/null +++ b/AdsAdManager/samples/V1/CompanyServiceClient/get_company.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Company $response */ + $response = $companyServiceClient->getCompany($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 = CompanyServiceClient::companyName('[NETWORK_CODE]', '[COMPANY]'); + + get_company_sample($formattedName); +} +// [END admanager_v1_generated_CompanyService_GetCompany_sync] diff --git a/AdsAdManager/samples/V1/CompanyServiceClient/list_companies.php b/AdsAdManager/samples/V1/CompanyServiceClient/list_companies.php new file mode 100644 index 000000000000..ce3426dcd278 --- /dev/null +++ b/AdsAdManager/samples/V1/CompanyServiceClient/list_companies.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $companyServiceClient->listCompanies($request); + + 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 = CompanyServiceClient::networkName('[NETWORK_CODE]'); + + list_companies_sample($formattedParent); +} +// [END admanager_v1_generated_CompanyService_ListCompanies_sync] diff --git a/AdsAdManager/samples/V1/CustomFieldServiceClient/get_custom_field.php b/AdsAdManager/samples/V1/CustomFieldServiceClient/get_custom_field.php new file mode 100644 index 000000000000..1d7294b16391 --- /dev/null +++ b/AdsAdManager/samples/V1/CustomFieldServiceClient/get_custom_field.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CustomField $response */ + $response = $customFieldServiceClient->getCustomField($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 = CustomFieldServiceClient::customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]'); + + get_custom_field_sample($formattedName); +} +// [END admanager_v1_generated_CustomFieldService_GetCustomField_sync] diff --git a/AdsAdManager/samples/V1/CustomFieldServiceClient/list_custom_fields.php b/AdsAdManager/samples/V1/CustomFieldServiceClient/list_custom_fields.php new file mode 100644 index 000000000000..f473dc1ef5d3 --- /dev/null +++ b/AdsAdManager/samples/V1/CustomFieldServiceClient/list_custom_fields.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $customFieldServiceClient->listCustomFields($request); + + 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 = CustomFieldServiceClient::networkName('[NETWORK_CODE]'); + + list_custom_fields_sample($formattedParent); +} +// [END admanager_v1_generated_CustomFieldService_ListCustomFields_sync] diff --git a/AdsAdManager/samples/V1/CustomTargetingKeyServiceClient/get_custom_targeting_key.php b/AdsAdManager/samples/V1/CustomTargetingKeyServiceClient/get_custom_targeting_key.php new file mode 100644 index 000000000000..4ac51252a78c --- /dev/null +++ b/AdsAdManager/samples/V1/CustomTargetingKeyServiceClient/get_custom_targeting_key.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CustomTargetingKey $response */ + $response = $customTargetingKeyServiceClient->getCustomTargetingKey($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 = CustomTargetingKeyServiceClient::customTargetingKeyName( + '[NETWORK_CODE]', + '[CUSTOM_TARGETING_KEY]' + ); + + get_custom_targeting_key_sample($formattedName); +} +// [END admanager_v1_generated_CustomTargetingKeyService_GetCustomTargetingKey_sync] diff --git a/AdsAdManager/samples/V1/CustomTargetingKeyServiceClient/list_custom_targeting_keys.php b/AdsAdManager/samples/V1/CustomTargetingKeyServiceClient/list_custom_targeting_keys.php new file mode 100644 index 000000000000..29e88c3c2904 --- /dev/null +++ b/AdsAdManager/samples/V1/CustomTargetingKeyServiceClient/list_custom_targeting_keys.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $customTargetingKeyServiceClient->listCustomTargetingKeys($request); + + 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 = CustomTargetingKeyServiceClient::networkName('[NETWORK_CODE]'); + + list_custom_targeting_keys_sample($formattedParent); +} +// [END admanager_v1_generated_CustomTargetingKeyService_ListCustomTargetingKeys_sync] diff --git a/AdsAdManager/samples/V1/CustomTargetingValueServiceClient/get_custom_targeting_value.php b/AdsAdManager/samples/V1/CustomTargetingValueServiceClient/get_custom_targeting_value.php new file mode 100644 index 000000000000..4f15dfc8c026 --- /dev/null +++ b/AdsAdManager/samples/V1/CustomTargetingValueServiceClient/get_custom_targeting_value.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CustomTargetingValue $response */ + $response = $customTargetingValueServiceClient->getCustomTargetingValue($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 = CustomTargetingValueServiceClient::customTargetingValueName( + '[NETWORK_CODE]', + '[CUSTOM_TARGETING_KEY]', + '[CUSTOM_TARGETING_VALUE]' + ); + + get_custom_targeting_value_sample($formattedName); +} +// [END admanager_v1_generated_CustomTargetingValueService_GetCustomTargetingValue_sync] diff --git a/AdsAdManager/samples/V1/CustomTargetingValueServiceClient/list_custom_targeting_values.php b/AdsAdManager/samples/V1/CustomTargetingValueServiceClient/list_custom_targeting_values.php new file mode 100644 index 000000000000..f2e059ab37d9 --- /dev/null +++ b/AdsAdManager/samples/V1/CustomTargetingValueServiceClient/list_custom_targeting_values.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $customTargetingValueServiceClient->listCustomTargetingValues($request); + + 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 = CustomTargetingValueServiceClient::customTargetingKeyName( + '[NETWORK_CODE]', + '[CUSTOM_TARGETING_KEY]' + ); + + list_custom_targeting_values_sample($formattedParent); +} +// [END admanager_v1_generated_CustomTargetingValueService_ListCustomTargetingValues_sync] diff --git a/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/batch_create_entity_signals_mappings.php b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/batch_create_entity_signals_mappings.php new file mode 100644 index 000000000000..a7b924a0dd25 --- /dev/null +++ b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/batch_create_entity_signals_mappings.php @@ -0,0 +1,99 @@ +setTaxonomyCategoryIds($requestsEntitySignalsMappingTaxonomyCategoryIds); + $createEntitySignalsMappingRequest = (new CreateEntitySignalsMappingRequest()) + ->setParent($formattedRequestsParent) + ->setEntitySignalsMapping($requestsEntitySignalsMapping); + $requests = [$createEntitySignalsMappingRequest,]; + $request = (new BatchCreateEntitySignalsMappingsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreateEntitySignalsMappingsResponse $response */ + $response = $entitySignalsMappingServiceClient->batchCreateEntitySignalsMappings($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 = EntitySignalsMappingServiceClient::networkName('[NETWORK_CODE]'); + $formattedRequestsParent = EntitySignalsMappingServiceClient::networkName('[NETWORK_CODE]'); + $requestsEntitySignalsMappingTaxonomyCategoryIdsElement = 0; + + batch_create_entity_signals_mappings_sample( + $formattedParent, + $formattedRequestsParent, + $requestsEntitySignalsMappingTaxonomyCategoryIdsElement + ); +} +// [END admanager_v1_generated_EntitySignalsMappingService_BatchCreateEntitySignalsMappings_sync] diff --git a/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/batch_update_entity_signals_mappings.php b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/batch_update_entity_signals_mappings.php new file mode 100644 index 000000000000..3a8f3c005f14 --- /dev/null +++ b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/batch_update_entity_signals_mappings.php @@ -0,0 +1,95 @@ +setTaxonomyCategoryIds($requestsEntitySignalsMappingTaxonomyCategoryIds); + $requestsUpdateMask = new FieldMask(); + $updateEntitySignalsMappingRequest = (new UpdateEntitySignalsMappingRequest()) + ->setEntitySignalsMapping($requestsEntitySignalsMapping) + ->setUpdateMask($requestsUpdateMask); + $requests = [$updateEntitySignalsMappingRequest,]; + $request = (new BatchUpdateEntitySignalsMappingsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateEntitySignalsMappingsResponse $response */ + $response = $entitySignalsMappingServiceClient->batchUpdateEntitySignalsMappings($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 = EntitySignalsMappingServiceClient::networkName('[NETWORK_CODE]'); + $requestsEntitySignalsMappingTaxonomyCategoryIdsElement = 0; + + batch_update_entity_signals_mappings_sample( + $formattedParent, + $requestsEntitySignalsMappingTaxonomyCategoryIdsElement + ); +} +// [END admanager_v1_generated_EntitySignalsMappingService_BatchUpdateEntitySignalsMappings_sync] diff --git a/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/create_entity_signals_mapping.php b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/create_entity_signals_mapping.php new file mode 100644 index 000000000000..c1fb72f8b838 --- /dev/null +++ b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/create_entity_signals_mapping.php @@ -0,0 +1,84 @@ +setTaxonomyCategoryIds($entitySignalsMappingTaxonomyCategoryIds); + $request = (new CreateEntitySignalsMappingRequest()) + ->setParent($formattedParent) + ->setEntitySignalsMapping($entitySignalsMapping); + + // Call the API and handle any network failures. + try { + /** @var EntitySignalsMapping $response */ + $response = $entitySignalsMappingServiceClient->createEntitySignalsMapping($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 = EntitySignalsMappingServiceClient::networkName('[NETWORK_CODE]'); + $entitySignalsMappingTaxonomyCategoryIdsElement = 0; + + create_entity_signals_mapping_sample( + $formattedParent, + $entitySignalsMappingTaxonomyCategoryIdsElement + ); +} +// [END admanager_v1_generated_EntitySignalsMappingService_CreateEntitySignalsMapping_sync] diff --git a/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/get_entity_signals_mapping.php b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/get_entity_signals_mapping.php new file mode 100644 index 000000000000..7b7aaf4d0295 --- /dev/null +++ b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/get_entity_signals_mapping.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EntitySignalsMapping $response */ + $response = $entitySignalsMappingServiceClient->getEntitySignalsMapping($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 = EntitySignalsMappingServiceClient::entitySignalsMappingName( + '[NETWORK_CODE]', + '[ENTITY_SIGNALS_MAPPING]' + ); + + get_entity_signals_mapping_sample($formattedName); +} +// [END admanager_v1_generated_EntitySignalsMappingService_GetEntitySignalsMapping_sync] diff --git a/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/list_entity_signals_mappings.php b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/list_entity_signals_mappings.php new file mode 100644 index 000000000000..d52e3906c8af --- /dev/null +++ b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/list_entity_signals_mappings.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $entitySignalsMappingServiceClient->listEntitySignalsMappings($request); + + 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 = EntitySignalsMappingServiceClient::networkName('[NETWORK_CODE]'); + + list_entity_signals_mappings_sample($formattedParent); +} +// [END admanager_v1_generated_EntitySignalsMappingService_ListEntitySignalsMappings_sync] diff --git a/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/update_entity_signals_mapping.php b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/update_entity_signals_mapping.php new file mode 100644 index 000000000000..a845c4403460 --- /dev/null +++ b/AdsAdManager/samples/V1/EntitySignalsMappingServiceClient/update_entity_signals_mapping.php @@ -0,0 +1,78 @@ +setTaxonomyCategoryIds($entitySignalsMappingTaxonomyCategoryIds); + $updateMask = new FieldMask(); + $request = (new UpdateEntitySignalsMappingRequest()) + ->setEntitySignalsMapping($entitySignalsMapping) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var EntitySignalsMapping $response */ + $response = $entitySignalsMappingServiceClient->updateEntitySignalsMapping($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 +{ + $entitySignalsMappingTaxonomyCategoryIdsElement = 0; + + update_entity_signals_mapping_sample($entitySignalsMappingTaxonomyCategoryIdsElement); +} +// [END admanager_v1_generated_EntitySignalsMappingService_UpdateEntitySignalsMapping_sync] diff --git a/AdsAdManager/samples/V1/NetworkServiceClient/get_network.php b/AdsAdManager/samples/V1/NetworkServiceClient/get_network.php new file mode 100644 index 000000000000..9818680de8f5 --- /dev/null +++ b/AdsAdManager/samples/V1/NetworkServiceClient/get_network.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Network $response */ + $response = $networkServiceClient->getNetwork($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 = NetworkServiceClient::networkName('[NETWORK_CODE]'); + + get_network_sample($formattedName); +} +// [END admanager_v1_generated_NetworkService_GetNetwork_sync] diff --git a/AdsAdManager/samples/V1/NetworkServiceClient/list_networks.php b/AdsAdManager/samples/V1/NetworkServiceClient/list_networks.php new file mode 100644 index 000000000000..aa1441a7bd6c --- /dev/null +++ b/AdsAdManager/samples/V1/NetworkServiceClient/list_networks.php @@ -0,0 +1,57 @@ +listNetworks($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END admanager_v1_generated_NetworkService_ListNetworks_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/get_order.php b/AdsAdManager/samples/V1/OrderServiceClient/get_order.php new file mode 100644 index 000000000000..5fe249566baf --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/get_order.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Order $response */ + $response = $orderServiceClient->getOrder($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 = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + get_order_sample($formattedName); +} +// [END admanager_v1_generated_OrderService_GetOrder_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/list_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/list_orders.php new file mode 100644 index 000000000000..5d7c96bdc617 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/list_orders.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $orderServiceClient->listOrders($request); + + 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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + + list_orders_sample($formattedParent); +} +// [END admanager_v1_generated_OrderService_ListOrders_sync] diff --git a/AdsAdManager/samples/V1/PlacementServiceClient/get_placement.php b/AdsAdManager/samples/V1/PlacementServiceClient/get_placement.php new file mode 100644 index 000000000000..b9b03f3758f2 --- /dev/null +++ b/AdsAdManager/samples/V1/PlacementServiceClient/get_placement.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Placement $response */ + $response = $placementServiceClient->getPlacement($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 = PlacementServiceClient::placementName('[NETWORK_CODE]', '[PLACEMENT]'); + + get_placement_sample($formattedName); +} +// [END admanager_v1_generated_PlacementService_GetPlacement_sync] diff --git a/AdsAdManager/samples/V1/PlacementServiceClient/list_placements.php b/AdsAdManager/samples/V1/PlacementServiceClient/list_placements.php new file mode 100644 index 000000000000..bd1d6b8e230b --- /dev/null +++ b/AdsAdManager/samples/V1/PlacementServiceClient/list_placements.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $placementServiceClient->listPlacements($request); + + 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 = PlacementServiceClient::networkName('[NETWORK_CODE]'); + + list_placements_sample($formattedParent); +} +// [END admanager_v1_generated_PlacementService_ListPlacements_sync] diff --git a/AdsAdManager/samples/V1/ReportServiceClient/create_report.php b/AdsAdManager/samples/V1/ReportServiceClient/create_report.php new file mode 100644 index 000000000000..ca38b7b8f5fe --- /dev/null +++ b/AdsAdManager/samples/V1/ReportServiceClient/create_report.php @@ -0,0 +1,105 @@ +setDimensions($reportReportDefinitionDimensions) + ->setMetrics($reportReportDefinitionMetrics) + ->setDateRange($reportReportDefinitionDateRange) + ->setReportType($reportReportDefinitionReportType); + $report = (new Report()) + ->setReportDefinition($reportReportDefinition); + $request = (new CreateReportRequest()) + ->setParent($formattedParent) + ->setReport($report); + + // Call the API and handle any network failures. + try { + /** @var Report $response */ + $response = $reportServiceClient->createReport($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 = ReportServiceClient::networkName('[NETWORK_CODE]'); + $reportReportDefinitionDimensionsElement = Dimension::DIMENSION_UNSPECIFIED; + $reportReportDefinitionMetricsElement = Metric::METRIC_UNSPECIFIED; + $reportReportDefinitionReportType = ReportType::REPORT_TYPE_UNSPECIFIED; + + create_report_sample( + $formattedParent, + $reportReportDefinitionDimensionsElement, + $reportReportDefinitionMetricsElement, + $reportReportDefinitionReportType + ); +} +// [END admanager_v1_generated_ReportService_CreateReport_sync] diff --git a/AdsAdManager/samples/V1/ReportServiceClient/fetch_report_result_rows.php b/AdsAdManager/samples/V1/ReportServiceClient/fetch_report_result_rows.php new file mode 100644 index 000000000000..3f7124c71921 --- /dev/null +++ b/AdsAdManager/samples/V1/ReportServiceClient/fetch_report_result_rows.php @@ -0,0 +1,60 @@ +fetchReportResultRows($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END admanager_v1_generated_ReportService_FetchReportResultRows_sync] diff --git a/AdsAdManager/samples/V1/ReportServiceClient/get_report.php b/AdsAdManager/samples/V1/ReportServiceClient/get_report.php new file mode 100644 index 000000000000..0b5d5b11d47e --- /dev/null +++ b/AdsAdManager/samples/V1/ReportServiceClient/get_report.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Report $response */ + $response = $reportServiceClient->getReport($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 = ReportServiceClient::reportName('[NETWORK_CODE]', '[REPORT]'); + + get_report_sample($formattedName); +} +// [END admanager_v1_generated_ReportService_GetReport_sync] diff --git a/AdsAdManager/samples/V1/ReportServiceClient/list_reports.php b/AdsAdManager/samples/V1/ReportServiceClient/list_reports.php new file mode 100644 index 000000000000..aa12df99e9cb --- /dev/null +++ b/AdsAdManager/samples/V1/ReportServiceClient/list_reports.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $reportServiceClient->listReports($request); + + 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 = ReportServiceClient::networkName('[NETWORK_CODE]'); + + list_reports_sample($formattedParent); +} +// [END admanager_v1_generated_ReportService_ListReports_sync] diff --git a/AdsAdManager/samples/V1/ReportServiceClient/run_report.php b/AdsAdManager/samples/V1/ReportServiceClient/run_report.php new file mode 100644 index 000000000000..d3e4d98a6ef8 --- /dev/null +++ b/AdsAdManager/samples/V1/ReportServiceClient/run_report.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $reportServiceClient->runReport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RunReportResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = ReportServiceClient::reportName('[NETWORK_CODE]', '[REPORT]'); + + run_report_sample($formattedName); +} +// [END admanager_v1_generated_ReportService_RunReport_sync] diff --git a/AdsAdManager/samples/V1/ReportServiceClient/update_report.php b/AdsAdManager/samples/V1/ReportServiceClient/update_report.php new file mode 100644 index 000000000000..84e9e65464c1 --- /dev/null +++ b/AdsAdManager/samples/V1/ReportServiceClient/update_report.php @@ -0,0 +1,101 @@ +setDimensions($reportReportDefinitionDimensions) + ->setMetrics($reportReportDefinitionMetrics) + ->setDateRange($reportReportDefinitionDateRange) + ->setReportType($reportReportDefinitionReportType); + $report = (new Report()) + ->setReportDefinition($reportReportDefinition); + $updateMask = new FieldMask(); + $request = (new UpdateReportRequest()) + ->setReport($report) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Report $response */ + $response = $reportServiceClient->updateReport($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 +{ + $reportReportDefinitionDimensionsElement = Dimension::DIMENSION_UNSPECIFIED; + $reportReportDefinitionMetricsElement = Metric::METRIC_UNSPECIFIED; + $reportReportDefinitionReportType = ReportType::REPORT_TYPE_UNSPECIFIED; + + update_report_sample( + $reportReportDefinitionDimensionsElement, + $reportReportDefinitionMetricsElement, + $reportReportDefinitionReportType + ); +} +// [END admanager_v1_generated_ReportService_UpdateReport_sync] diff --git a/AdsAdManager/samples/V1/RoleServiceClient/get_role.php b/AdsAdManager/samples/V1/RoleServiceClient/get_role.php new file mode 100644 index 000000000000..3204222ed446 --- /dev/null +++ b/AdsAdManager/samples/V1/RoleServiceClient/get_role.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Role $response */ + $response = $roleServiceClient->getRole($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 = RoleServiceClient::roleName('[NETWORK_CODE]', '[ROLE]'); + + get_role_sample($formattedName); +} +// [END admanager_v1_generated_RoleService_GetRole_sync] diff --git a/AdsAdManager/samples/V1/RoleServiceClient/list_roles.php b/AdsAdManager/samples/V1/RoleServiceClient/list_roles.php new file mode 100644 index 000000000000..d9adaa30e69c --- /dev/null +++ b/AdsAdManager/samples/V1/RoleServiceClient/list_roles.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $roleServiceClient->listRoles($request); + + 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 = RoleServiceClient::networkName('[NETWORK_CODE]'); + + list_roles_sample($formattedParent); +} +// [END admanager_v1_generated_RoleService_ListRoles_sync] diff --git a/AdsAdManager/samples/V1/TaxonomyCategoryServiceClient/get_taxonomy_category.php b/AdsAdManager/samples/V1/TaxonomyCategoryServiceClient/get_taxonomy_category.php new file mode 100644 index 000000000000..b0688bd41755 --- /dev/null +++ b/AdsAdManager/samples/V1/TaxonomyCategoryServiceClient/get_taxonomy_category.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TaxonomyCategory $response */ + $response = $taxonomyCategoryServiceClient->getTaxonomyCategory($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 = TaxonomyCategoryServiceClient::taxonomyCategoryName( + '[NETWORK_CODE]', + '[TAXONOMY_CATEGORY]' + ); + + get_taxonomy_category_sample($formattedName); +} +// [END admanager_v1_generated_TaxonomyCategoryService_GetTaxonomyCategory_sync] diff --git a/AdsAdManager/samples/V1/TaxonomyCategoryServiceClient/list_taxonomy_categories.php b/AdsAdManager/samples/V1/TaxonomyCategoryServiceClient/list_taxonomy_categories.php new file mode 100644 index 000000000000..285ee42ebaf4 --- /dev/null +++ b/AdsAdManager/samples/V1/TaxonomyCategoryServiceClient/list_taxonomy_categories.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $taxonomyCategoryServiceClient->listTaxonomyCategories($request); + + 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 = TaxonomyCategoryServiceClient::networkName('[NETWORK_CODE]'); + + list_taxonomy_categories_sample($formattedParent); +} +// [END admanager_v1_generated_TaxonomyCategoryService_ListTaxonomyCategories_sync] diff --git a/AdsAdManager/samples/V1/UserServiceClient/get_user.php b/AdsAdManager/samples/V1/UserServiceClient/get_user.php new file mode 100644 index 000000000000..fdccc337f748 --- /dev/null +++ b/AdsAdManager/samples/V1/UserServiceClient/get_user.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var User $response */ + $response = $userServiceClient->getUser($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 = UserServiceClient::userName('[NETWORK_CODE]', '[USER]'); + + get_user_sample($formattedName); +} +// [END admanager_v1_generated_UserService_GetUser_sync] diff --git a/AdsAdManager/src/V1/AdManagerError.php b/AdsAdManager/src/V1/AdManagerError.php new file mode 100644 index 000000000000..2db8e2369455 --- /dev/null +++ b/AdsAdManager/src/V1/AdManagerError.php @@ -0,0 +1,241 @@ +google.ads.admanager.v1.AdManagerError + */ +class AdManagerError extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifying string for this error. + * + * Generated from protobuf field string error_code = 1; + */ + protected $error_code = ''; + /** + * A publisher appropriate explanation of this error. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * The field path that triggered this error. + * + * Generated from protobuf field string field_path = 3; + */ + protected $field_path = ''; + /** + * The value that triggered this error. + * + * Generated from protobuf field string trigger = 4; + */ + protected $trigger = ''; + /** + * The stack trace that accompanies this error. + * + * Generated from protobuf field string stack_trace = 5; + */ + protected $stack_trace = ''; + /** + * A list of messages that carry any additional error details. + * + * Generated from protobuf field repeated .google.protobuf.Any details = 6; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $error_code + * The unique identifying string for this error. + * @type string $message + * A publisher appropriate explanation of this error. + * @type string $field_path + * The field path that triggered this error. + * @type string $trigger + * The value that triggered this error. + * @type string $stack_trace + * The stack trace that accompanies this error. + * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $details + * A list of messages that carry any additional error details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdmanagerError::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifying string for this error. + * + * Generated from protobuf field string error_code = 1; + * @return string + */ + public function getErrorCode() + { + return $this->error_code; + } + + /** + * The unique identifying string for this error. + * + * Generated from protobuf field string error_code = 1; + * @param string $var + * @return $this + */ + public function setErrorCode($var) + { + GPBUtil::checkString($var, True); + $this->error_code = $var; + + return $this; + } + + /** + * A publisher appropriate explanation of this error. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * A publisher appropriate explanation of this error. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The field path that triggered this error. + * + * Generated from protobuf field string field_path = 3; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * The field path that triggered this error. + * + * Generated from protobuf field string field_path = 3; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * The value that triggered this error. + * + * Generated from protobuf field string trigger = 4; + * @return string + */ + public function getTrigger() + { + return $this->trigger; + } + + /** + * The value that triggered this error. + * + * Generated from protobuf field string trigger = 4; + * @param string $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkString($var, True); + $this->trigger = $var; + + return $this; + } + + /** + * The stack trace that accompanies this error. + * + * Generated from protobuf field string stack_trace = 5; + * @return string + */ + public function getStackTrace() + { + return $this->stack_trace; + } + + /** + * The stack trace that accompanies this error. + * + * Generated from protobuf field string stack_trace = 5; + * @param string $var + * @return $this + */ + public function setStackTrace($var) + { + GPBUtil::checkString($var, True); + $this->stack_trace = $var; + + return $this; + } + + /** + * A list of messages that carry any additional error details. + * + * Generated from protobuf field repeated .google.protobuf.Any details = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * A list of messages that carry any additional error details. + * + * Generated from protobuf field repeated .google.protobuf.Any details = 6; + * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); + $this->details = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/AdUnit.php b/AdsAdManager/src/V1/AdUnit.php new file mode 100644 index 000000000000..143f8778cc75 --- /dev/null +++ b/AdsAdManager/src/V1/AdUnit.php @@ -0,0 +1,1049 @@ +google.ads.admanager.v1.AdUnit + */ +class AdUnit extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the AdUnit. + * Format: `networks/{network_code}/adUnits/{ad_unit_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. AdUnit ID. + * + * Generated from protobuf field int64 ad_unit_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ad_unit_id = 0; + /** + * Required. Immutable. The AdUnit's parent. Every ad unit has a parent except + * for the root ad unit, which is created by Google. Format: + * "networks/{network_code}/adUnits/{ad_unit_id}" + * + * Generated from protobuf field string parent_ad_unit = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $parent_ad_unit = ''; + /** + * Output only. The path to this AdUnit in the ad unit hierarchy represented + * as a list from the root to this ad unit's parent. For root ad units, this + * list is empty. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnitParent parent_path = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $parent_path; + /** + * Required. The display name of the ad unit. Its maximum length is 255 + * characters. + * + * Generated from protobuf field string display_name = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Immutable. A string used to uniquely identify the ad unit for the purposes + * of serving the ad. This attribute is optional and can be set during ad unit + * creation. If it is not provided, it will be assigned by Google based on the + * ad unit ID. + * + * Generated from protobuf field string ad_unit_code = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $ad_unit_code = ''; + /** + * Output only. The status of this ad unit. It defaults to ACTIVE. + * + * Generated from protobuf field .google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + /** + * Optional. The target window directly applied to this AdUnit. + * If this field is not set, this AdUnit uses the target window specified in + * effectiveTargetWindow. + * + * Generated from protobuf field .google.ads.admanager.v1.TargetWindowEnum.TargetWindow applied_target_window = 44 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $applied_target_window = 0; + /** + * Output only. Non-empty default. The target window of this AdUnit. This + * value is inherited from ancestor AdUnits and defaults to TOP if no AdUnit + * in the hierarchy specifies it. + * + * Generated from protobuf field .google.ads.admanager.v1.TargetWindowEnum.TargetWindow effective_target_window = 45 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_target_window = 0; + /** + * Optional. The resource names of Teams directly applied to this AdUnit. + * Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string applied_teams = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $applied_teams; + /** + * Output only. The resource names of all Teams that this AdUnit is on as well + * as those inherited from parent AdUnits. Format: + * "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string teams = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $teams; + /** + * Optional. A description of the ad unit. The maximum length is 65,535 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. If this field is set to true, then the AdUnit will not be + * implicitly targeted when its parent is. Traffickers must explicitly + * target such an AdUnit or else no line items will serve to it. This + * feature is only available for Ad Manager 360 accounts. + * + * Generated from protobuf field bool explicitly_targeted = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $explicitly_targeted = false; + /** + * Output only. This field is set to true if the ad unit has any children. + * + * Generated from protobuf field bool has_children = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $has_children = false; + /** + * Output only. The time this AdUnit was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. The sizes that can be served inside this ad unit. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ad_unit_sizes; + /** + * Optional. Determines what set top box video on demand channel this ad unit + * corresponds to in an external set top box ad campaign system. + * + * Generated from protobuf field string external_set_top_box_channel_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $external_set_top_box_channel_id = ''; + /** + * Optional. The duration after which an Ad Unit will automatically refresh. + * This is only valid for ad units in mobile apps. If not set, the ad unit + * will not refresh. + * + * Generated from protobuf field .google.protobuf.Duration refresh_delay = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $refresh_delay = null; + /** + * Optional. The set of labels applied directly to this ad unit. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $applied_labels; + /** + * Output only. Contains the set of labels applied directly to the ad unit as + * well as those inherited from the parent ad units. If a label has been + * negated, only the negated label is returned. This field is readonly and is + * assigned by Google. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $effective_applied_labels; + /** + * Optional. The set of label frequency caps applied directly to this ad unit. + * There is a limit of 10 label frequency caps per ad unit. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.LabelFrequencyCap applied_label_frequency_caps = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $applied_label_frequency_caps; + /** + * Output only. The label frequency caps applied directly to the ad unit as + * well as those inherited from parent ad units. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.LabelFrequencyCap effective_label_frequency_caps = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $effective_label_frequency_caps; + /** + * Optional. The smart size mode for this ad unit. This attribute is optional + * and defaults to SmartSizeMode.NONE for fixed sizes. + * + * Generated from protobuf field .google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode smart_size_mode = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $smart_size_mode = 0; + /** + * Optional. The value of AdSense enabled directly applied to this ad unit. + * This attribute is optional and if not specified this ad unit will inherit + * the value of effectiveAdsenseEnabled from its ancestors. + * + * Generated from protobuf field optional bool applied_adsense_enabled = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $applied_adsense_enabled = null; + /** + * Output only. Specifies whether or not the AdUnit is enabled for serving ads + * from the AdSense content network. This attribute defaults to the ad unit's + * parent or ancestor's setting if one has been set. If no ancestor of the ad + * unit has set appliedAdsenseEnabled, the attribute is defaulted to true. + * + * Generated from protobuf field bool effective_adsense_enabled = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_adsense_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the AdUnit. + * Format: `networks/{network_code}/adUnits/{ad_unit_id}` + * @type int|string $ad_unit_id + * Output only. AdUnit ID. + * @type string $parent_ad_unit + * Required. Immutable. The AdUnit's parent. Every ad unit has a parent except + * for the root ad unit, which is created by Google. Format: + * "networks/{network_code}/adUnits/{ad_unit_id}" + * @type array<\Google\Ads\AdManager\V1\AdUnitParent>|\Google\Protobuf\Internal\RepeatedField $parent_path + * Output only. The path to this AdUnit in the ad unit hierarchy represented + * as a list from the root to this ad unit's parent. For root ad units, this + * list is empty. + * @type string $display_name + * Required. The display name of the ad unit. Its maximum length is 255 + * characters. + * @type string $ad_unit_code + * Immutable. A string used to uniquely identify the ad unit for the purposes + * of serving the ad. This attribute is optional and can be set during ad unit + * creation. If it is not provided, it will be assigned by Google based on the + * ad unit ID. + * @type int $status + * Output only. The status of this ad unit. It defaults to ACTIVE. + * @type int $applied_target_window + * Optional. The target window directly applied to this AdUnit. + * If this field is not set, this AdUnit uses the target window specified in + * effectiveTargetWindow. + * @type int $effective_target_window + * Output only. Non-empty default. The target window of this AdUnit. This + * value is inherited from ancestor AdUnits and defaults to TOP if no AdUnit + * in the hierarchy specifies it. + * @type array|\Google\Protobuf\Internal\RepeatedField $applied_teams + * Optional. The resource names of Teams directly applied to this AdUnit. + * Format: "networks/{network_code}/teams/{team_id}" + * @type array|\Google\Protobuf\Internal\RepeatedField $teams + * Output only. The resource names of all Teams that this AdUnit is on as well + * as those inherited from parent AdUnits. Format: + * "networks/{network_code}/teams/{team_id}" + * @type string $description + * Optional. A description of the ad unit. The maximum length is 65,535 + * characters. + * @type bool $explicitly_targeted + * Optional. If this field is set to true, then the AdUnit will not be + * implicitly targeted when its parent is. Traffickers must explicitly + * target such an AdUnit or else no line items will serve to it. This + * feature is only available for Ad Manager 360 accounts. + * @type bool $has_children + * Output only. This field is set to true if the ad unit has any children. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this AdUnit was last modified. + * @type array<\Google\Ads\AdManager\V1\AdUnitSize>|\Google\Protobuf\Internal\RepeatedField $ad_unit_sizes + * Optional. The sizes that can be served inside this ad unit. + * @type string $external_set_top_box_channel_id + * Optional. Determines what set top box video on demand channel this ad unit + * corresponds to in an external set top box ad campaign system. + * @type \Google\Protobuf\Duration $refresh_delay + * Optional. The duration after which an Ad Unit will automatically refresh. + * This is only valid for ad units in mobile apps. If not set, the ad unit + * will not refresh. + * @type array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $applied_labels + * Optional. The set of labels applied directly to this ad unit. + * @type array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $effective_applied_labels + * Output only. Contains the set of labels applied directly to the ad unit as + * well as those inherited from the parent ad units. If a label has been + * negated, only the negated label is returned. This field is readonly and is + * assigned by Google. + * @type array<\Google\Ads\AdManager\V1\LabelFrequencyCap>|\Google\Protobuf\Internal\RepeatedField $applied_label_frequency_caps + * Optional. The set of label frequency caps applied directly to this ad unit. + * There is a limit of 10 label frequency caps per ad unit. + * @type array<\Google\Ads\AdManager\V1\LabelFrequencyCap>|\Google\Protobuf\Internal\RepeatedField $effective_label_frequency_caps + * Output only. The label frequency caps applied directly to the ad unit as + * well as those inherited from parent ad units. + * @type int $smart_size_mode + * Optional. The smart size mode for this ad unit. This attribute is optional + * and defaults to SmartSizeMode.NONE for fixed sizes. + * @type bool $applied_adsense_enabled + * Optional. The value of AdSense enabled directly applied to this ad unit. + * This attribute is optional and if not specified this ad unit will inherit + * the value of effectiveAdsenseEnabled from its ancestors. + * @type bool $effective_adsense_enabled + * Output only. Specifies whether or not the AdUnit is enabled for serving ads + * from the AdSense content network. This attribute defaults to the ad unit's + * parent or ancestor's setting if one has been set. If no ancestor of the ad + * unit has set appliedAdsenseEnabled, the attribute is defaulted to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the AdUnit. + * Format: `networks/{network_code}/adUnits/{ad_unit_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 AdUnit. + * Format: `networks/{network_code}/adUnits/{ad_unit_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; + } + + /** + * Output only. AdUnit ID. + * + * Generated from protobuf field int64 ad_unit_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getAdUnitId() + { + return $this->ad_unit_id; + } + + /** + * Output only. AdUnit ID. + * + * Generated from protobuf field int64 ad_unit_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setAdUnitId($var) + { + GPBUtil::checkInt64($var); + $this->ad_unit_id = $var; + + return $this; + } + + /** + * Required. Immutable. The AdUnit's parent. Every ad unit has a parent except + * for the root ad unit, which is created by Google. Format: + * "networks/{network_code}/adUnits/{ad_unit_id}" + * + * Generated from protobuf field string parent_ad_unit = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getParentAdUnit() + { + return $this->parent_ad_unit; + } + + /** + * Required. Immutable. The AdUnit's parent. Every ad unit has a parent except + * for the root ad unit, which is created by Google. Format: + * "networks/{network_code}/adUnits/{ad_unit_id}" + * + * Generated from protobuf field string parent_ad_unit = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParentAdUnit($var) + { + GPBUtil::checkString($var, True); + $this->parent_ad_unit = $var; + + return $this; + } + + /** + * Output only. The path to this AdUnit in the ad unit hierarchy represented + * as a list from the root to this ad unit's parent. For root ad units, this + * list is empty. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnitParent parent_path = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParentPath() + { + return $this->parent_path; + } + + /** + * Output only. The path to this AdUnit in the ad unit hierarchy represented + * as a list from the root to this ad unit's parent. For root ad units, this + * list is empty. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnitParent parent_path = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Ads\AdManager\V1\AdUnitParent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParentPath($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AdUnitParent::class); + $this->parent_path = $arr; + + return $this; + } + + /** + * Required. The display name of the ad unit. Its maximum length is 255 + * characters. + * + * Generated from protobuf field string display_name = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the ad unit. Its maximum length is 255 + * characters. + * + * Generated from protobuf field string display_name = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Immutable. A string used to uniquely identify the ad unit for the purposes + * of serving the ad. This attribute is optional and can be set during ad unit + * creation. If it is not provided, it will be assigned by Google based on the + * ad unit ID. + * + * Generated from protobuf field string ad_unit_code = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getAdUnitCode() + { + return $this->ad_unit_code; + } + + /** + * Immutable. A string used to uniquely identify the ad unit for the purposes + * of serving the ad. This attribute is optional and can be set during ad unit + * creation. If it is not provided, it will be assigned by Google based on the + * ad unit ID. + * + * Generated from protobuf field string ad_unit_code = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setAdUnitCode($var) + { + GPBUtil::checkString($var, True); + $this->ad_unit_code = $var; + + return $this; + } + + /** + * Output only. The status of this ad unit. It defaults to ACTIVE. + * + * Generated from protobuf field .google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. The status of this ad unit. It defaults to ACTIVE. + * + * Generated from protobuf field .google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\AdUnitStatusEnum\AdUnitStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Optional. The target window directly applied to this AdUnit. + * If this field is not set, this AdUnit uses the target window specified in + * effectiveTargetWindow. + * + * Generated from protobuf field .google.ads.admanager.v1.TargetWindowEnum.TargetWindow applied_target_window = 44 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAppliedTargetWindow() + { + return $this->applied_target_window; + } + + /** + * Optional. The target window directly applied to this AdUnit. + * If this field is not set, this AdUnit uses the target window specified in + * effectiveTargetWindow. + * + * Generated from protobuf field .google.ads.admanager.v1.TargetWindowEnum.TargetWindow applied_target_window = 44 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAppliedTargetWindow($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\TargetWindowEnum\TargetWindow::class); + $this->applied_target_window = $var; + + return $this; + } + + /** + * Output only. Non-empty default. The target window of this AdUnit. This + * value is inherited from ancestor AdUnits and defaults to TOP if no AdUnit + * in the hierarchy specifies it. + * + * Generated from protobuf field .google.ads.admanager.v1.TargetWindowEnum.TargetWindow effective_target_window = 45 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEffectiveTargetWindow() + { + return $this->effective_target_window; + } + + /** + * Output only. Non-empty default. The target window of this AdUnit. This + * value is inherited from ancestor AdUnits and defaults to TOP if no AdUnit + * in the hierarchy specifies it. + * + * Generated from protobuf field .google.ads.admanager.v1.TargetWindowEnum.TargetWindow effective_target_window = 45 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEffectiveTargetWindow($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\TargetWindowEnum\TargetWindow::class); + $this->effective_target_window = $var; + + return $this; + } + + /** + * Optional. The resource names of Teams directly applied to this AdUnit. + * Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string applied_teams = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliedTeams() + { + return $this->applied_teams; + } + + /** + * Optional. The resource names of Teams directly applied to this AdUnit. + * Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string applied_teams = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliedTeams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->applied_teams = $arr; + + return $this; + } + + /** + * Output only. The resource names of all Teams that this AdUnit is on as well + * as those inherited from parent AdUnits. Format: + * "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string teams = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTeams() + { + return $this->teams; + } + + /** + * Output only. The resource names of all Teams that this AdUnit is on as well + * as those inherited from parent AdUnits. Format: + * "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string teams = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTeams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->teams = $arr; + + return $this; + } + + /** + * Optional. A description of the ad unit. The maximum length is 65,535 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of the ad unit. The maximum length is 65,535 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. If this field is set to true, then the AdUnit will not be + * implicitly targeted when its parent is. Traffickers must explicitly + * target such an AdUnit or else no line items will serve to it. This + * feature is only available for Ad Manager 360 accounts. + * + * Generated from protobuf field bool explicitly_targeted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getExplicitlyTargeted() + { + return $this->explicitly_targeted; + } + + /** + * Optional. If this field is set to true, then the AdUnit will not be + * implicitly targeted when its parent is. Traffickers must explicitly + * target such an AdUnit or else no line items will serve to it. This + * feature is only available for Ad Manager 360 accounts. + * + * Generated from protobuf field bool explicitly_targeted = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setExplicitlyTargeted($var) + { + GPBUtil::checkBool($var); + $this->explicitly_targeted = $var; + + return $this; + } + + /** + * Output only. This field is set to true if the ad unit has any children. + * + * Generated from protobuf field bool has_children = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getHasChildren() + { + return $this->has_children; + } + + /** + * Output only. This field is set to true if the ad unit has any children. + * + * Generated from protobuf field bool has_children = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setHasChildren($var) + { + GPBUtil::checkBool($var); + $this->has_children = $var; + + return $this; + } + + /** + * Output only. The time this AdUnit was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time this AdUnit was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. The sizes that can be served inside this ad unit. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdUnitSizes() + { + return $this->ad_unit_sizes; + } + + /** + * Optional. The sizes that can be served inside this ad unit. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\AdUnitSize>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdUnitSizes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AdUnitSize::class); + $this->ad_unit_sizes = $arr; + + return $this; + } + + /** + * Optional. Determines what set top box video on demand channel this ad unit + * corresponds to in an external set top box ad campaign system. + * + * Generated from protobuf field string external_set_top_box_channel_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getExternalSetTopBoxChannelId() + { + return $this->external_set_top_box_channel_id; + } + + /** + * Optional. Determines what set top box video on demand channel this ad unit + * corresponds to in an external set top box ad campaign system. + * + * Generated from protobuf field string external_set_top_box_channel_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setExternalSetTopBoxChannelId($var) + { + GPBUtil::checkString($var, True); + $this->external_set_top_box_channel_id = $var; + + return $this; + } + + /** + * Optional. The duration after which an Ad Unit will automatically refresh. + * This is only valid for ad units in mobile apps. If not set, the ad unit + * will not refresh. + * + * Generated from protobuf field .google.protobuf.Duration refresh_delay = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getRefreshDelay() + { + return $this->refresh_delay; + } + + public function hasRefreshDelay() + { + return isset($this->refresh_delay); + } + + public function clearRefreshDelay() + { + unset($this->refresh_delay); + } + + /** + * Optional. The duration after which an Ad Unit will automatically refresh. + * This is only valid for ad units in mobile apps. If not set, the ad unit + * will not refresh. + * + * Generated from protobuf field .google.protobuf.Duration refresh_delay = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRefreshDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->refresh_delay = $var; + + return $this; + } + + /** + * Optional. The set of labels applied directly to this ad unit. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliedLabels() + { + return $this->applied_labels; + } + + /** + * Optional. The set of labels applied directly to this ad unit. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliedLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AppliedLabel::class); + $this->applied_labels = $arr; + + return $this; + } + + /** + * Output only. Contains the set of labels applied directly to the ad unit as + * well as those inherited from the parent ad units. If a label has been + * negated, only the negated label is returned. This field is readonly and is + * assigned by Google. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEffectiveAppliedLabels() + { + return $this->effective_applied_labels; + } + + /** + * Output only. Contains the set of labels applied directly to the ad unit as + * well as those inherited from the parent ad units. If a label has been + * negated, only the negated label is returned. This field is readonly and is + * assigned by Google. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEffectiveAppliedLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AppliedLabel::class); + $this->effective_applied_labels = $arr; + + return $this; + } + + /** + * Optional. The set of label frequency caps applied directly to this ad unit. + * There is a limit of 10 label frequency caps per ad unit. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.LabelFrequencyCap applied_label_frequency_caps = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliedLabelFrequencyCaps() + { + return $this->applied_label_frequency_caps; + } + + /** + * Optional. The set of label frequency caps applied directly to this ad unit. + * There is a limit of 10 label frequency caps per ad unit. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.LabelFrequencyCap applied_label_frequency_caps = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\LabelFrequencyCap>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliedLabelFrequencyCaps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\LabelFrequencyCap::class); + $this->applied_label_frequency_caps = $arr; + + return $this; + } + + /** + * Output only. The label frequency caps applied directly to the ad unit as + * well as those inherited from parent ad units. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.LabelFrequencyCap effective_label_frequency_caps = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEffectiveLabelFrequencyCaps() + { + return $this->effective_label_frequency_caps; + } + + /** + * Output only. The label frequency caps applied directly to the ad unit as + * well as those inherited from parent ad units. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.LabelFrequencyCap effective_label_frequency_caps = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Ads\AdManager\V1\LabelFrequencyCap>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEffectiveLabelFrequencyCaps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\LabelFrequencyCap::class); + $this->effective_label_frequency_caps = $arr; + + return $this; + } + + /** + * Optional. The smart size mode for this ad unit. This attribute is optional + * and defaults to SmartSizeMode.NONE for fixed sizes. + * + * Generated from protobuf field .google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode smart_size_mode = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSmartSizeMode() + { + return $this->smart_size_mode; + } + + /** + * Optional. The smart size mode for this ad unit. This attribute is optional + * and defaults to SmartSizeMode.NONE for fixed sizes. + * + * Generated from protobuf field .google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode smart_size_mode = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSmartSizeMode($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\SmartSizeModeEnum\SmartSizeMode::class); + $this->smart_size_mode = $var; + + return $this; + } + + /** + * Optional. The value of AdSense enabled directly applied to this ad unit. + * This attribute is optional and if not specified this ad unit will inherit + * the value of effectiveAdsenseEnabled from its ancestors. + * + * Generated from protobuf field optional bool applied_adsense_enabled = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAppliedAdsenseEnabled() + { + return isset($this->applied_adsense_enabled) ? $this->applied_adsense_enabled : false; + } + + public function hasAppliedAdsenseEnabled() + { + return isset($this->applied_adsense_enabled); + } + + public function clearAppliedAdsenseEnabled() + { + unset($this->applied_adsense_enabled); + } + + /** + * Optional. The value of AdSense enabled directly applied to this ad unit. + * This attribute is optional and if not specified this ad unit will inherit + * the value of effectiveAdsenseEnabled from its ancestors. + * + * Generated from protobuf field optional bool applied_adsense_enabled = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAppliedAdsenseEnabled($var) + { + GPBUtil::checkBool($var); + $this->applied_adsense_enabled = $var; + + return $this; + } + + /** + * Output only. Specifies whether or not the AdUnit is enabled for serving ads + * from the AdSense content network. This attribute defaults to the ad unit's + * parent or ancestor's setting if one has been set. If no ancestor of the ad + * unit has set appliedAdsenseEnabled, the attribute is defaulted to true. + * + * Generated from protobuf field bool effective_adsense_enabled = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getEffectiveAdsenseEnabled() + { + return $this->effective_adsense_enabled; + } + + /** + * Output only. Specifies whether or not the AdUnit is enabled for serving ads + * from the AdSense content network. This attribute defaults to the ad unit's + * parent or ancestor's setting if one has been set. If no ancestor of the ad + * unit has set appliedAdsenseEnabled, the attribute is defaulted to true. + * + * Generated from protobuf field bool effective_adsense_enabled = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setEffectiveAdsenseEnabled($var) + { + GPBUtil::checkBool($var); + $this->effective_adsense_enabled = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/AdUnitParent.php b/AdsAdManager/src/V1/AdUnitParent.php new file mode 100644 index 000000000000..558682858ed9 --- /dev/null +++ b/AdsAdManager/src/V1/AdUnitParent.php @@ -0,0 +1,143 @@ +google.ads.admanager.v1.AdUnitParent + */ +class AdUnitParent extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The parent of the current AdUnit + * Format: `networks/{network_code}/adUnits/{ad_unit_id}` + * + * Generated from protobuf field string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $parent_ad_unit = ''; + /** + * Output only. The display name of the parent AdUnit. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. A string used to uniquely identify the ad unit for the + * purposes of serving the ad. + * + * Generated from protobuf field string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ad_unit_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent_ad_unit + * Output only. The parent of the current AdUnit + * Format: `networks/{network_code}/adUnits/{ad_unit_id}` + * @type string $display_name + * Output only. The display name of the parent AdUnit. + * @type string $ad_unit_code + * Output only. A string used to uniquely identify the ad unit for the + * purposes of serving the ad. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitMessages::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The parent of the current AdUnit + * Format: `networks/{network_code}/adUnits/{ad_unit_id}` + * + * Generated from protobuf field string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getParentAdUnit() + { + return $this->parent_ad_unit; + } + + /** + * Output only. The parent of the current AdUnit + * Format: `networks/{network_code}/adUnits/{ad_unit_id}` + * + * Generated from protobuf field string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParentAdUnit($var) + { + GPBUtil::checkString($var, True); + $this->parent_ad_unit = $var; + + return $this; + } + + /** + * Output only. The display name of the parent AdUnit. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of the parent AdUnit. + * + * Generated from protobuf field string display_name = 2 [(.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. A string used to uniquely identify the ad unit for the + * purposes of serving the ad. + * + * Generated from protobuf field string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAdUnitCode() + { + return $this->ad_unit_code; + } + + /** + * Output only. A string used to uniquely identify the ad unit for the + * purposes of serving the ad. + * + * Generated from protobuf field string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAdUnitCode($var) + { + GPBUtil::checkString($var, True); + $this->ad_unit_code = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/AdUnitSize.php b/AdsAdManager/src/V1/AdUnitSize.php new file mode 100644 index 000000000000..43ee5cd761d8 --- /dev/null +++ b/AdsAdManager/src/V1/AdUnitSize.php @@ -0,0 +1,153 @@ +google.ads.admanager.v1.AdUnitSize + */ +class AdUnitSize extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Size of the AdUnit. + * + * Generated from protobuf field .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $size = null; + /** + * Required. The EnvironmentType of the AdUnit + * + * Generated from protobuf field .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment_type = 0; + /** + * The companions for this ad unit size. Companions are only valid if the + * environment is + * [VIDEO_PLAYER][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType]. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Size companions = 3; + */ + private $companions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Size $size + * Required. The Size of the AdUnit. + * @type int $environment_type + * Required. The EnvironmentType of the AdUnit + * @type array<\Google\Ads\AdManager\V1\Size>|\Google\Protobuf\Internal\RepeatedField $companions + * The companions for this ad unit size. Companions are only valid if the + * environment is + * [VIDEO_PLAYER][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitMessages::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Size of the AdUnit. + * + * Generated from protobuf field .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Size|null + */ + public function getSize() + { + return $this->size; + } + + public function hasSize() + { + return isset($this->size); + } + + public function clearSize() + { + unset($this->size); + } + + /** + * Required. The Size of the AdUnit. + * + * Generated from protobuf field .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Size $var + * @return $this + */ + public function setSize($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Size::class); + $this->size = $var; + + return $this; + } + + /** + * Required. The EnvironmentType of the AdUnit + * + * Generated from protobuf field .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getEnvironmentType() + { + return $this->environment_type; + } + + /** + * Required. The EnvironmentType of the AdUnit + * + * Generated from protobuf field .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setEnvironmentType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\EnvironmentTypeEnum\EnvironmentType::class); + $this->environment_type = $var; + + return $this; + } + + /** + * The companions for this ad unit size. Companions are only valid if the + * environment is + * [VIDEO_PLAYER][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType]. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Size companions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompanions() + { + return $this->companions; + } + + /** + * The companions for this ad unit size. Companions are only valid if the + * environment is + * [VIDEO_PLAYER][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType]. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Size companions = 3; + * @param array<\Google\Ads\AdManager\V1\Size>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompanions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Size::class); + $this->companions = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/AdUnitStatusEnum.php b/AdsAdManager/src/V1/AdUnitStatusEnum.php new file mode 100644 index 000000000000..0b955366976a --- /dev/null +++ b/AdsAdManager/src/V1/AdUnitStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.AdUnitStatusEnum + */ +class AdUnitStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/AdUnitStatusEnum/AdUnitStatus.php b/AdsAdManager/src/V1/AdUnitStatusEnum/AdUnitStatus.php new file mode 100644 index 000000000000..68565e6436c7 --- /dev/null +++ b/AdsAdManager/src/V1/AdUnitStatusEnum/AdUnitStatus.php @@ -0,0 +1,69 @@ +google.ads.admanager.v1.AdUnitStatusEnum.AdUnitStatus + */ +class AdUnitStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum AD_UNIT_STATUS_UNSPECIFIED = 0; + */ + const AD_UNIT_STATUS_UNSPECIFIED = 0; + /** + * The ad unit is active, available for targeting, and serving. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The ad unit will be visible in the UI, but ignored by serving. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + /** + * The ad unit will be hidden in the UI and ignored by serving. + * + * Generated from protobuf enum ARCHIVED = 3; + */ + const ARCHIVED = 3; + + private static $valueToName = [ + self::AD_UNIT_STATUS_UNSPECIFIED => 'AD_UNIT_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + self::ARCHIVED => 'ARCHIVED', + ]; + + 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/AdsAdManager/src/V1/AppliedLabel.php b/AdsAdManager/src/V1/AppliedLabel.php new file mode 100644 index 000000000000..1bb8c2533c8d --- /dev/null +++ b/AdsAdManager/src/V1/AppliedLabel.php @@ -0,0 +1,105 @@ +google.ads.admanager.v1.AppliedLabel + */ +class AppliedLabel extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The label to be applied. + * Format: "networks/{network_code}/labels/{label_id}" + * + * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $label = ''; + /** + * Specifies whether or not to negate the effects of the label. + * + * Generated from protobuf field bool negated = 2; + */ + protected $negated = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $label + * Required. The label to be applied. + * Format: "networks/{network_code}/labels/{label_id}" + * @type bool $negated + * Specifies whether or not to negate the effects of the label. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AppliedLabel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The label to be applied. + * Format: "networks/{network_code}/labels/{label_id}" + * + * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Required. The label to be applied. + * Format: "networks/{network_code}/labels/{label_id}" + * + * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Specifies whether or not to negate the effects of the label. + * + * Generated from protobuf field bool negated = 2; + * @return bool + */ + public function getNegated() + { + return $this->negated; + } + + /** + * Specifies whether or not to negate the effects of the label. + * + * Generated from protobuf field bool negated = 2; + * @param bool $var + * @return $this + */ + public function setNegated($var) + { + GPBUtil::checkBool($var); + $this->negated = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateEntitySignalsMappingsRequest.php b/AdsAdManager/src/V1/BatchCreateEntitySignalsMappingsRequest.php new file mode 100644 index 000000000000..abf061199fc7 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateEntitySignalsMappingsRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest + */ +class BatchCreateEntitySignalsMappingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `EntitySignalsMappings` will be + * created. Format: `networks/{network_code}` The parent field in the + * CreateEntitySignalsMappingRequest must match this field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `EntitySignalsMapping` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateEntitySignalsMappingRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `EntitySignalsMappings` will be + * created. Format: `networks/{network_code}` The parent field in the + * CreateEntitySignalsMappingRequest must match this field. Please see + * {@see EntitySignalsMappingServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CreateEntitySignalsMappingRequest[] $requests Required. The `EntitySignalsMapping` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchCreateEntitySignalsMappingsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `EntitySignalsMappings` will be + * created. Format: `networks/{network_code}` The parent field in the + * CreateEntitySignalsMappingRequest must match this field. + * @type array<\Google\Ads\AdManager\V1\CreateEntitySignalsMappingRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `EntitySignalsMapping` objects to create. + * A maximum of 100 objects can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `EntitySignalsMappings` will be + * created. Format: `networks/{network_code}` The parent field in the + * CreateEntitySignalsMappingRequest must match this field. + * + * 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 `EntitySignalsMappings` will be + * created. Format: `networks/{network_code}` The parent field in the + * CreateEntitySignalsMappingRequest must match this field. + * + * 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 `EntitySignalsMapping` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateEntitySignalsMappingRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `EntitySignalsMapping` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateEntitySignalsMappingRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\CreateEntitySignalsMappingRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreateEntitySignalsMappingRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateEntitySignalsMappingsResponse.php b/AdsAdManager/src/V1/BatchCreateEntitySignalsMappingsResponse.php new file mode 100644 index 000000000000..1b346912c6ce --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateEntitySignalsMappingsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchCreateEntitySignalsMappingsResponse + */ +class BatchCreateEntitySignalsMappingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `EntitySignalsMapping` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mappings = 1; + */ + private $entity_signals_mappings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\EntitySignalsMapping>|\Google\Protobuf\Internal\RepeatedField $entity_signals_mappings + * The `EntitySignalsMapping` objects created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingService::initOnce(); + parent::__construct($data); + } + + /** + * The `EntitySignalsMapping` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mappings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntitySignalsMappings() + { + return $this->entity_signals_mappings; + } + + /** + * The `EntitySignalsMapping` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mappings = 1; + * @param array<\Google\Ads\AdManager\V1\EntitySignalsMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntitySignalsMappings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\EntitySignalsMapping::class); + $this->entity_signals_mappings = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateEntitySignalsMappingsRequest.php b/AdsAdManager/src/V1/BatchUpdateEntitySignalsMappingsRequest.php new file mode 100644 index 000000000000..546c88476ab6 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateEntitySignalsMappingsRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest + */ +class BatchUpdateEntitySignalsMappingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `EntitySignalsMappings` will be + * updated. Format: `networks/{network_code}` The parent field in the + * UpdateEntitySignalsMappingRequest must match this field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `EntitySignalsMapping` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateEntitySignalsMappingRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `EntitySignalsMappings` will be + * updated. Format: `networks/{network_code}` The parent field in the + * UpdateEntitySignalsMappingRequest must match this field. Please see + * {@see EntitySignalsMappingServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\UpdateEntitySignalsMappingRequest[] $requests Required. The `EntitySignalsMapping` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchUpdateEntitySignalsMappingsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `EntitySignalsMappings` will be + * updated. Format: `networks/{network_code}` The parent field in the + * UpdateEntitySignalsMappingRequest must match this field. + * @type array<\Google\Ads\AdManager\V1\UpdateEntitySignalsMappingRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `EntitySignalsMapping` objects to update. + * A maximum of 100 objects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `EntitySignalsMappings` will be + * updated. Format: `networks/{network_code}` The parent field in the + * UpdateEntitySignalsMappingRequest must match this field. + * + * 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 `EntitySignalsMappings` will be + * updated. Format: `networks/{network_code}` The parent field in the + * UpdateEntitySignalsMappingRequest must match this field. + * + * 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 `EntitySignalsMapping` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateEntitySignalsMappingRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `EntitySignalsMapping` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateEntitySignalsMappingRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\UpdateEntitySignalsMappingRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\UpdateEntitySignalsMappingRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateEntitySignalsMappingsResponse.php b/AdsAdManager/src/V1/BatchUpdateEntitySignalsMappingsResponse.php new file mode 100644 index 000000000000..0e3e8a5cff75 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateEntitySignalsMappingsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsResponse + */ +class BatchUpdateEntitySignalsMappingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `EntitySignalsMapping` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mappings = 1; + */ + private $entity_signals_mappings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\EntitySignalsMapping>|\Google\Protobuf\Internal\RepeatedField $entity_signals_mappings + * The `EntitySignalsMapping` objects updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingService::initOnce(); + parent::__construct($data); + } + + /** + * The `EntitySignalsMapping` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mappings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntitySignalsMappings() + { + return $this->entity_signals_mappings; + } + + /** + * The `EntitySignalsMapping` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mappings = 1; + * @param array<\Google\Ads\AdManager\V1\EntitySignalsMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntitySignalsMappings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\EntitySignalsMapping::class); + $this->entity_signals_mappings = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Client/AdUnitServiceClient.php b/AdsAdManager/src/V1/Client/AdUnitServiceClient.php new file mode 100644 index 000000000000..238d03d40c37 --- /dev/null +++ b/AdsAdManager/src/V1/Client/AdUnitServiceClient.php @@ -0,0 +1,317 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/ad_unit_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/ad_unit_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/ad_unit_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a ad_unit + * resource. + * + * @param string $networkCode + * @param string $adUnit + * + * @return string The formatted ad_unit resource. + */ + public static function adUnitName(string $networkCode, string $adUnit): string + { + return self::getPathTemplate('adUnit')->render([ + 'network_code' => $networkCode, + 'ad_unit' => $adUnit, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - adUnit: networks/{network_code}/adUnits/{ad_unit} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve an AdUnit object. + * + * The async variant is {@see AdUnitServiceClient::getAdUnitAsync()} . + * + * @example samples/V1/AdUnitServiceClient/get_ad_unit.php + * + * @param GetAdUnitRequest $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 AdUnit + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAdUnit(GetAdUnitRequest $request, array $callOptions = []): AdUnit + { + return $this->startApiCall('GetAdUnit', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of AdUnitSize objects. + * + * The async variant is {@see AdUnitServiceClient::listAdUnitSizesAsync()} . + * + * @example samples/V1/AdUnitServiceClient/list_ad_unit_sizes.php + * + * @param ListAdUnitSizesRequest $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. + */ + public function listAdUnitSizes(ListAdUnitSizesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAdUnitSizes', $request, $callOptions); + } + + /** + * API to retrieve a list of AdUnit objects. + * + * The async variant is {@see AdUnitServiceClient::listAdUnitsAsync()} . + * + * @example samples/V1/AdUnitServiceClient/list_ad_units.php + * + * @param ListAdUnitsRequest $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. + */ + public function listAdUnits(ListAdUnitsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAdUnits', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/CompanyServiceClient.php b/AdsAdManager/src/V1/Client/CompanyServiceClient.php new file mode 100644 index 000000000000..03298df70dd2 --- /dev/null +++ b/AdsAdManager/src/V1/Client/CompanyServiceClient.php @@ -0,0 +1,289 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/company_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/company_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/company_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a company + * resource. + * + * @param string $networkCode + * @param string $company + * + * @return string The formatted company resource. + */ + public static function companyName(string $networkCode, string $company): string + { + return self::getPathTemplate('company')->render([ + 'network_code' => $networkCode, + 'company' => $company, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - company: networks/{network_code}/companies/{company} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve a `Company` object. + * + * The async variant is {@see CompanyServiceClient::getCompanyAsync()} . + * + * @example samples/V1/CompanyServiceClient/get_company.php + * + * @param GetCompanyRequest $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 Company + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCompany(GetCompanyRequest $request, array $callOptions = []): Company + { + return $this->startApiCall('GetCompany', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Company` objects. + * + * The async variant is {@see CompanyServiceClient::listCompaniesAsync()} . + * + * @example samples/V1/CompanyServiceClient/list_companies.php + * + * @param ListCompaniesRequest $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. + */ + public function listCompanies(ListCompaniesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCompanies', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/CustomFieldServiceClient.php b/AdsAdManager/src/V1/Client/CustomFieldServiceClient.php new file mode 100644 index 000000000000..930c38b922c3 --- /dev/null +++ b/AdsAdManager/src/V1/Client/CustomFieldServiceClient.php @@ -0,0 +1,289 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/custom_field_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/custom_field_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/custom_field_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a custom_field + * resource. + * + * @param string $networkCode + * @param string $customField + * + * @return string The formatted custom_field resource. + */ + public static function customFieldName(string $networkCode, string $customField): string + { + return self::getPathTemplate('customField')->render([ + 'network_code' => $networkCode, + 'custom_field' => $customField, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - customField: networks/{network_code}/customFields/{custom_field} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve a `CustomField` object. + * + * The async variant is {@see CustomFieldServiceClient::getCustomFieldAsync()} . + * + * @example samples/V1/CustomFieldServiceClient/get_custom_field.php + * + * @param GetCustomFieldRequest $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 CustomField + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCustomField(GetCustomFieldRequest $request, array $callOptions = []): CustomField + { + return $this->startApiCall('GetCustomField', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `CustomField` objects. + * + * The async variant is {@see CustomFieldServiceClient::listCustomFieldsAsync()} . + * + * @example samples/V1/CustomFieldServiceClient/list_custom_fields.php + * + * @param ListCustomFieldsRequest $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. + */ + public function listCustomFields(ListCustomFieldsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCustomFields', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/CustomTargetingKeyServiceClient.php b/AdsAdManager/src/V1/Client/CustomTargetingKeyServiceClient.php new file mode 100644 index 000000000000..c3b0bc912b1d --- /dev/null +++ b/AdsAdManager/src/V1/Client/CustomTargetingKeyServiceClient.php @@ -0,0 +1,296 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/custom_targeting_key_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/custom_targeting_key_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/custom_targeting_key_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * custom_targeting_key resource. + * + * @param string $networkCode + * @param string $customTargetingKey + * + * @return string The formatted custom_targeting_key resource. + */ + public static function customTargetingKeyName(string $networkCode, string $customTargetingKey): string + { + return self::getPathTemplate('customTargetingKey')->render([ + 'network_code' => $networkCode, + 'custom_targeting_key' => $customTargetingKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - customTargetingKey: networks/{network_code}/customTargetingKeys/{custom_targeting_key} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve a `CustomTargetingKey` object. + * + * The async variant is + * {@see CustomTargetingKeyServiceClient::getCustomTargetingKeyAsync()} . + * + * @example samples/V1/CustomTargetingKeyServiceClient/get_custom_targeting_key.php + * + * @param GetCustomTargetingKeyRequest $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 CustomTargetingKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCustomTargetingKey( + GetCustomTargetingKeyRequest $request, + array $callOptions = [] + ): CustomTargetingKey { + return $this->startApiCall('GetCustomTargetingKey', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `CustomTargetingKey` objects. + * + * The async variant is + * {@see CustomTargetingKeyServiceClient::listCustomTargetingKeysAsync()} . + * + * @example samples/V1/CustomTargetingKeyServiceClient/list_custom_targeting_keys.php + * + * @param ListCustomTargetingKeysRequest $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. + */ + public function listCustomTargetingKeys( + ListCustomTargetingKeysRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListCustomTargetingKeys', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/CustomTargetingValueServiceClient.php b/AdsAdManager/src/V1/Client/CustomTargetingValueServiceClient.php new file mode 100644 index 000000000000..1ce9aabf61d2 --- /dev/null +++ b/AdsAdManager/src/V1/Client/CustomTargetingValueServiceClient.php @@ -0,0 +1,303 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/custom_targeting_value_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/custom_targeting_value_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/custom_targeting_value_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * custom_targeting_key resource. + * + * @param string $networkCode + * @param string $customTargetingKey + * + * @return string The formatted custom_targeting_key resource. + */ + public static function customTargetingKeyName(string $networkCode, string $customTargetingKey): string + { + return self::getPathTemplate('customTargetingKey')->render([ + 'network_code' => $networkCode, + 'custom_targeting_key' => $customTargetingKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * custom_targeting_value resource. + * + * @param string $networkCode + * @param string $customTargetingKey + * @param string $customTargetingValue + * + * @return string The formatted custom_targeting_value resource. + */ + public static function customTargetingValueName( + string $networkCode, + string $customTargetingKey, + string $customTargetingValue + ): string { + return self::getPathTemplate('customTargetingValue')->render([ + 'network_code' => $networkCode, + 'custom_targeting_key' => $customTargetingKey, + 'custom_targeting_value' => $customTargetingValue, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - customTargetingKey: networks/{network_code}/customTargetingKeys/{custom_targeting_key} + * - customTargetingValue: networks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve a `CustomTargetingValue` object. + * + * The async variant is + * {@see CustomTargetingValueServiceClient::getCustomTargetingValueAsync()} . + * + * @example samples/V1/CustomTargetingValueServiceClient/get_custom_targeting_value.php + * + * @param GetCustomTargetingValueRequest $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 CustomTargetingValue + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCustomTargetingValue( + GetCustomTargetingValueRequest $request, + array $callOptions = [] + ): CustomTargetingValue { + return $this->startApiCall('GetCustomTargetingValue', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `CustomTargetingValue` objects. + * + * The async variant is + * {@see CustomTargetingValueServiceClient::listCustomTargetingValuesAsync()} . + * + * @example samples/V1/CustomTargetingValueServiceClient/list_custom_targeting_values.php + * + * @param ListCustomTargetingValuesRequest $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. + */ + public function listCustomTargetingValues( + ListCustomTargetingValuesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListCustomTargetingValues', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/EntitySignalsMappingServiceClient.php b/AdsAdManager/src/V1/Client/EntitySignalsMappingServiceClient.php new file mode 100644 index 000000000000..0c1e933d9a92 --- /dev/null +++ b/AdsAdManager/src/V1/Client/EntitySignalsMappingServiceClient.php @@ -0,0 +1,424 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/entity_signals_mapping_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/entity_signals_mapping_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/entity_signals_mapping_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * entity_signals_mapping resource. + * + * @param string $networkCode + * @param string $entitySignalsMapping + * + * @return string The formatted entity_signals_mapping resource. + */ + public static function entitySignalsMappingName(string $networkCode, string $entitySignalsMapping): string + { + return self::getPathTemplate('entitySignalsMapping')->render([ + 'network_code' => $networkCode, + 'entity_signals_mapping' => $entitySignalsMapping, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - entitySignalsMapping: networks/{network_code}/entitySignalsMappings/{entity_signals_mapping} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to batch create `EntitySignalsMapping` objects. + * + * The async variant is + * {@see EntitySignalsMappingServiceClient::batchCreateEntitySignalsMappingsAsync()} + * . + * + * @example samples/V1/EntitySignalsMappingServiceClient/batch_create_entity_signals_mappings.php + * + * @param BatchCreateEntitySignalsMappingsRequest $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 BatchCreateEntitySignalsMappingsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreateEntitySignalsMappings( + BatchCreateEntitySignalsMappingsRequest $request, + array $callOptions = [] + ): BatchCreateEntitySignalsMappingsResponse { + return $this->startApiCall('BatchCreateEntitySignalsMappings', $request, $callOptions)->wait(); + } + + /** + * API to batch update `EntitySignalsMapping` objects. + * + * The async variant is + * {@see EntitySignalsMappingServiceClient::batchUpdateEntitySignalsMappingsAsync()} + * . + * + * @example samples/V1/EntitySignalsMappingServiceClient/batch_update_entity_signals_mappings.php + * + * @param BatchUpdateEntitySignalsMappingsRequest $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 BatchUpdateEntitySignalsMappingsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateEntitySignalsMappings( + BatchUpdateEntitySignalsMappingsRequest $request, + array $callOptions = [] + ): BatchUpdateEntitySignalsMappingsResponse { + return $this->startApiCall('BatchUpdateEntitySignalsMappings', $request, $callOptions)->wait(); + } + + /** + * API to create an `EntitySignalsMapping` object. + * + * The async variant is + * {@see EntitySignalsMappingServiceClient::createEntitySignalsMappingAsync()} . + * + * @example samples/V1/EntitySignalsMappingServiceClient/create_entity_signals_mapping.php + * + * @param CreateEntitySignalsMappingRequest $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 EntitySignalsMapping + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEntitySignalsMapping( + CreateEntitySignalsMappingRequest $request, + array $callOptions = [] + ): EntitySignalsMapping { + return $this->startApiCall('CreateEntitySignalsMapping', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a `EntitySignalsMapping` object. + * + * The async variant is + * {@see EntitySignalsMappingServiceClient::getEntitySignalsMappingAsync()} . + * + * @example samples/V1/EntitySignalsMappingServiceClient/get_entity_signals_mapping.php + * + * @param GetEntitySignalsMappingRequest $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 EntitySignalsMapping + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEntitySignalsMapping( + GetEntitySignalsMappingRequest $request, + array $callOptions = [] + ): EntitySignalsMapping { + return $this->startApiCall('GetEntitySignalsMapping', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `EntitySignalsMapping` objects. + * + * The async variant is + * {@see EntitySignalsMappingServiceClient::listEntitySignalsMappingsAsync()} . + * + * @example samples/V1/EntitySignalsMappingServiceClient/list_entity_signals_mappings.php + * + * @param ListEntitySignalsMappingsRequest $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. + */ + public function listEntitySignalsMappings( + ListEntitySignalsMappingsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListEntitySignalsMappings', $request, $callOptions); + } + + /** + * API to update an `EntitySignalsMapping` object. + * + * The async variant is + * {@see EntitySignalsMappingServiceClient::updateEntitySignalsMappingAsync()} . + * + * @example samples/V1/EntitySignalsMappingServiceClient/update_entity_signals_mapping.php + * + * @param UpdateEntitySignalsMappingRequest $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 EntitySignalsMapping + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEntitySignalsMapping( + UpdateEntitySignalsMappingRequest $request, + array $callOptions = [] + ): EntitySignalsMapping { + return $this->startApiCall('UpdateEntitySignalsMapping', $request, $callOptions)->wait(); + } +} diff --git a/AdsAdManager/src/V1/Client/NetworkServiceClient.php b/AdsAdManager/src/V1/Client/NetworkServiceClient.php new file mode 100644 index 000000000000..2e3ae01eb097 --- /dev/null +++ b/AdsAdManager/src/V1/Client/NetworkServiceClient.php @@ -0,0 +1,271 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/network_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/network_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/network_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve a Network object. + * + * The async variant is {@see NetworkServiceClient::getNetworkAsync()} . + * + * @example samples/V1/NetworkServiceClient/get_network.php + * + * @param GetNetworkRequest $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 Network + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNetwork(GetNetworkRequest $request, array $callOptions = []): Network + { + return $this->startApiCall('GetNetwork', $request, $callOptions)->wait(); + } + + /** + * API to retrieve all the networks the current user has access to. + * + * The async variant is {@see NetworkServiceClient::listNetworksAsync()} . + * + * @example samples/V1/NetworkServiceClient/list_networks.php + * + * @param ListNetworksRequest $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 ListNetworksResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listNetworks(ListNetworksRequest $request, array $callOptions = []): ListNetworksResponse + { + return $this->startApiCall('ListNetworks', $request, $callOptions)->wait(); + } +} diff --git a/AdsAdManager/src/V1/Client/OrderServiceClient.php b/AdsAdManager/src/V1/Client/OrderServiceClient.php new file mode 100644 index 000000000000..6976c12ade0f --- /dev/null +++ b/AdsAdManager/src/V1/Client/OrderServiceClient.php @@ -0,0 +1,294 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/order_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/order_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/order_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a order + * resource. + * + * @param string $networkCode + * @param string $order + * + * @return string The formatted order resource. + */ + public static function orderName(string $networkCode, string $order): string + { + return self::getPathTemplate('order')->render([ + 'network_code' => $networkCode, + 'order' => $order, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - network: networks/{network_code} + * - order: networks/{network_code}/orders/{order} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve an Order object. + * + * The async variant is {@see OrderServiceClient::getOrderAsync()} . + * + * @example samples/V1/OrderServiceClient/get_order.php + * + * @param GetOrderRequest $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 Order + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOrder(GetOrderRequest $request, array $callOptions = []): Order + { + return $this->startApiCall('GetOrder', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Order` objects. + * + * Fields used for literal matching in filter string: + * * `order_id` + * * `display_name` + * * `external_order_id` + * + * The async variant is {@see OrderServiceClient::listOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/list_orders.php + * + * @param ListOrdersRequest $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. + */ + public function listOrders(ListOrdersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOrders', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/PlacementServiceClient.php b/AdsAdManager/src/V1/Client/PlacementServiceClient.php new file mode 100644 index 000000000000..f81de1283b7a --- /dev/null +++ b/AdsAdManager/src/V1/Client/PlacementServiceClient.php @@ -0,0 +1,289 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/placement_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/placement_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/placement_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a placement + * resource. + * + * @param string $networkCode + * @param string $placement + * + * @return string The formatted placement resource. + */ + public static function placementName(string $networkCode, string $placement): string + { + return self::getPathTemplate('placement')->render([ + 'network_code' => $networkCode, + 'placement' => $placement, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - network: networks/{network_code} + * - placement: networks/{network_code}/placements/{placement} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve a `Placement` object. + * + * The async variant is {@see PlacementServiceClient::getPlacementAsync()} . + * + * @example samples/V1/PlacementServiceClient/get_placement.php + * + * @param GetPlacementRequest $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 Placement + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPlacement(GetPlacementRequest $request, array $callOptions = []): Placement + { + return $this->startApiCall('GetPlacement', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Placement` objects. + * + * The async variant is {@see PlacementServiceClient::listPlacementsAsync()} . + * + * @example samples/V1/PlacementServiceClient/list_placements.php + * + * @param ListPlacementsRequest $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. + */ + public function listPlacements(ListPlacementsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPlacements', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/ReportServiceClient.php b/AdsAdManager/src/V1/Client/ReportServiceClient.php new file mode 100644 index 000000000000..20addfcadaea --- /dev/null +++ b/AdsAdManager/src/V1/Client/ReportServiceClient.php @@ -0,0 +1,471 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/report_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/report_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/report_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a report + * resource. + * + * @param string $networkCode + * @param string $report + * + * @return string The formatted report resource. + */ + public static function reportName(string $networkCode, string $report): string + { + return self::getPathTemplate('report')->render([ + 'network_code' => $networkCode, + 'report' => $report, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - network: networks/{network_code} + * - report: networks/{network_code}/reports/{report} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($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); + } + + /** + * API to create a `Report` object. + * + * The async variant is {@see ReportServiceClient::createReportAsync()} . + * + * @example samples/V1/ReportServiceClient/create_report.php + * + * @param CreateReportRequest $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 Report + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReport(CreateReportRequest $request, array $callOptions = []): Report + { + return $this->startApiCall('CreateReport', $request, $callOptions)->wait(); + } + + /** + * Returns the result rows from a completed report. + * The caller must have previously called `RunReport` and waited for that + * operation to complete. The rows will be returned according to the order + * specified by the `sorts` member of the report definition. + * + * The async variant is {@see ReportServiceClient::fetchReportResultRowsAsync()} . + * + * @example samples/V1/ReportServiceClient/fetch_report_result_rows.php + * + * @param FetchReportResultRowsRequest $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 FetchReportResultRowsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchReportResultRows( + FetchReportResultRowsRequest $request, + array $callOptions = [] + ): FetchReportResultRowsResponse { + return $this->startApiCall('FetchReportResultRows', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a `Report` object. + * + * The async variant is {@see ReportServiceClient::getReportAsync()} . + * + * @example samples/V1/ReportServiceClient/get_report.php + * + * @param GetReportRequest $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 Report + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReport(GetReportRequest $request, array $callOptions = []): Report + { + return $this->startApiCall('GetReport', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Report` objects. + * + * The async variant is {@see ReportServiceClient::listReportsAsync()} . + * + * @example samples/V1/ReportServiceClient/list_reports.php + * + * @param ListReportsRequest $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. + */ + public function listReports(ListReportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReports', $request, $callOptions); + } + + /** + * Initiates the execution of an existing report asynchronously. Users can + * get the report by polling this operation via + * `OperationsService.GetOperation`. + * Poll every 5 seconds initially, with an exponential + * backoff. Once a report is complete, the operation will contain a + * `RunReportResponse` in its response field containing a report_result that + * can be passed to the `FetchReportResultRows` method to retrieve the report + * data. + * + * The async variant is {@see ReportServiceClient::runReportAsync()} . + * + * @example samples/V1/ReportServiceClient/run_report.php + * + * @param RunReportRequest $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 OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runReport(RunReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunReport', $request, $callOptions)->wait(); + } + + /** + * API to update a `Report` object. + * + * The async variant is {@see ReportServiceClient::updateReportAsync()} . + * + * @example samples/V1/ReportServiceClient/update_report.php + * + * @param UpdateReportRequest $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 Report + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateReport(UpdateReportRequest $request, array $callOptions = []): Report + { + return $this->startApiCall('UpdateReport', $request, $callOptions)->wait(); + } +} diff --git a/AdsAdManager/src/V1/Client/RoleServiceClient.php b/AdsAdManager/src/V1/Client/RoleServiceClient.php new file mode 100644 index 000000000000..ed5f846b6849 --- /dev/null +++ b/AdsAdManager/src/V1/Client/RoleServiceClient.php @@ -0,0 +1,289 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/role_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/role_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/role_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a role + * resource. + * + * @param string $networkCode + * @param string $role + * + * @return string The formatted role resource. + */ + public static function roleName(string $networkCode, string $role): string + { + return self::getPathTemplate('role')->render([ + 'network_code' => $networkCode, + 'role' => $role, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - network: networks/{network_code} + * - role: networks/{network_code}/roles/{role} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve a `Role` object. + * + * The async variant is {@see RoleServiceClient::getRoleAsync()} . + * + * @example samples/V1/RoleServiceClient/get_role.php + * + * @param GetRoleRequest $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 Role + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRole(GetRoleRequest $request, array $callOptions = []): Role + { + return $this->startApiCall('GetRole', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Role` objects. + * + * The async variant is {@see RoleServiceClient::listRolesAsync()} . + * + * @example samples/V1/RoleServiceClient/list_roles.php + * + * @param ListRolesRequest $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. + */ + public function listRoles(ListRolesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRoles', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/TaxonomyCategoryServiceClient.php b/AdsAdManager/src/V1/Client/TaxonomyCategoryServiceClient.php new file mode 100644 index 000000000000..35abfd31fdef --- /dev/null +++ b/AdsAdManager/src/V1/Client/TaxonomyCategoryServiceClient.php @@ -0,0 +1,294 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/taxonomy_category_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/taxonomy_category_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/taxonomy_category_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * taxonomy_category resource. + * + * @param string $networkCode + * @param string $taxonomyCategory + * + * @return string The formatted taxonomy_category resource. + */ + public static function taxonomyCategoryName(string $networkCode, string $taxonomyCategory): string + { + return self::getPathTemplate('taxonomyCategory')->render([ + 'network_code' => $networkCode, + 'taxonomy_category' => $taxonomyCategory, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - network: networks/{network_code} + * - taxonomyCategory: networks/{network_code}/taxonomyCategories/{taxonomy_category} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve a `TaxonomyCategory` object. + * + * The async variant is + * {@see TaxonomyCategoryServiceClient::getTaxonomyCategoryAsync()} . + * + * @example samples/V1/TaxonomyCategoryServiceClient/get_taxonomy_category.php + * + * @param GetTaxonomyCategoryRequest $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 TaxonomyCategory + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTaxonomyCategory(GetTaxonomyCategoryRequest $request, array $callOptions = []): TaxonomyCategory + { + return $this->startApiCall('GetTaxonomyCategory', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `TaxonomyCategory` objects. + * + * The async variant is + * {@see TaxonomyCategoryServiceClient::listTaxonomyCategoriesAsync()} . + * + * @example samples/V1/TaxonomyCategoryServiceClient/list_taxonomy_categories.php + * + * @param ListTaxonomyCategoriesRequest $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. + */ + public function listTaxonomyCategories( + ListTaxonomyCategoriesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListTaxonomyCategories', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/UserServiceClient.php b/AdsAdManager/src/V1/Client/UserServiceClient.php new file mode 100644 index 000000000000..e068fd03184d --- /dev/null +++ b/AdsAdManager/src/V1/Client/UserServiceClient.php @@ -0,0 +1,247 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/user_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/user_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/user_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a user + * resource. + * + * @param string $networkCode + * @param string $user + * + * @return string The formatted user resource. + */ + public static function userName(string $networkCode, string $user): string + { + return self::getPathTemplate('user')->render([ + 'network_code' => $networkCode, + 'user' => $user, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - user: networks/{network_code}/users/{user} + * + * 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. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * API to retrieve a User object. + * + * To get the current user, the resource name + * `networks/{networkCode}/users/me` can be used. + * + * The async variant is {@see UserServiceClient::getUserAsync()} . + * + * @example samples/V1/UserServiceClient/get_user.php + * + * @param GetUserRequest $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 User + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUser(GetUserRequest $request, array $callOptions = []): User + { + return $this->startApiCall('GetUser', $request, $callOptions)->wait(); + } +} diff --git a/AdsAdManager/src/V1/Company.php b/AdsAdManager/src/V1/Company.php new file mode 100644 index 000000000000..18b9fe0df27a --- /dev/null +++ b/AdsAdManager/src/V1/Company.php @@ -0,0 +1,649 @@ +google.ads.admanager.v1.Company + */ +class Company extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Company`. + * Format: `networks/{network_code}/companies/{company_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. `Company` ID. + * + * Generated from protobuf field int64 company_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $company_id = 0; + /** + * Required. The display name of the `Company`. + * This value has a maximum length of 127 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. The type of the `Company`. + * + * Generated from protobuf field .google.ads.admanager.v1.CompanyTypeEnum.CompanyType type = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Optional. The address for the `Company`. + * This value has a maximum length of 1024 characters. + * + * Generated from protobuf field string address = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $address = ''; + /** + * Optional. The email for the `Company`. + * This value has a maximum length of 128 characters. + * + * Generated from protobuf field string email = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $email = ''; + /** + * Optional. The fax number for the `Company`. + * This value has a maximum length of 63 characters. + * + * Generated from protobuf field string fax = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $fax = ''; + /** + * Optional. The phone number for the `Company`. + * This value has a maximum length of 63 characters. + * + * Generated from protobuf field string phone = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $phone = ''; + /** + * Optional. The external ID for the `Company`. + * This value has a maximum length of 255 characters. + * + * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $external_id = ''; + /** + * Optional. Comments about the `Company`. + * This value has a maximum length of 1024 characters. + * + * Generated from protobuf field string comment = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $comment = ''; + /** + * Optional. The credit status of the `Company`. + * This attribute defaults to `ACTIVE` if basic settings are enabled and + * `ON_HOLD` if advance settings are enabled. + * + * Generated from protobuf field .google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $credit_status = 0; + /** + * Optional. The labels that are directly applied to the `Company`. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $applied_labels; + /** + * Optional. The resource names of primary Contact of the `Company`. + * Format: "networks/{network_code}/contacts/{contact_id}" + * + * Generated from protobuf field optional string primary_contact = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $primary_contact = null; + /** + * Optional. The resource names of Teams that are directly associated with the + * `Company`. Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string applied_teams = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $applied_teams; + /** + * Output only. The time the `Company` was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. The ID of the Google-recognized canonicalized form of the + * `Company`. + * + * Generated from protobuf field int64 third_party_company_id = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $third_party_company_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Company`. + * Format: `networks/{network_code}/companies/{company_id}` + * @type int|string $company_id + * Output only. `Company` ID. + * @type string $display_name + * Required. The display name of the `Company`. + * This value has a maximum length of 127 characters. + * @type int $type + * Required. The type of the `Company`. + * @type string $address + * Optional. The address for the `Company`. + * This value has a maximum length of 1024 characters. + * @type string $email + * Optional. The email for the `Company`. + * This value has a maximum length of 128 characters. + * @type string $fax + * Optional. The fax number for the `Company`. + * This value has a maximum length of 63 characters. + * @type string $phone + * Optional. The phone number for the `Company`. + * This value has a maximum length of 63 characters. + * @type string $external_id + * Optional. The external ID for the `Company`. + * This value has a maximum length of 255 characters. + * @type string $comment + * Optional. Comments about the `Company`. + * This value has a maximum length of 1024 characters. + * @type int $credit_status + * Optional. The credit status of the `Company`. + * This attribute defaults to `ACTIVE` if basic settings are enabled and + * `ON_HOLD` if advance settings are enabled. + * @type array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $applied_labels + * Optional. The labels that are directly applied to the `Company`. + * @type string $primary_contact + * Optional. The resource names of primary Contact of the `Company`. + * Format: "networks/{network_code}/contacts/{contact_id}" + * @type array|\Google\Protobuf\Internal\RepeatedField $applied_teams + * Optional. The resource names of Teams that are directly associated with the + * `Company`. Format: "networks/{network_code}/teams/{team_id}" + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the `Company` was last modified. + * @type int|string $third_party_company_id + * Optional. The ID of the Google-recognized canonicalized form of the + * `Company`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CompanyMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Company`. + * Format: `networks/{network_code}/companies/{company_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 `Company`. + * Format: `networks/{network_code}/companies/{company_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; + } + + /** + * Output only. `Company` ID. + * + * Generated from protobuf field int64 company_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCompanyId() + { + return $this->company_id; + } + + /** + * Output only. `Company` ID. + * + * Generated from protobuf field int64 company_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCompanyId($var) + { + GPBUtil::checkInt64($var); + $this->company_id = $var; + + return $this; + } + + /** + * Required. The display name of the `Company`. + * This value has a maximum length of 127 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the `Company`. + * This value has a maximum length of 127 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The type of the `Company`. + * + * Generated from protobuf field .google.ads.admanager.v1.CompanyTypeEnum.CompanyType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of the `Company`. + * + * Generated from protobuf field .google.ads.admanager.v1.CompanyTypeEnum.CompanyType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CompanyTypeEnum\CompanyType::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. The address for the `Company`. + * This value has a maximum length of 1024 characters. + * + * Generated from protobuf field string address = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Optional. The address for the `Company`. + * This value has a maximum length of 1024 characters. + * + * Generated from protobuf field string address = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * Optional. The email for the `Company`. + * This value has a maximum length of 128 characters. + * + * Generated from protobuf field string email = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Optional. The email for the `Company`. + * This value has a maximum length of 128 characters. + * + * Generated from protobuf field string email = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Optional. The fax number for the `Company`. + * This value has a maximum length of 63 characters. + * + * Generated from protobuf field string fax = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFax() + { + return $this->fax; + } + + /** + * Optional. The fax number for the `Company`. + * This value has a maximum length of 63 characters. + * + * Generated from protobuf field string fax = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFax($var) + { + GPBUtil::checkString($var, True); + $this->fax = $var; + + return $this; + } + + /** + * Optional. The phone number for the `Company`. + * This value has a maximum length of 63 characters. + * + * Generated from protobuf field string phone = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPhone() + { + return $this->phone; + } + + /** + * Optional. The phone number for the `Company`. + * This value has a maximum length of 63 characters. + * + * Generated from protobuf field string phone = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPhone($var) + { + GPBUtil::checkString($var, True); + $this->phone = $var; + + return $this; + } + + /** + * Optional. The external ID for the `Company`. + * This value has a maximum length of 255 characters. + * + * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getExternalId() + { + return $this->external_id; + } + + /** + * Optional. The external ID for the `Company`. + * This value has a maximum length of 255 characters. + * + * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setExternalId($var) + { + GPBUtil::checkString($var, True); + $this->external_id = $var; + + return $this; + } + + /** + * Optional. Comments about the `Company`. + * This value has a maximum length of 1024 characters. + * + * Generated from protobuf field string comment = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getComment() + { + return $this->comment; + } + + /** + * Optional. Comments about the `Company`. + * This value has a maximum length of 1024 characters. + * + * Generated from protobuf field string comment = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkString($var, True); + $this->comment = $var; + + return $this; + } + + /** + * Optional. The credit status of the `Company`. + * This attribute defaults to `ACTIVE` if basic settings are enabled and + * `ON_HOLD` if advance settings are enabled. + * + * Generated from protobuf field .google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCreditStatus() + { + return $this->credit_status; + } + + /** + * Optional. The credit status of the `Company`. + * This attribute defaults to `ACTIVE` if basic settings are enabled and + * `ON_HOLD` if advance settings are enabled. + * + * Generated from protobuf field .google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCreditStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CompanyCreditStatusEnum\CompanyCreditStatus::class); + $this->credit_status = $var; + + return $this; + } + + /** + * Optional. The labels that are directly applied to the `Company`. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliedLabels() + { + return $this->applied_labels; + } + + /** + * Optional. The labels that are directly applied to the `Company`. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliedLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AppliedLabel::class); + $this->applied_labels = $arr; + + return $this; + } + + /** + * Optional. The resource names of primary Contact of the `Company`. + * Format: "networks/{network_code}/contacts/{contact_id}" + * + * Generated from protobuf field optional string primary_contact = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getPrimaryContact() + { + return isset($this->primary_contact) ? $this->primary_contact : ''; + } + + public function hasPrimaryContact() + { + return isset($this->primary_contact); + } + + public function clearPrimaryContact() + { + unset($this->primary_contact); + } + + /** + * Optional. The resource names of primary Contact of the `Company`. + * Format: "networks/{network_code}/contacts/{contact_id}" + * + * Generated from protobuf field optional string primary_contact = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrimaryContact($var) + { + GPBUtil::checkString($var, True); + $this->primary_contact = $var; + + return $this; + } + + /** + * Optional. The resource names of Teams that are directly associated with the + * `Company`. Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string applied_teams = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliedTeams() + { + return $this->applied_teams; + } + + /** + * Optional. The resource names of Teams that are directly associated with the + * `Company`. Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string applied_teams = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliedTeams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->applied_teams = $arr; + + return $this; + } + + /** + * Output only. The time the `Company` was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the `Company` was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. The ID of the Google-recognized canonicalized form of the + * `Company`. + * + * Generated from protobuf field int64 third_party_company_id = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getThirdPartyCompanyId() + { + return $this->third_party_company_id; + } + + /** + * Optional. The ID of the Google-recognized canonicalized form of the + * `Company`. + * + * Generated from protobuf field int64 third_party_company_id = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setThirdPartyCompanyId($var) + { + GPBUtil::checkInt64($var); + $this->third_party_company_id = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CompanyCreditStatusEnum.php b/AdsAdManager/src/V1/CompanyCreditStatusEnum.php new file mode 100644 index 000000000000..07995e4a4bcd --- /dev/null +++ b/AdsAdManager/src/V1/CompanyCreditStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CompanyCreditStatusEnum + */ +class CompanyCreditStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CompanyCreditStatusEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CompanyCreditStatusEnum/CompanyCreditStatus.php b/AdsAdManager/src/V1/CompanyCreditStatusEnum/CompanyCreditStatus.php new file mode 100644 index 000000000000..128dd6e62934 --- /dev/null +++ b/AdsAdManager/src/V1/CompanyCreditStatusEnum/CompanyCreditStatus.php @@ -0,0 +1,117 @@ +google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus + */ +class CompanyCreditStatus +{ + /** + * No value specified + * + * Generated from protobuf enum COMPANY_CREDIT_STATUS_UNSPECIFIED = 0; + */ + const COMPANY_CREDIT_STATUS_UNSPECIFIED = 0; + /** + * The company's credit status is active. + * Line items belonging to the company can serve. + * This credit status is the default for basic settings and is available in + * both basic and advance settings. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The company's credit status is inactive. + * Line items belonging to the company cannot be activated. However, line + * items that were activated before the credit status changed will remain + * active. New orders or line items belonging to the company cannot be + * created. + * Companies with this credit status will be hidden by default in company + * search results. + * This credit status is available in both basic and advance settings. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + /** + * The company's credit status is on hold. + * Line items belonging to the company cannot be activated. However, line + * items that were activated before the credit status changed will remain + * active. New orders or line items belonging to the company can be + * created. + * This credit status is the default in advance settings and is only + * available in advance settings. + * + * Generated from protobuf enum ON_HOLD = 3; + */ + const ON_HOLD = 3; + /** + * The company's credit status is stopped. + * Line items belonging to the company cannot be activated. However, line + * items that were activated before the credit status changed will remain + * active. New orders or line items belonging to the company cannot be + * created. + * This credit status is only available in advance settings. + * + * Generated from protobuf enum STOP = 4; + */ + const STOP = 4; + /** + * The company's credit status is blocked. + * All active line items belonging to the company will stop serving with + * immediate effect. Line items belonging to the company cannot be + * activated, and new orders or line items belonging to the company cannot + * be created. + * This credit status is only available in advance settings. + * + * Generated from protobuf enum BLOCKED = 5; + */ + const BLOCKED = 5; + + private static $valueToName = [ + self::COMPANY_CREDIT_STATUS_UNSPECIFIED => 'COMPANY_CREDIT_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + self::ON_HOLD => 'ON_HOLD', + self::STOP => 'STOP', + self::BLOCKED => 'BLOCKED', + ]; + + 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/AdsAdManager/src/V1/CompanyTypeEnum.php b/AdsAdManager/src/V1/CompanyTypeEnum.php new file mode 100644 index 000000000000..3b9ae1d004ae --- /dev/null +++ b/AdsAdManager/src/V1/CompanyTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CompanyTypeEnum + */ +class CompanyTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CompanyTypeEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CompanyTypeEnum/CompanyType.php b/AdsAdManager/src/V1/CompanyTypeEnum/CompanyType.php new file mode 100644 index 000000000000..9b9078808a50 --- /dev/null +++ b/AdsAdManager/src/V1/CompanyTypeEnum/CompanyType.php @@ -0,0 +1,84 @@ +google.ads.admanager.v1.CompanyTypeEnum.CompanyType + */ +class CompanyType +{ + /** + * No value specified + * + * Generated from protobuf enum COMPANY_TYPE_UNSPECIFIED = 0; + */ + const COMPANY_TYPE_UNSPECIFIED = 0; + /** + * A business entity that purchases ad inventory. + * + * Generated from protobuf enum ADVERTISER = 1; + */ + const ADVERTISER = 1; + /** + * A company representing the publisher's own advertiser for house ads. + * + * Generated from protobuf enum HOUSE_ADVERTISER = 2; + */ + const HOUSE_ADVERTISER = 2; + /** + * An organization that manages ad accounts and offers services, such as ad + * creation, placement, and management to advertisers. + * + * Generated from protobuf enum AGENCY = 3; + */ + const AGENCY = 3; + /** + * A company representing the publisher's own agency. + * + * Generated from protobuf enum HOUSE_AGENCY = 4; + */ + const HOUSE_AGENCY = 4; + /** + * A company representing multiple advertisers and agencies. + * + * Generated from protobuf enum AD_NETWORK = 5; + */ + const AD_NETWORK = 5; + + private static $valueToName = [ + self::COMPANY_TYPE_UNSPECIFIED => 'COMPANY_TYPE_UNSPECIFIED', + self::ADVERTISER => 'ADVERTISER', + self::HOUSE_ADVERTISER => 'HOUSE_ADVERTISER', + self::AGENCY => 'AGENCY', + self::HOUSE_AGENCY => 'HOUSE_AGENCY', + self::AD_NETWORK => 'AD_NETWORK', + ]; + + 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/AdsAdManager/src/V1/Contact.php b/AdsAdManager/src/V1/Contact.php new file mode 100644 index 000000000000..39a061730a07 --- /dev/null +++ b/AdsAdManager/src/V1/Contact.php @@ -0,0 +1,112 @@ +google.ads.admanager.v1.Contact + */ +class Contact extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Contact`. + * Format: `networks/{network_code}/contacts/{contact_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The unique ID of the contact. This value is readonly and is + * assigned by Google. + * + * Generated from protobuf field int64 contact_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $contact_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Contact`. + * Format: `networks/{network_code}/contacts/{contact_id}` + * @type int|string $contact_id + * Output only. The unique ID of the contact. This value is readonly and is + * assigned by Google. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Contact`. + * Format: `networks/{network_code}/contacts/{contact_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 `Contact`. + * Format: `networks/{network_code}/contacts/{contact_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; + } + + /** + * Output only. The unique ID of the contact. This value is readonly and is + * assigned by Google. + * + * Generated from protobuf field int64 contact_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getContactId() + { + return $this->contact_id; + } + + /** + * Output only. The unique ID of the contact. This value is readonly and is + * assigned by Google. + * + * Generated from protobuf field int64 contact_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setContactId($var) + { + GPBUtil::checkInt64($var); + $this->contact_id = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreateEntitySignalsMappingRequest.php b/AdsAdManager/src/V1/CreateEntitySignalsMappingRequest.php new file mode 100644 index 000000000000..35f125049dec --- /dev/null +++ b/AdsAdManager/src/V1/CreateEntitySignalsMappingRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.CreateEntitySignalsMappingRequest + */ +class CreateEntitySignalsMappingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this EntitySignalsMapping will be + * created. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The EntitySignalsMapping object to create. + * + * Generated from protobuf field .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mapping = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_signals_mapping = null; + + /** + * @param string $parent Required. The parent resource where this EntitySignalsMapping will be + * created. Format: `networks/{network_code}` + * Please see {@see EntitySignalsMappingServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\EntitySignalsMapping $entitySignalsMapping Required. The EntitySignalsMapping object to create. + * + * @return \Google\Ads\AdManager\V1\CreateEntitySignalsMappingRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\AdManager\V1\EntitySignalsMapping $entitySignalsMapping): self + { + return (new self()) + ->setParent($parent) + ->setEntitySignalsMapping($entitySignalsMapping); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this EntitySignalsMapping will be + * created. Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\EntitySignalsMapping $entity_signals_mapping + * Required. The EntitySignalsMapping object to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this EntitySignalsMapping will be + * created. Format: `networks/{network_code}` + * + * 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 EntitySignalsMapping will be + * created. Format: `networks/{network_code}` + * + * 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 EntitySignalsMapping object to create. + * + * Generated from protobuf field .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mapping = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\EntitySignalsMapping|null + */ + public function getEntitySignalsMapping() + { + return $this->entity_signals_mapping; + } + + public function hasEntitySignalsMapping() + { + return isset($this->entity_signals_mapping); + } + + public function clearEntitySignalsMapping() + { + unset($this->entity_signals_mapping); + } + + /** + * Required. The EntitySignalsMapping object to create. + * + * Generated from protobuf field .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mapping = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\EntitySignalsMapping $var + * @return $this + */ + public function setEntitySignalsMapping($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\EntitySignalsMapping::class); + $this->entity_signals_mapping = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreateReportRequest.php b/AdsAdManager/src/V1/CreateReportRequest.php new file mode 100644 index 000000000000..6d466eb38e48 --- /dev/null +++ b/AdsAdManager/src/V1/CreateReportRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.CreateReportRequest + */ +class CreateReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this `Report` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Report` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Report report = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report = null; + + /** + * @param string $parent Required. The parent resource where this `Report` will be created. + * Format: `networks/{network_code}` + * Please see {@see ReportServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\Report $report Required. The `Report` to create. + * + * @return \Google\Ads\AdManager\V1\CreateReportRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\AdManager\V1\Report $report): self + { + return (new self()) + ->setParent($parent) + ->setReport($report); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this `Report` will be created. + * Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\Report $report + * Required. The `Report` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this `Report` will be created. + * Format: `networks/{network_code}` + * + * 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 `Report` will be created. + * Format: `networks/{network_code}` + * + * 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 `Report` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Report report = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Report|null + */ + public function getReport() + { + return $this->report; + } + + public function hasReport() + { + return isset($this->report); + } + + public function clearReport() + { + unset($this->report); + } + + /** + * Required. The `Report` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Report report = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Report $var + * @return $this + */ + public function setReport($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report::class); + $this->report = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CustomField.php b/AdsAdManager/src/V1/CustomField.php new file mode 100644 index 000000000000..a309a4d4b326 --- /dev/null +++ b/AdsAdManager/src/V1/CustomField.php @@ -0,0 +1,355 @@ +google.ads.admanager.v1.CustomField + */ +class CustomField extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `CustomField`. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Unique ID of the CustomField. This value is readonly and is + * assigned by Google. + * + * Generated from protobuf field int64 custom_field_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_field_id = 0; + /** + * Required. Name of the CustomField. The max length is 127 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. A description of the custom field. The maximum length is 511 + * characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The status of the `CustomField`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + /** + * Required. The type of entity the `CustomField` can be applied to. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType entity_type = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_type = 0; + /** + * Required. The data type of the `CustomField`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType data_type = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_type = 0; + /** + * Required. The visibility of the `CustomField`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility visibility = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $visibility = 0; + /** + * Optional. The drop-down options for the `CustomField`. + * Only applicable for `CustomField` with the drop-down data type. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `CustomField`. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * @type int|string $custom_field_id + * Output only. Unique ID of the CustomField. This value is readonly and is + * assigned by Google. + * @type string $display_name + * Required. Name of the CustomField. The max length is 127 characters. + * @type string $description + * Optional. A description of the custom field. The maximum length is 511 + * characters. + * @type int $status + * Output only. The status of the `CustomField`. + * @type int $entity_type + * Required. The type of entity the `CustomField` can be applied to. + * @type int $data_type + * Required. The data type of the `CustomField`. + * @type int $visibility + * Required. The visibility of the `CustomField`. + * @type array<\Google\Ads\AdManager\V1\CustomFieldOption>|\Google\Protobuf\Internal\RepeatedField $options + * Optional. The drop-down options for the `CustomField`. + * Only applicable for `CustomField` with the drop-down data type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `CustomField`. + * Format: `networks/{network_code}/customFields/{custom_field_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 `CustomField`. + * Format: `networks/{network_code}/customFields/{custom_field_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; + } + + /** + * Output only. Unique ID of the CustomField. This value is readonly and is + * assigned by Google. + * + * Generated from protobuf field int64 custom_field_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCustomFieldId() + { + return $this->custom_field_id; + } + + /** + * Output only. Unique ID of the CustomField. This value is readonly and is + * assigned by Google. + * + * Generated from protobuf field int64 custom_field_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCustomFieldId($var) + { + GPBUtil::checkInt64($var); + $this->custom_field_id = $var; + + return $this; + } + + /** + * Required. Name of the CustomField. The max length is 127 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Name of the CustomField. The max length is 127 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. A description of the custom field. The maximum length is 511 + * characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of the custom field. The maximum length is 511 + * characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The status of the `CustomField`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. The status of the `CustomField`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomFieldStatusEnum\CustomFieldStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Required. The type of entity the `CustomField` can be applied to. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType entity_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getEntityType() + { + return $this->entity_type; + } + + /** + * Required. The type of entity the `CustomField` can be applied to. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType entity_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setEntityType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomFieldEntityTypeEnum\CustomFieldEntityType::class); + $this->entity_type = $var; + + return $this; + } + + /** + * Required. The data type of the `CustomField`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType data_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDataType() + { + return $this->data_type; + } + + /** + * Required. The data type of the `CustomField`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType data_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDataType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomFieldDataTypeEnum\CustomFieldDataType::class); + $this->data_type = $var; + + return $this; + } + + /** + * Required. The visibility of the `CustomField`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility visibility = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getVisibility() + { + return $this->visibility; + } + + /** + * Required. The visibility of the `CustomField`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility visibility = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setVisibility($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomFieldVisibilityEnum\CustomFieldVisibility::class); + $this->visibility = $var; + + return $this; + } + + /** + * Optional. The drop-down options for the `CustomField`. + * Only applicable for `CustomField` with the drop-down data type. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. The drop-down options for the `CustomField`. + * Only applicable for `CustomField` with the drop-down data type. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldOption options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\CustomFieldOption>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomFieldOption::class); + $this->options = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CustomFieldDataTypeEnum.php b/AdsAdManager/src/V1/CustomFieldDataTypeEnum.php new file mode 100644 index 000000000000..a9ef8a168597 --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldDataTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomFieldDataTypeEnum + */ +class CustomFieldDataTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomFieldDataTypeEnum/CustomFieldDataType.php b/AdsAdManager/src/V1/CustomFieldDataTypeEnum/CustomFieldDataType.php new file mode 100644 index 000000000000..a3ac30f121bf --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldDataTypeEnum/CustomFieldDataType.php @@ -0,0 +1,77 @@ +google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType + */ +class CustomFieldDataType +{ + /** + * No value specified + * + * Generated from protobuf enum CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED = 0; + */ + const CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED = 0; + /** + * A string field + * The max length is 255 characters. + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * A number field. + * + * Generated from protobuf enum NUMBER = 2; + */ + const NUMBER = 2; + /** + * A "Yes" or "No" toggle field. + * + * Generated from protobuf enum TOGGLE = 3; + */ + const TOGGLE = 3; + /** + * A drop-down field. + * + * Generated from protobuf enum DROP_DOWN = 4; + */ + const DROP_DOWN = 4; + + private static $valueToName = [ + self::CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED => 'CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::NUMBER => 'NUMBER', + self::TOGGLE => 'TOGGLE', + self::DROP_DOWN => 'DROP_DOWN', + ]; + + 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/AdsAdManager/src/V1/CustomFieldEntityTypeEnum.php b/AdsAdManager/src/V1/CustomFieldEntityTypeEnum.php new file mode 100644 index 000000000000..c37b1c9f4229 --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldEntityTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomFieldEntityTypeEnum + */ +class CustomFieldEntityTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomFieldEntityTypeEnum/CustomFieldEntityType.php b/AdsAdManager/src/V1/CustomFieldEntityTypeEnum/CustomFieldEntityType.php new file mode 100644 index 000000000000..f46d58e9435e --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldEntityTypeEnum/CustomFieldEntityType.php @@ -0,0 +1,83 @@ +google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType + */ +class CustomFieldEntityType +{ + /** + * No value specified + * + * Generated from protobuf enum CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED = 0; + */ + const CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED = 0; + /** + * The CustomField is applied to LineItems. + * + * Generated from protobuf enum LINE_ITEM = 1; + */ + const LINE_ITEM = 1; + /** + * The CustomField is applied to Orders. + * + * Generated from protobuf enum ORDER = 2; + */ + const ORDER = 2; + /** + * The CustomField is applied to Creatives. + * + * Generated from protobuf enum CREATIVE = 3; + */ + const CREATIVE = 3; + /** + * The CustomField is applied to Proposals. + * + * Generated from protobuf enum PROPOSAL = 4; + */ + const PROPOSAL = 4; + /** + * The CustomField is applied to ProposalLineItems. + * + * Generated from protobuf enum PROPOSAL_LINE_ITEM = 5; + */ + const PROPOSAL_LINE_ITEM = 5; + + private static $valueToName = [ + self::CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED => 'CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED', + self::LINE_ITEM => 'LINE_ITEM', + self::ORDER => 'ORDER', + self::CREATIVE => 'CREATIVE', + self::PROPOSAL => 'PROPOSAL', + self::PROPOSAL_LINE_ITEM => 'PROPOSAL_LINE_ITEM', + ]; + + 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/AdsAdManager/src/V1/CustomFieldOption.php b/AdsAdManager/src/V1/CustomFieldOption.php new file mode 100644 index 000000000000..bc0f77c34190 --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldOption.php @@ -0,0 +1,105 @@ +google.ads.admanager.v1.CustomFieldOption + */ +class CustomFieldOption extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. `CustomFieldOption` ID. + * + * Generated from protobuf field int64 custom_field_option_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_field_option_id = 0; + /** + * Required. The display name of the `CustomFieldOption`. + * This value has a maximum length of 127 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $custom_field_option_id + * Output only. `CustomFieldOption` ID. + * @type string $display_name + * Required. The display name of the `CustomFieldOption`. + * This value has a maximum length of 127 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldMessages::initOnce(); + parent::__construct($data); + } + + /** + * Output only. `CustomFieldOption` ID. + * + * Generated from protobuf field int64 custom_field_option_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCustomFieldOptionId() + { + return $this->custom_field_option_id; + } + + /** + * Output only. `CustomFieldOption` ID. + * + * Generated from protobuf field int64 custom_field_option_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCustomFieldOptionId($var) + { + GPBUtil::checkInt64($var); + $this->custom_field_option_id = $var; + + return $this; + } + + /** + * Required. The display name of the `CustomFieldOption`. + * This value has a maximum length of 127 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the `CustomFieldOption`. + * This value has a maximum length of 127 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CustomFieldStatusEnum.php b/AdsAdManager/src/V1/CustomFieldStatusEnum.php new file mode 100644 index 000000000000..0ad861f4eb8f --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomFieldStatusEnum + */ +class CustomFieldStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomFieldStatusEnum/CustomFieldStatus.php b/AdsAdManager/src/V1/CustomFieldStatusEnum/CustomFieldStatus.php new file mode 100644 index 000000000000..3264bc448427 --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldStatusEnum/CustomFieldStatus.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus + */ +class CustomFieldStatus +{ + /** + * No value specified + * + * Generated from protobuf enum CUSTOM_FIELD_STATUS_UNSPECIFIED = 0; + */ + const CUSTOM_FIELD_STATUS_UNSPECIFIED = 0; + /** + * The CustomField is active. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The CustomField is inactive. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + + private static $valueToName = [ + self::CUSTOM_FIELD_STATUS_UNSPECIFIED => 'CUSTOM_FIELD_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + 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/AdsAdManager/src/V1/CustomFieldValue.php b/AdsAdManager/src/V1/CustomFieldValue.php new file mode 100644 index 000000000000..9a40b22f768f --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldValue.php @@ -0,0 +1,115 @@ +google.ads.admanager.v1.CustomFieldValue + */ +class CustomFieldValue extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The custom field for which this is a value. + * Format: "networks/{network_code}/customFields/{custom_field_id}" + * + * Generated from protobuf field string custom_field = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $custom_field = ''; + /** + * Required. A typed value representation of the value. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CustomFieldValue.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $custom_field + * Required. The custom field for which this is a value. + * Format: "networks/{network_code}/customFields/{custom_field_id}" + * @type \Google\Ads\AdManager\V1\CustomFieldValue\Value $value + * Required. A typed value representation of the value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldValue::initOnce(); + parent::__construct($data); + } + + /** + * Required. The custom field for which this is a value. + * Format: "networks/{network_code}/customFields/{custom_field_id}" + * + * Generated from protobuf field string custom_field = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCustomField() + { + return $this->custom_field; + } + + /** + * Required. The custom field for which this is a value. + * Format: "networks/{network_code}/customFields/{custom_field_id}" + * + * Generated from protobuf field string custom_field = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCustomField($var) + { + GPBUtil::checkString($var, True); + $this->custom_field = $var; + + return $this; + } + + /** + * Required. A typed value representation of the value. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CustomFieldValue.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\CustomFieldValue\Value|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Required. A typed value representation of the value. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CustomFieldValue.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\CustomFieldValue\Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CustomFieldValue\Value::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CustomFieldValue/Value.php b/AdsAdManager/src/V1/CustomFieldValue/Value.php new file mode 100644 index 000000000000..8ef3e954c23d --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldValue/Value.php @@ -0,0 +1,176 @@ +google.ads.admanager.v1.CustomFieldValue.Value + */ +class Value extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $dropdown_value + * The custom_field_option_id, if the CustomFieldDataType is DROPDOWN. + * @type string $string_value + * The value, if the CustomFieldDataType is STRING. + * @type float $number_value + * The value, if the CustomFieldDataType is NUMBER. + * @type bool $toggle_value + * The value, if the CustomFieldDataType is TOGGLE. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldValue::initOnce(); + parent::__construct($data); + } + + /** + * The custom_field_option_id, if the CustomFieldDataType is DROPDOWN. + * + * Generated from protobuf field int64 dropdown_value = 1; + * @return int|string + */ + public function getDropdownValue() + { + return $this->readOneof(1); + } + + public function hasDropdownValue() + { + return $this->hasOneof(1); + } + + /** + * The custom_field_option_id, if the CustomFieldDataType is DROPDOWN. + * + * Generated from protobuf field int64 dropdown_value = 1; + * @param int|string $var + * @return $this + */ + public function setDropdownValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The value, if the CustomFieldDataType is STRING. + * + * Generated from protobuf field string string_value = 2; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(2); + } + + public function hasStringValue() + { + return $this->hasOneof(2); + } + + /** + * The value, if the CustomFieldDataType is STRING. + * + * Generated from protobuf field string string_value = 2; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The value, if the CustomFieldDataType is NUMBER. + * + * Generated from protobuf field double number_value = 3; + * @return float + */ + public function getNumberValue() + { + return $this->readOneof(3); + } + + public function hasNumberValue() + { + return $this->hasOneof(3); + } + + /** + * The value, if the CustomFieldDataType is NUMBER. + * + * Generated from protobuf field double number_value = 3; + * @param float $var + * @return $this + */ + public function setNumberValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The value, if the CustomFieldDataType is TOGGLE. + * + * Generated from protobuf field bool toggle_value = 4; + * @return bool + */ + public function getToggleValue() + { + return $this->readOneof(4); + } + + public function hasToggleValue() + { + return $this->hasOneof(4); + } + + /** + * The value, if the CustomFieldDataType is TOGGLE. + * + * Generated from protobuf field bool toggle_value = 4; + * @param bool $var + * @return $this + */ + public function setToggleValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + + diff --git a/AdsAdManager/src/V1/CustomFieldVisibilityEnum.php b/AdsAdManager/src/V1/CustomFieldVisibilityEnum.php new file mode 100644 index 000000000000..3b68d3b5e3bb --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldVisibilityEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomFieldVisibilityEnum + */ +class CustomFieldVisibilityEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomFieldVisibilityEnum/CustomFieldVisibility.php b/AdsAdManager/src/V1/CustomFieldVisibilityEnum/CustomFieldVisibility.php new file mode 100644 index 000000000000..317f315358da --- /dev/null +++ b/AdsAdManager/src/V1/CustomFieldVisibilityEnum/CustomFieldVisibility.php @@ -0,0 +1,70 @@ +google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility + */ +class CustomFieldVisibility +{ + /** + * No value specified + * + * Generated from protobuf enum CUSTOM_FIELD_VISIBILITY_UNSPECIFIED = 0; + */ + const CUSTOM_FIELD_VISIBILITY_UNSPECIFIED = 0; + /** + * The CustomField is not visible in the UI and only visible through the + * API. + * + * Generated from protobuf enum HIDDEN = 1; + */ + const HIDDEN = 1; + /** + * The CustomField is visible in the UI and only editable through the API. + * + * Generated from protobuf enum READ_ONLY = 2; + */ + const READ_ONLY = 2; + /** + * The CustomField is visible and editable in both the API and UI. + * + * Generated from protobuf enum EDITABLE = 3; + */ + const EDITABLE = 3; + + private static $valueToName = [ + self::CUSTOM_FIELD_VISIBILITY_UNSPECIFIED => 'CUSTOM_FIELD_VISIBILITY_UNSPECIFIED', + self::HIDDEN => 'HIDDEN', + self::READ_ONLY => 'READ_ONLY', + self::EDITABLE => 'EDITABLE', + ]; + + 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/AdsAdManager/src/V1/CustomTargetingKey.php b/AdsAdManager/src/V1/CustomTargetingKey.php new file mode 100644 index 000000000000..c08ea0a5c5f6 --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingKey.php @@ -0,0 +1,295 @@ +google.ads.admanager.v1.CustomTargetingKey + */ +class CustomTargetingKey extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `CustomTargetingKey`. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. `CustomTargetingKey` ID. + * + * Generated from protobuf field int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_targeting_key_id = 0; + /** + * Immutable. Name of the key. Keys can contain up to 10 characters each. You + * can use alphanumeric characters and symbols other than the following: + * ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character. + * + * Generated from protobuf field string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $ad_tag_name = ''; + /** + * Optional. Descriptive name for the `CustomTargetingKey`. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Required. Indicates whether users will select from predefined values or + * create new targeting values, while specifying targeting criteria for a line + * item. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Output only. Status of the `CustomTargetingKey`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + /** + * Required. Reportable state of the `CustomTargetingKey`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reportable_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `CustomTargetingKey`. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + * @type int|string $custom_targeting_key_id + * Output only. `CustomTargetingKey` ID. + * @type string $ad_tag_name + * Immutable. Name of the key. Keys can contain up to 10 characters each. You + * can use alphanumeric characters and symbols other than the following: + * ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character. + * @type string $display_name + * Optional. Descriptive name for the `CustomTargetingKey`. + * @type int $type + * Required. Indicates whether users will select from predefined values or + * create new targeting values, while specifying targeting criteria for a line + * item. + * @type int $status + * Output only. Status of the `CustomTargetingKey`. + * @type int $reportable_type + * Required. Reportable state of the `CustomTargetingKey`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingKeyMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `CustomTargetingKey`. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_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 `CustomTargetingKey`. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_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; + } + + /** + * Output only. `CustomTargetingKey` ID. + * + * Generated from protobuf field int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCustomTargetingKeyId() + { + return $this->custom_targeting_key_id; + } + + /** + * Output only. `CustomTargetingKey` ID. + * + * Generated from protobuf field int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCustomTargetingKeyId($var) + { + GPBUtil::checkInt64($var); + $this->custom_targeting_key_id = $var; + + return $this; + } + + /** + * Immutable. Name of the key. Keys can contain up to 10 characters each. You + * can use alphanumeric characters and symbols other than the following: + * ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character. + * + * Generated from protobuf field string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getAdTagName() + { + return $this->ad_tag_name; + } + + /** + * Immutable. Name of the key. Keys can contain up to 10 characters each. You + * can use alphanumeric characters and symbols other than the following: + * ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character. + * + * Generated from protobuf field string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setAdTagName($var) + { + GPBUtil::checkString($var, True); + $this->ad_tag_name = $var; + + return $this; + } + + /** + * Optional. Descriptive name for the `CustomTargetingKey`. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Descriptive name for the `CustomTargetingKey`. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Indicates whether users will select from predefined values or + * create new targeting values, while specifying targeting criteria for a line + * item. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Indicates whether users will select from predefined values or + * create new targeting values, while specifying targeting criteria for a line + * item. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomTargetingKeyTypeEnum\CustomTargetingKeyType::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Status of the `CustomTargetingKey`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. Status of the `CustomTargetingKey`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomTargetingKeyStatusEnum\CustomTargetingKeyStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Required. Reportable state of the `CustomTargetingKey`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReportableType() + { + return $this->reportable_type; + } + + /** + * Required. Reportable state of the `CustomTargetingKey`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReportableType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomTargetingKeyReportableTypeEnum\CustomTargetingKeyReportableType::class); + $this->reportable_type = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CustomTargetingKeyReportableTypeEnum.php b/AdsAdManager/src/V1/CustomTargetingKeyReportableTypeEnum.php new file mode 100644 index 000000000000..b2162fa94cad --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingKeyReportableTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum + */ +class CustomTargetingKeyReportableTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingKeyEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomTargetingKeyReportableTypeEnum/CustomTargetingKeyReportableType.php b/AdsAdManager/src/V1/CustomTargetingKeyReportableTypeEnum/CustomTargetingKeyReportableType.php new file mode 100644 index 000000000000..870ea4304b23 --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingKeyReportableTypeEnum/CustomTargetingKeyReportableType.php @@ -0,0 +1,69 @@ +google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType + */ +class CustomTargetingKeyReportableType +{ + /** + * Not specified value. + * + * Generated from protobuf enum CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED = 0; + */ + const CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED = 0; + /** + * Not available for reporting in the Ad Manager query tool. + * + * Generated from protobuf enum OFF = 1; + */ + const OFF = 1; + /** + * Available for reporting in the Ad Manager query tool. + * + * Generated from protobuf enum ON = 2; + */ + const ON = 2; + /** + * Custom dimension available for reporting in the AdManager query tool. + * + * Generated from protobuf enum CUSTOM_DIMENSION = 3; + */ + const CUSTOM_DIMENSION = 3; + + private static $valueToName = [ + self::CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED => 'CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED', + self::OFF => 'OFF', + self::ON => 'ON', + self::CUSTOM_DIMENSION => 'CUSTOM_DIMENSION', + ]; + + 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/AdsAdManager/src/V1/CustomTargetingKeyStatusEnum.php b/AdsAdManager/src/V1/CustomTargetingKeyStatusEnum.php new file mode 100644 index 000000000000..fa3d998db1df --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingKeyStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomTargetingKeyStatusEnum + */ +class CustomTargetingKeyStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingKeyEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomTargetingKeyStatusEnum/CustomTargetingKeyStatus.php b/AdsAdManager/src/V1/CustomTargetingKeyStatusEnum/CustomTargetingKeyStatus.php new file mode 100644 index 000000000000..431028afa6fb --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingKeyStatusEnum/CustomTargetingKeyStatus.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus + */ +class CustomTargetingKeyStatus +{ + /** + * Not specified value. + * + * Generated from protobuf enum CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED = 0; + */ + const CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED = 0; + /** + * Custom targeting key is active. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Custom targeting key is inactive. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + + private static $valueToName = [ + self::CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED => 'CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + 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/AdsAdManager/src/V1/CustomTargetingKeyTypeEnum.php b/AdsAdManager/src/V1/CustomTargetingKeyTypeEnum.php new file mode 100644 index 000000000000..5fa9dc725a74 --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingKeyTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomTargetingKeyTypeEnum + */ +class CustomTargetingKeyTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingKeyEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomTargetingKeyTypeEnum/CustomTargetingKeyType.php b/AdsAdManager/src/V1/CustomTargetingKeyTypeEnum/CustomTargetingKeyType.php new file mode 100644 index 000000000000..bbfd1ededc18 --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingKeyTypeEnum/CustomTargetingKeyType.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType + */ +class CustomTargetingKeyType +{ + /** + * Not specified value. + * + * Generated from protobuf enum CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED = 0; + */ + const CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED = 0; + /** + * Key with a fixed set of values. + * + * Generated from protobuf enum PREDEFINED = 1; + */ + const PREDEFINED = 1; + /** + * Key without a fixed set of values + * + * Generated from protobuf enum FREEFORM = 2; + */ + const FREEFORM = 2; + + private static $valueToName = [ + self::CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED => 'CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED', + self::PREDEFINED => 'PREDEFINED', + self::FREEFORM => 'FREEFORM', + ]; + + 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/AdsAdManager/src/V1/CustomTargetingValue.php b/AdsAdManager/src/V1/CustomTargetingValue.php new file mode 100644 index 000000000000..1e88282d880d --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingValue.php @@ -0,0 +1,231 @@ +google.ads.admanager.v1.CustomTargetingValue + */ +class CustomTargetingValue extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `CustomTargetingValue`. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Immutable. Name of the `CustomTargetingValue`. Values can contain up to 40 + * characters each. You can use alphanumeric characters and symbols other than + * the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ]. Values are + * not data-specific; all values are treated as strings. For example, instead + * of using "age>=18 AND <=34", try "18-34" + * + * Generated from protobuf field string ad_tag_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $ad_tag_name = ''; + /** + * Optional. Descriptive name for the `CustomTargetingValue`. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Required. Immutable. The way in which the CustomTargetingValue.name strings + * will be matched. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + */ + protected $match_type = 0; + /** + * Output only. Status of the `CustomTargetingValue`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `CustomTargetingValue`. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + * @type string $ad_tag_name + * Immutable. Name of the `CustomTargetingValue`. Values can contain up to 40 + * characters each. You can use alphanumeric characters and symbols other than + * the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ]. Values are + * not data-specific; all values are treated as strings. For example, instead + * of using "age>=18 AND <=34", try "18-34" + * @type string $display_name + * Optional. Descriptive name for the `CustomTargetingValue`. + * @type int $match_type + * Required. Immutable. The way in which the CustomTargetingValue.name strings + * will be matched. + * @type int $status + * Output only. Status of the `CustomTargetingValue`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingValueMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `CustomTargetingValue`. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_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 `CustomTargetingValue`. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_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; + } + + /** + * Immutable. Name of the `CustomTargetingValue`. Values can contain up to 40 + * characters each. You can use alphanumeric characters and symbols other than + * the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ]. Values are + * not data-specific; all values are treated as strings. For example, instead + * of using "age>=18 AND <=34", try "18-34" + * + * Generated from protobuf field string ad_tag_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getAdTagName() + { + return $this->ad_tag_name; + } + + /** + * Immutable. Name of the `CustomTargetingValue`. Values can contain up to 40 + * characters each. You can use alphanumeric characters and symbols other than + * the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ]. Values are + * not data-specific; all values are treated as strings. For example, instead + * of using "age>=18 AND <=34", try "18-34" + * + * Generated from protobuf field string ad_tag_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setAdTagName($var) + { + GPBUtil::checkString($var, True); + $this->ad_tag_name = $var; + + return $this; + } + + /** + * Optional. Descriptive name for the `CustomTargetingValue`. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Descriptive name for the `CustomTargetingValue`. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Immutable. The way in which the CustomTargetingValue.name strings + * will be matched. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMatchType() + { + return $this->match_type; + } + + /** + * Required. Immutable. The way in which the CustomTargetingValue.name strings + * will be matched. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMatchType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomTargetingValueMatchTypeEnum\CustomTargetingValueMatchType::class); + $this->match_type = $var; + + return $this; + } + + /** + * Output only. Status of the `CustomTargetingValue`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. Status of the `CustomTargetingValue`. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomTargetingValueStatusEnum\CustomTargetingValueStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CustomTargetingValueMatchTypeEnum.php b/AdsAdManager/src/V1/CustomTargetingValueMatchTypeEnum.php new file mode 100644 index 000000000000..8889014cf2ac --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingValueMatchTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum + */ +class CustomTargetingValueMatchTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingValueEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomTargetingValueMatchTypeEnum/CustomTargetingValueMatchType.php b/AdsAdManager/src/V1/CustomTargetingValueMatchTypeEnum/CustomTargetingValueMatchType.php new file mode 100644 index 000000000000..63aa5d3325e2 --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingValueMatchTypeEnum/CustomTargetingValueMatchType.php @@ -0,0 +1,111 @@ +google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType + */ +class CustomTargetingValueMatchType +{ + /** + * Not specified value. + * + * Generated from protobuf enum CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED = 0; + */ + const CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED = 0; + /** + * Used for exact matching. For example, the targeting value car=honda will + * only match to the ad request car=honda. + * + * Generated from protobuf enum EXACT = 1; + */ + const EXACT = 1; + /** + * Used for lenient matching when at least one of the words in the ad + * request matches the targeted value. The targeting value car=honda will + * match to ad requests containing the word honda. So ad requests car=honda + * or car=honda civic or car=buy honda or car=how much does a honda cost + * will all have the line item delivered. + * This match type can not be used within an audience segment rule. + * + * Generated from protobuf enum BROAD = 2; + */ + const BROAD = 2; + /** + * Used for 'starts with' matching when the first few characters in the ad + * request match all of the characters in the targeted value. The targeting + * value car=honda will match to ad requests car=honda or car=hondas for + * sale but not to car=I want a honda. + * + * Generated from protobuf enum PREFIX = 3; + */ + const PREFIX = 3; + /** + * This is a combination of MatchType#BROAD and MatchType#PREFIX matching. + * The targeting value car=honda will match to ad requests that contain + * words that start with the characters in the targeted value, for example + * with car=civic hondas. + * This match type can not be used within an audience segment rule. + * + * Generated from protobuf enum BROAD_PREFIX = 4; + */ + const BROAD_PREFIX = 4; + /** + * Used for 'ends with' matching when the last characters in the ad request + * match all of the characters in the targeted value. The targeting value + * car=honda will match with ad requests car=honda or car=I want a honda but + * not to car=hondas for sale. + * This match type can not be used within line item targeting. + * + * Generated from protobuf enum SUFFIX = 5; + */ + const SUFFIX = 5; + /** + * Used for 'within' matching when the string in the ad request contains the + * string in the targeted value. The targeting value car=honda will match + * with ad requests car=honda, car=I want a honda, and also with car=hondas + * for sale, but not with car=misspelled hond a. This match type can not be + * used within line item targeting. + * + * Generated from protobuf enum CONTAINS = 6; + */ + const CONTAINS = 6; + + private static $valueToName = [ + self::CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED => 'CUSTOM_TARGETING_VALUE_MATCH_TYPE_UNSPECIFIED', + self::EXACT => 'EXACT', + self::BROAD => 'BROAD', + self::PREFIX => 'PREFIX', + self::BROAD_PREFIX => 'BROAD_PREFIX', + self::SUFFIX => 'SUFFIX', + self::CONTAINS => 'CONTAINS', + ]; + + 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/AdsAdManager/src/V1/CustomTargetingValueStatusEnum.php b/AdsAdManager/src/V1/CustomTargetingValueStatusEnum.php new file mode 100644 index 000000000000..43c17351d951 --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingValueStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomTargetingValueStatusEnum + */ +class CustomTargetingValueStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingValueEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomTargetingValueStatusEnum/CustomTargetingValueStatus.php b/AdsAdManager/src/V1/CustomTargetingValueStatusEnum/CustomTargetingValueStatus.php new file mode 100644 index 000000000000..fe193b6b1dea --- /dev/null +++ b/AdsAdManager/src/V1/CustomTargetingValueStatusEnum/CustomTargetingValueStatus.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus + */ +class CustomTargetingValueStatus +{ + /** + * Not specified value. + * + * Generated from protobuf enum CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED = 0; + */ + const CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED = 0; + /** + * Custom targeting value is active. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Custom targeting value is inactive. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + + private static $valueToName = [ + self::CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED => 'CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + 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/AdsAdManager/src/V1/EntitySignalsMapping.php b/AdsAdManager/src/V1/EntitySignalsMapping.php new file mode 100644 index 000000000000..19526df8672e --- /dev/null +++ b/AdsAdManager/src/V1/EntitySignalsMapping.php @@ -0,0 +1,255 @@ +google.ads.admanager.v1.EntitySignalsMapping + */ +class EntitySignalsMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `EntitySignalsMapping`. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. `EntitySignalsMapping` ID. + * + * Generated from protobuf field int64 entity_signals_mapping_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $entity_signals_mapping_id = 0; + /** + * Required. The IDs of the categories that are associated with the + * referencing entity. + * + * Generated from protobuf field repeated int64 taxonomy_category_ids = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + private $taxonomy_category_ids; + protected $entity; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $audience_segment_id + * ID of an AudienceSegment that this mapping belongs to. + * @type int|string $content_bundle_id + * ID of a ContentBundle that this mapping belongs to. + * @type int|string $custom_targeting_value_id + * ID of a CustomValue that this mapping belongs to. + * @type string $name + * Identifier. The resource name of the `EntitySignalsMapping`. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_id}` + * @type int|string $entity_signals_mapping_id + * Output only. `EntitySignalsMapping` ID. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $taxonomy_category_ids + * Required. The IDs of the categories that are associated with the + * referencing entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingMessages::initOnce(); + parent::__construct($data); + } + + /** + * ID of an AudienceSegment that this mapping belongs to. + * + * Generated from protobuf field int64 audience_segment_id = 3; + * @return int|string + */ + public function getAudienceSegmentId() + { + return $this->readOneof(3); + } + + public function hasAudienceSegmentId() + { + return $this->hasOneof(3); + } + + /** + * ID of an AudienceSegment that this mapping belongs to. + * + * Generated from protobuf field int64 audience_segment_id = 3; + * @param int|string $var + * @return $this + */ + public function setAudienceSegmentId($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * ID of a ContentBundle that this mapping belongs to. + * + * Generated from protobuf field int64 content_bundle_id = 4; + * @return int|string + */ + public function getContentBundleId() + { + return $this->readOneof(4); + } + + public function hasContentBundleId() + { + return $this->hasOneof(4); + } + + /** + * ID of a ContentBundle that this mapping belongs to. + * + * Generated from protobuf field int64 content_bundle_id = 4; + * @param int|string $var + * @return $this + */ + public function setContentBundleId($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * ID of a CustomValue that this mapping belongs to. + * + * Generated from protobuf field int64 custom_targeting_value_id = 5; + * @return int|string + */ + public function getCustomTargetingValueId() + { + return $this->readOneof(5); + } + + public function hasCustomTargetingValueId() + { + return $this->hasOneof(5); + } + + /** + * ID of a CustomValue that this mapping belongs to. + * + * Generated from protobuf field int64 custom_targeting_value_id = 5; + * @param int|string $var + * @return $this + */ + public function setCustomTargetingValueId($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Identifier. The resource name of the `EntitySignalsMapping`. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_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 `EntitySignalsMapping`. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_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; + } + + /** + * Output only. `EntitySignalsMapping` ID. + * + * Generated from protobuf field int64 entity_signals_mapping_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getEntitySignalsMappingId() + { + return $this->entity_signals_mapping_id; + } + + /** + * Output only. `EntitySignalsMapping` ID. + * + * Generated from protobuf field int64 entity_signals_mapping_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setEntitySignalsMappingId($var) + { + GPBUtil::checkInt64($var); + $this->entity_signals_mapping_id = $var; + + return $this; + } + + /** + * Required. The IDs of the categories that are associated with the + * referencing entity. + * + * Generated from protobuf field repeated int64 taxonomy_category_ids = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaxonomyCategoryIds() + { + return $this->taxonomy_category_ids; + } + + /** + * Required. The IDs of the categories that are associated with the + * referencing entity. + * + * Generated from protobuf field repeated int64 taxonomy_category_ids = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaxonomyCategoryIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->taxonomy_category_ids = $arr; + + return $this; + } + + /** + * @return string + */ + public function getEntity() + { + return $this->whichOneof("entity"); + } + +} + diff --git a/AdsAdManager/src/V1/EnvironmentTypeEnum.php b/AdsAdManager/src/V1/EnvironmentTypeEnum.php new file mode 100644 index 000000000000..eb19e59df821 --- /dev/null +++ b/AdsAdManager/src/V1/EnvironmentTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.EnvironmentTypeEnum + */ +class EnvironmentTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EnvironmentTypeEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/EnvironmentTypeEnum/EnvironmentType.php b/AdsAdManager/src/V1/EnvironmentTypeEnum/EnvironmentType.php new file mode 100644 index 000000000000..44b2d8a85159 --- /dev/null +++ b/AdsAdManager/src/V1/EnvironmentTypeEnum/EnvironmentType.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType + */ +class EnvironmentType +{ + /** + * No value specified + * + * Generated from protobuf enum ENVIRONMENT_TYPE_UNSPECIFIED = 0; + */ + const ENVIRONMENT_TYPE_UNSPECIFIED = 0; + /** + * A regular web browser. + * + * Generated from protobuf enum BROWSER = 1; + */ + const BROWSER = 1; + /** + * Video players. + * + * Generated from protobuf enum VIDEO_PLAYER = 2; + */ + const VIDEO_PLAYER = 2; + + private static $valueToName = [ + self::ENVIRONMENT_TYPE_UNSPECIFIED => 'ENVIRONMENT_TYPE_UNSPECIFIED', + self::BROWSER => 'BROWSER', + self::VIDEO_PLAYER => 'VIDEO_PLAYER', + ]; + + 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/AdsAdManager/src/V1/FetchReportResultRowsRequest.php b/AdsAdManager/src/V1/FetchReportResultRowsRequest.php new file mode 100644 index 000000000000..c12d3c16d43d --- /dev/null +++ b/AdsAdManager/src/V1/FetchReportResultRowsRequest.php @@ -0,0 +1,170 @@ +google.ads.admanager.v1.FetchReportResultRowsRequest + */ +class FetchReportResultRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The report result being fetched. + * Format: + * `networks/{network_code}/reports/{report_id}/results/{report_result_id}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. The maximum number of rows to return. The service may return + * fewer than this value. If unspecified, at most 1,000 rows will be returned. + * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * + * 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 `FetchReportResultRows` + * call. Provide this to retrieve the second and subsequent batches of rows. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $name The report result being fetched. + * Format: + * `networks/{network_code}/reports/{report_id}/results/{report_result_id}` + * + * @return \Google\Ads\AdManager\V1\FetchReportResultRowsRequest + * + * @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 + * The report result being fetched. + * Format: + * `networks/{network_code}/reports/{report_id}/results/{report_result_id}` + * @type int $page_size + * Optional. The maximum number of rows to return. The service may return + * fewer than this value. If unspecified, at most 1,000 rows will be returned. + * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * @type string $page_token + * Optional. A page token, received from a previous `FetchReportResultRows` + * call. Provide this to retrieve the second and subsequent batches of rows. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * The report result being fetched. + * Format: + * `networks/{network_code}/reports/{report_id}/results/{report_result_id}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The report result being fetched. + * Format: + * `networks/{network_code}/reports/{report_id}/results/{report_result_id}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The maximum number of rows to return. The service may return + * fewer than this value. If unspecified, at most 1,000 rows will be returned. + * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * + * 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 rows to return. The service may return + * fewer than this value. If unspecified, at most 1,000 rows will be returned. + * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * + * 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 `FetchReportResultRows` + * call. Provide this to retrieve the second and subsequent batches of rows. + * + * 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 `FetchReportResultRows` + * call. Provide this to retrieve the second and subsequent batches of rows. + * + * 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/AdsAdManager/src/V1/FetchReportResultRowsResponse.php b/AdsAdManager/src/V1/FetchReportResultRowsResponse.php new file mode 100644 index 000000000000..74a9f55c6b63 --- /dev/null +++ b/AdsAdManager/src/V1/FetchReportResultRowsResponse.php @@ -0,0 +1,283 @@ +google.ads.admanager.v1.FetchReportResultRowsResponse + */ +class FetchReportResultRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Up to `page_size` rows of report data. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DataTable.Row rows = 1; + */ + private $rows; + /** + * The time at which the report was scheduled to run. For non-scheduled + * reports, this is the time at which the report was requested to be run. + * + * Generated from protobuf field .google.protobuf.Timestamp run_time = 2; + */ + protected $run_time = null; + /** + * The computed fixed date ranges this report includes. + * Only returned with the first page of results (when page_token is not + * included in the request). + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange date_ranges = 3; + */ + private $date_ranges; + /** + * The computed comparison fixed date ranges this report includes. + * Only returned with the first page of results (when page_token is not + * included in the request). + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange comparison_date_ranges = 4; + */ + private $comparison_date_ranges; + /** + * The total number of rows available from this report. Useful for + * pagination. + * Only returned with the first page of results (when page_token is not + * included in the request). + * + * Generated from protobuf field int32 total_row_count = 5; + */ + protected $total_row_count = 0; + /** + * A token that 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 = 6; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Report\DataTable\Row>|\Google\Protobuf\Internal\RepeatedField $rows + * Up to `page_size` rows of report data. + * @type \Google\Protobuf\Timestamp $run_time + * The time at which the report was scheduled to run. For non-scheduled + * reports, this is the time at which the report was requested to be run. + * @type array<\Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $date_ranges + * The computed fixed date ranges this report includes. + * Only returned with the first page of results (when page_token is not + * included in the request). + * @type array<\Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $comparison_date_ranges + * The computed comparison fixed date ranges this report includes. + * Only returned with the first page of results (when page_token is not + * included in the request). + * @type int $total_row_count + * The total number of rows available from this report. Useful for + * pagination. + * Only returned with the first page of results (when page_token is not + * included in the request). + * @type string $next_page_token + * A token that 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\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Up to `page_size` rows of report data. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DataTable.Row rows = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRows() + { + return $this->rows; + } + + /** + * Up to `page_size` rows of report data. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DataTable.Row rows = 1; + * @param array<\Google\Ads\AdManager\V1\Report\DataTable\Row>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\DataTable\Row::class); + $this->rows = $arr; + + return $this; + } + + /** + * The time at which the report was scheduled to run. For non-scheduled + * reports, this is the time at which the report was requested to be run. + * + * Generated from protobuf field .google.protobuf.Timestamp run_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRunTime() + { + return $this->run_time; + } + + public function hasRunTime() + { + return isset($this->run_time); + } + + public function clearRunTime() + { + unset($this->run_time); + } + + /** + * The time at which the report was scheduled to run. For non-scheduled + * reports, this is the time at which the report was requested to be run. + * + * Generated from protobuf field .google.protobuf.Timestamp run_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRunTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->run_time = $var; + + return $this; + } + + /** + * The computed fixed date ranges this report includes. + * Only returned with the first page of results (when page_token is not + * included in the request). + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange date_ranges = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDateRanges() + { + return $this->date_ranges; + } + + /** + * The computed fixed date ranges this report includes. + * Only returned with the first page of results (when page_token is not + * included in the request). + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange date_ranges = 3; + * @param array<\Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDateRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange::class); + $this->date_ranges = $arr; + + return $this; + } + + /** + * The computed comparison fixed date ranges this report includes. + * Only returned with the first page of results (when page_token is not + * included in the request). + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange comparison_date_ranges = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComparisonDateRanges() + { + return $this->comparison_date_ranges; + } + + /** + * The computed comparison fixed date ranges this report includes. + * Only returned with the first page of results (when page_token is not + * included in the request). + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange comparison_date_ranges = 4; + * @param array<\Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComparisonDateRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange::class); + $this->comparison_date_ranges = $arr; + + return $this; + } + + /** + * The total number of rows available from this report. Useful for + * pagination. + * Only returned with the first page of results (when page_token is not + * included in the request). + * + * Generated from protobuf field int32 total_row_count = 5; + * @return int + */ + public function getTotalRowCount() + { + return $this->total_row_count; + } + + /** + * The total number of rows available from this report. Useful for + * pagination. + * Only returned with the first page of results (when page_token is not + * included in the request). + * + * Generated from protobuf field int32 total_row_count = 5; + * @param int $var + * @return $this + */ + public function setTotalRowCount($var) + { + GPBUtil::checkInt32($var); + $this->total_row_count = $var; + + return $this; + } + + /** + * A token that 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 = 6; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that 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 = 6; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/FrequencyCap.php b/AdsAdManager/src/V1/FrequencyCap.php new file mode 100644 index 000000000000..168ab1cb5f0c --- /dev/null +++ b/AdsAdManager/src/V1/FrequencyCap.php @@ -0,0 +1,165 @@ +google.ads.admanager.v1.FrequencyCap + */ +class FrequencyCap extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of impressions for this frequency cap. + * + * Generated from protobuf field optional int64 max_impressions = 1; + */ + protected $max_impressions = null; + /** + * The number of time units over which the frequency cap is effective. + * + * Generated from protobuf field optional int64 time_amount = 2; + */ + protected $time_amount = null; + /** + * The units of time of this frequency cap. + * + * Generated from protobuf field optional .google.ads.admanager.v1.TimeUnitEnum.TimeUnit time_unit = 3; + */ + protected $time_unit = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $max_impressions + * The maximum number of impressions for this frequency cap. + * @type int|string $time_amount + * The number of time units over which the frequency cap is effective. + * @type int $time_unit + * The units of time of this frequency cap. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\FrequencyCap::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of impressions for this frequency cap. + * + * Generated from protobuf field optional int64 max_impressions = 1; + * @return int|string + */ + public function getMaxImpressions() + { + return isset($this->max_impressions) ? $this->max_impressions : 0; + } + + public function hasMaxImpressions() + { + return isset($this->max_impressions); + } + + public function clearMaxImpressions() + { + unset($this->max_impressions); + } + + /** + * The maximum number of impressions for this frequency cap. + * + * Generated from protobuf field optional int64 max_impressions = 1; + * @param int|string $var + * @return $this + */ + public function setMaxImpressions($var) + { + GPBUtil::checkInt64($var); + $this->max_impressions = $var; + + return $this; + } + + /** + * The number of time units over which the frequency cap is effective. + * + * Generated from protobuf field optional int64 time_amount = 2; + * @return int|string + */ + public function getTimeAmount() + { + return isset($this->time_amount) ? $this->time_amount : 0; + } + + public function hasTimeAmount() + { + return isset($this->time_amount); + } + + public function clearTimeAmount() + { + unset($this->time_amount); + } + + /** + * The number of time units over which the frequency cap is effective. + * + * Generated from protobuf field optional int64 time_amount = 2; + * @param int|string $var + * @return $this + */ + public function setTimeAmount($var) + { + GPBUtil::checkInt64($var); + $this->time_amount = $var; + + return $this; + } + + /** + * The units of time of this frequency cap. + * + * Generated from protobuf field optional .google.ads.admanager.v1.TimeUnitEnum.TimeUnit time_unit = 3; + * @return int + */ + public function getTimeUnit() + { + return isset($this->time_unit) ? $this->time_unit : 0; + } + + public function hasTimeUnit() + { + return isset($this->time_unit); + } + + public function clearTimeUnit() + { + unset($this->time_unit); + } + + /** + * The units of time of this frequency cap. + * + * Generated from protobuf field optional .google.ads.admanager.v1.TimeUnitEnum.TimeUnit time_unit = 3; + * @param int $var + * @return $this + */ + public function setTimeUnit($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\TimeUnitEnum\TimeUnit::class); + $this->time_unit = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetAdUnitRequest.php b/AdsAdManager/src/V1/GetAdUnitRequest.php new file mode 100644 index 000000000000..a359f1d3acaf --- /dev/null +++ b/AdsAdManager/src/V1/GetAdUnitRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetAdUnitRequest + */ +class GetAdUnitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the AdUnit. + * Format: `networks/{network_code}/adUnits/{ad_unit_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the AdUnit. + * Format: `networks/{network_code}/adUnits/{ad_unit_id}` + * Please see {@see AdUnitServiceClient::adUnitName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetAdUnitRequest + * + * @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 resource name of the AdUnit. + * Format: `networks/{network_code}/adUnits/{ad_unit_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the AdUnit. + * Format: `networks/{network_code}/adUnits/{ad_unit_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 resource name of the AdUnit. + * Format: `networks/{network_code}/adUnits/{ad_unit_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/AdsAdManager/src/V1/GetCompanyRequest.php b/AdsAdManager/src/V1/GetCompanyRequest.php new file mode 100644 index 000000000000..6fe5c202376a --- /dev/null +++ b/AdsAdManager/src/V1/GetCompanyRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetCompanyRequest + */ +class GetCompanyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Company. + * Format: `networks/{network_code}/companies/{company_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Company. + * Format: `networks/{network_code}/companies/{company_id}` + * Please see {@see CompanyServiceClient::companyName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetCompanyRequest + * + * @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 resource name of the Company. + * Format: `networks/{network_code}/companies/{company_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CompanyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Company. + * Format: `networks/{network_code}/companies/{company_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 resource name of the Company. + * Format: `networks/{network_code}/companies/{company_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/AdsAdManager/src/V1/GetCustomFieldRequest.php b/AdsAdManager/src/V1/GetCustomFieldRequest.php new file mode 100644 index 000000000000..493ec5fcc0d9 --- /dev/null +++ b/AdsAdManager/src/V1/GetCustomFieldRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetCustomFieldRequest + */ +class GetCustomFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the CustomField. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the CustomField. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * Please see {@see CustomFieldServiceClient::customFieldName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetCustomFieldRequest + * + * @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 resource name of the CustomField. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the CustomField. + * Format: `networks/{network_code}/customFields/{custom_field_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 resource name of the CustomField. + * Format: `networks/{network_code}/customFields/{custom_field_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/AdsAdManager/src/V1/GetCustomTargetingKeyRequest.php b/AdsAdManager/src/V1/GetCustomTargetingKeyRequest.php new file mode 100644 index 000000000000..9499837ddb77 --- /dev/null +++ b/AdsAdManager/src/V1/GetCustomTargetingKeyRequest.php @@ -0,0 +1,91 @@ +google.ads.admanager.v1.GetCustomTargetingKeyRequest + */ +class GetCustomTargetingKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the CustomTargetingKey. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the CustomTargetingKey. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + * Please see {@see CustomTargetingKeyServiceClient::customTargetingKeyName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetCustomTargetingKeyRequest + * + * @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 resource name of the CustomTargetingKey. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingKeyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the CustomTargetingKey. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_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 resource name of the CustomTargetingKey. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_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/AdsAdManager/src/V1/GetCustomTargetingValueRequest.php b/AdsAdManager/src/V1/GetCustomTargetingValueRequest.php new file mode 100644 index 000000000000..e87b9ad62c0e --- /dev/null +++ b/AdsAdManager/src/V1/GetCustomTargetingValueRequest.php @@ -0,0 +1,91 @@ +google.ads.admanager.v1.GetCustomTargetingValueRequest + */ +class GetCustomTargetingValueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the CustomTargetingValue. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the CustomTargetingValue. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + * Please see {@see CustomTargetingValueServiceClient::customTargetingValueName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetCustomTargetingValueRequest + * + * @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 resource name of the CustomTargetingValue. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingValueService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the CustomTargetingValue. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_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 resource name of the CustomTargetingValue. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_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/AdsAdManager/src/V1/GetEntitySignalsMappingRequest.php b/AdsAdManager/src/V1/GetEntitySignalsMappingRequest.php new file mode 100644 index 000000000000..f0b13fadda72 --- /dev/null +++ b/AdsAdManager/src/V1/GetEntitySignalsMappingRequest.php @@ -0,0 +1,91 @@ +google.ads.admanager.v1.GetEntitySignalsMappingRequest + */ +class GetEntitySignalsMappingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the EntitySignalsMapping. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the EntitySignalsMapping. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_id}` + * Please see {@see EntitySignalsMappingServiceClient::entitySignalsMappingName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetEntitySignalsMappingRequest + * + * @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 resource name of the EntitySignalsMapping. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the EntitySignalsMapping. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_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 resource name of the EntitySignalsMapping. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping_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/AdsAdManager/src/V1/GetNetworkRequest.php b/AdsAdManager/src/V1/GetNetworkRequest.php new file mode 100644 index 000000000000..f091d5459079 --- /dev/null +++ b/AdsAdManager/src/V1/GetNetworkRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetNetworkRequest + */ +class GetNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of Network. + * Format: networks/{network_code} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of Network. + * Format: networks/{network_code} + * Please see {@see NetworkServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetNetworkRequest + * + * @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. Resource name of Network. + * Format: networks/{network_code} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\NetworkService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of Network. + * Format: networks/{network_code} + * + * 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. Resource name of Network. + * Format: networks/{network_code} + * + * 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/AdsAdManager/src/V1/GetOrderRequest.php b/AdsAdManager/src/V1/GetOrderRequest.php new file mode 100644 index 000000000000..b2ad956f8023 --- /dev/null +++ b/AdsAdManager/src/V1/GetOrderRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetOrderRequest + */ +class GetOrderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Order. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Order. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetOrderRequest + * + * @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 resource name of the Order. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Order. + * Format: `networks/{network_code}/orders/{order_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 resource name of the Order. + * Format: `networks/{network_code}/orders/{order_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/AdsAdManager/src/V1/GetPlacementRequest.php b/AdsAdManager/src/V1/GetPlacementRequest.php new file mode 100644 index 000000000000..dc0b6f37f542 --- /dev/null +++ b/AdsAdManager/src/V1/GetPlacementRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetPlacementRequest + */ +class GetPlacementRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Placement. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Placement. + * Format: `networks/{network_code}/placements/{placement_id}` + * Please see {@see PlacementServiceClient::placementName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetPlacementRequest + * + * @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 resource name of the Placement. + * Format: `networks/{network_code}/placements/{placement_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Placement. + * Format: `networks/{network_code}/placements/{placement_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 resource name of the Placement. + * Format: `networks/{network_code}/placements/{placement_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/AdsAdManager/src/V1/GetReportRequest.php b/AdsAdManager/src/V1/GetReportRequest.php new file mode 100644 index 000000000000..796bc7046179 --- /dev/null +++ b/AdsAdManager/src/V1/GetReportRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetReportRequest + */ +class GetReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the report. + * Format: `networks/{network_code}/reports/{report_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the report. + * Format: `networks/{network_code}/reports/{report_id}` + * Please see {@see ReportServiceClient::reportName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetReportRequest + * + * @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 resource name of the report. + * Format: `networks/{network_code}/reports/{report_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the report. + * Format: `networks/{network_code}/reports/{report_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 resource name of the report. + * Format: `networks/{network_code}/reports/{report_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/AdsAdManager/src/V1/GetRoleRequest.php b/AdsAdManager/src/V1/GetRoleRequest.php new file mode 100644 index 000000000000..5b5ef57b0bc8 --- /dev/null +++ b/AdsAdManager/src/V1/GetRoleRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetRoleRequest + */ +class GetRoleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Role. + * Format: `networks/{network_code}/roles/{role_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Role. + * Format: `networks/{network_code}/roles/{role_id}` + * Please see {@see RoleServiceClient::roleName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetRoleRequest + * + * @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 resource name of the Role. + * Format: `networks/{network_code}/roles/{role_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\RoleService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Role. + * Format: `networks/{network_code}/roles/{role_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 resource name of the Role. + * Format: `networks/{network_code}/roles/{role_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/AdsAdManager/src/V1/GetTaxonomyCategoryRequest.php b/AdsAdManager/src/V1/GetTaxonomyCategoryRequest.php new file mode 100644 index 000000000000..b0e943d63698 --- /dev/null +++ b/AdsAdManager/src/V1/GetTaxonomyCategoryRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetTaxonomyCategoryRequest + */ +class GetTaxonomyCategoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the TaxonomyCategory. + * Format: `networks/{network_code}/taxonomyCategories/{taxonomy_category_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the TaxonomyCategory. + * Format: `networks/{network_code}/taxonomyCategories/{taxonomy_category_id}` + * Please see {@see TaxonomyCategoryServiceClient::taxonomyCategoryName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetTaxonomyCategoryRequest + * + * @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 resource name of the TaxonomyCategory. + * Format: `networks/{network_code}/taxonomyCategories/{taxonomy_category_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TaxonomyCategoryService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the TaxonomyCategory. + * Format: `networks/{network_code}/taxonomyCategories/{taxonomy_category_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 resource name of the TaxonomyCategory. + * Format: `networks/{network_code}/taxonomyCategories/{taxonomy_category_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/AdsAdManager/src/V1/GetUserRequest.php b/AdsAdManager/src/V1/GetUserRequest.php new file mode 100644 index 000000000000..602f87ff62d3 --- /dev/null +++ b/AdsAdManager/src/V1/GetUserRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetUserRequest + */ +class GetUserRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the User. + * Format: `networks/{network_code}/users/{user_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the User. + * Format: `networks/{network_code}/users/{user_id}` + * Please see {@see UserServiceClient::userName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetUserRequest + * + * @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 resource name of the User. + * Format: `networks/{network_code}/users/{user_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the User. + * Format: `networks/{network_code}/users/{user_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 resource name of the User. + * Format: `networks/{network_code}/users/{user_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/AdsAdManager/src/V1/Label.php b/AdsAdManager/src/V1/Label.php new file mode 100644 index 000000000000..246b02a2b2c7 --- /dev/null +++ b/AdsAdManager/src/V1/Label.php @@ -0,0 +1,71 @@ +google.ads.admanager.v1.Label + */ +class Label extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Label`. + * Format: `networks/{network_code}/labels/{label_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Label`. + * Format: `networks/{network_code}/labels/{label_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\LabelMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Label`. + * Format: `networks/{network_code}/labels/{label_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 `Label`. + * Format: `networks/{network_code}/labels/{label_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; + } + +} + diff --git a/AdsAdManager/src/V1/LabelFrequencyCap.php b/AdsAdManager/src/V1/LabelFrequencyCap.php new file mode 100644 index 000000000000..114c8b3e3776 --- /dev/null +++ b/AdsAdManager/src/V1/LabelFrequencyCap.php @@ -0,0 +1,115 @@ +google.ads.admanager.v1.LabelFrequencyCap + */ +class LabelFrequencyCap extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The label to used for frequency capping. + * Format: "networks/{network_code}/labels/{label_id}" + * + * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $label = ''; + /** + * The frequency cap. + * + * Generated from protobuf field .google.ads.admanager.v1.FrequencyCap frequency_cap = 2; + */ + protected $frequency_cap = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $label + * Required. The label to used for frequency capping. + * Format: "networks/{network_code}/labels/{label_id}" + * @type \Google\Ads\AdManager\V1\FrequencyCap $frequency_cap + * The frequency cap. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitMessages::initOnce(); + parent::__construct($data); + } + + /** + * Required. The label to used for frequency capping. + * Format: "networks/{network_code}/labels/{label_id}" + * + * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Required. The label to used for frequency capping. + * Format: "networks/{network_code}/labels/{label_id}" + * + * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * The frequency cap. + * + * Generated from protobuf field .google.ads.admanager.v1.FrequencyCap frequency_cap = 2; + * @return \Google\Ads\AdManager\V1\FrequencyCap|null + */ + public function getFrequencyCap() + { + return $this->frequency_cap; + } + + public function hasFrequencyCap() + { + return isset($this->frequency_cap); + } + + public function clearFrequencyCap() + { + unset($this->frequency_cap); + } + + /** + * The frequency cap. + * + * Generated from protobuf field .google.ads.admanager.v1.FrequencyCap frequency_cap = 2; + * @param \Google\Ads\AdManager\V1\FrequencyCap $var + * @return $this + */ + public function setFrequencyCap($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\FrequencyCap::class); + $this->frequency_cap = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListAdUnitSizesRequest.php b/AdsAdManager/src/V1/ListAdUnitSizesRequest.php new file mode 100644 index 000000000000..14020cd4f7ef --- /dev/null +++ b/AdsAdManager/src/V1/ListAdUnitSizesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListAdUnitSizesRequest + */ +class ListAdUnitSizesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of AdUnitSizes. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of AdUnitSizes to return. The service may + * return fewer than this value. If unspecified, at most 50 ad unit sizes 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 `ListAdUnitSizes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAdUnitSizes` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of AdUnitSizes. + * Format: `networks/{network_code}` + * Please see {@see AdUnitServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListAdUnitSizesRequest + * + * @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, which owns this collection of AdUnitSizes. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of AdUnitSizes to return. The service may + * return fewer than this value. If unspecified, at most 50 ad unit sizes 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 `ListAdUnitSizes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAdUnitSizes` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of AdUnitSizes. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of AdUnitSizes. + * Format: `networks/{network_code}` + * + * 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 AdUnitSizes to return. The service may + * return fewer than this value. If unspecified, at most 50 ad unit sizes 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 AdUnitSizes to return. The service may + * return fewer than this value. If unspecified, at most 50 ad unit sizes 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 `ListAdUnitSizes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAdUnitSizes` 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 `ListAdUnitSizes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAdUnitSizes` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListAdUnitSizesResponse.php b/AdsAdManager/src/V1/ListAdUnitSizesResponse.php new file mode 100644 index 000000000000..c9b275f95ca0 --- /dev/null +++ b/AdsAdManager/src/V1/ListAdUnitSizesResponse.php @@ -0,0 +1,171 @@ +google.ads.admanager.v1.ListAdUnitSizesResponse + */ +class ListAdUnitSizesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The AdUnitSizes from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 1; + */ + private $ad_unit_sizes; + /** + * 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 = ''; + /** + * Total number of AdUnitSizes. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\AdUnitSize>|\Google\Protobuf\Internal\RepeatedField $ad_unit_sizes + * The AdUnitSizes from the specified network. + * @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. + * @type int $total_size + * Total number of AdUnitSizes. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitService::initOnce(); + parent::__construct($data); + } + + /** + * The AdUnitSizes from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdUnitSizes() + { + return $this->ad_unit_sizes; + } + + /** + * The AdUnitSizes from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnitSize ad_unit_sizes = 1; + * @param array<\Google\Ads\AdManager\V1\AdUnitSize>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdUnitSizes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AdUnitSize::class); + $this->ad_unit_sizes = $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; + } + + /** + * Total number of AdUnitSizes. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of AdUnitSizes. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListAdUnitsRequest.php b/AdsAdManager/src/V1/ListAdUnitsRequest.php new file mode 100644 index 000000000000..a026663a9637 --- /dev/null +++ b/AdsAdManager/src/V1/ListAdUnitsRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListAdUnitsRequest + */ +class ListAdUnitsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of AdUnits. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of AdUnits to return. The service may return + * fewer than this value. If unspecified, at most 50 ad units 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 `ListAdUnits` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAdUnits` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of AdUnits. + * Format: `networks/{network_code}` + * Please see {@see AdUnitServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListAdUnitsRequest + * + * @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, which owns this collection of AdUnits. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of AdUnits to return. The service may return + * fewer than this value. If unspecified, at most 50 ad units 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 `ListAdUnits` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAdUnits` must match + * the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of AdUnits. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of AdUnits. + * Format: `networks/{network_code}` + * + * 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 AdUnits to return. The service may return + * fewer than this value. If unspecified, at most 50 ad units 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 AdUnits to return. The service may return + * fewer than this value. If unspecified, at most 50 ad units 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 `ListAdUnits` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAdUnits` 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 `ListAdUnits` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAdUnits` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListAdUnitsResponse.php b/AdsAdManager/src/V1/ListAdUnitsResponse.php new file mode 100644 index 000000000000..455e35caede7 --- /dev/null +++ b/AdsAdManager/src/V1/ListAdUnitsResponse.php @@ -0,0 +1,171 @@ +google.ads.admanager.v1.ListAdUnitsResponse + */ +class ListAdUnitsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The AdUnit from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnit ad_units = 1; + */ + private $ad_units; + /** + * 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 = ''; + /** + * Total number of AdUnits. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\AdUnit>|\Google\Protobuf\Internal\RepeatedField $ad_units + * The AdUnit from the specified network. + * @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. + * @type int $total_size + * Total number of AdUnits. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitService::initOnce(); + parent::__construct($data); + } + + /** + * The AdUnit from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnit ad_units = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdUnits() + { + return $this->ad_units; + } + + /** + * The AdUnit from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdUnit ad_units = 1; + * @param array<\Google\Ads\AdManager\V1\AdUnit>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdUnits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AdUnit::class); + $this->ad_units = $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; + } + + /** + * Total number of AdUnits. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of AdUnits. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCompaniesRequest.php b/AdsAdManager/src/V1/ListCompaniesRequest.php new file mode 100644 index 000000000000..92854e1e909c --- /dev/null +++ b/AdsAdManager/src/V1/ListCompaniesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListCompaniesRequest + */ +class ListCompaniesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Companies. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Companies` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Companies` 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 `ListCompanies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCompanies` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Companies. + * Format: `networks/{network_code}` + * Please see {@see CompanyServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListCompaniesRequest + * + * @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, which owns this collection of Companies. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Companies` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Companies` 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 `ListCompanies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCompanies` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CompanyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Companies. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of Companies. + * Format: `networks/{network_code}` + * + * 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 `Companies` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Companies` 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 `Companies` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Companies` 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 `ListCompanies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCompanies` 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 `ListCompanies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCompanies` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCompaniesResponse.php b/AdsAdManager/src/V1/ListCompaniesResponse.php new file mode 100644 index 000000000000..2dc511fcdc1e --- /dev/null +++ b/AdsAdManager/src/V1/ListCompaniesResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListCompaniesResponse + */ +class ListCompaniesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Company` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Company companies = 1; + */ + private $companies; + /** + * 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 = ''; + /** + * Total number of `Company` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Company>|\Google\Protobuf\Internal\RepeatedField $companies + * The `Company` objects from the specified network. + * @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. + * @type int $total_size + * Total number of `Company` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CompanyService::initOnce(); + parent::__construct($data); + } + + /** + * The `Company` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Company companies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompanies() + { + return $this->companies; + } + + /** + * The `Company` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Company companies = 1; + * @param array<\Google\Ads\AdManager\V1\Company>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompanies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Company::class); + $this->companies = $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; + } + + /** + * Total number of `Company` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Company` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCustomFieldsRequest.php b/AdsAdManager/src/V1/ListCustomFieldsRequest.php new file mode 100644 index 000000000000..503b26124a12 --- /dev/null +++ b/AdsAdManager/src/V1/ListCustomFieldsRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListCustomFieldsRequest + */ +class ListCustomFieldsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of CustomFields. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `CustomFields` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CustomFields` + * 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 `ListCustomFields` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomFields` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of CustomFields. + * Format: `networks/{network_code}` + * Please see {@see CustomFieldServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListCustomFieldsRequest + * + * @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, which owns this collection of CustomFields. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `CustomFields` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CustomFields` + * 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 `ListCustomFields` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomFields` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of CustomFields. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of CustomFields. + * Format: `networks/{network_code}` + * + * 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 `CustomFields` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CustomFields` + * 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 `CustomFields` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CustomFields` + * 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 `ListCustomFields` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomFields` 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 `ListCustomFields` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomFields` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCustomFieldsResponse.php b/AdsAdManager/src/V1/ListCustomFieldsResponse.php new file mode 100644 index 000000000000..0309c4dbb01a --- /dev/null +++ b/AdsAdManager/src/V1/ListCustomFieldsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListCustomFieldsResponse + */ +class ListCustomFieldsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `CustomField` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomField custom_fields = 1; + */ + private $custom_fields; + /** + * 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 = ''; + /** + * Total number of `CustomField` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\CustomField>|\Google\Protobuf\Internal\RepeatedField $custom_fields + * The `CustomField` objects from the specified network. + * @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. + * @type int $total_size + * Total number of `CustomField` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * The `CustomField` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomField custom_fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomFields() + { + return $this->custom_fields; + } + + /** + * The `CustomField` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomField custom_fields = 1; + * @param array<\Google\Ads\AdManager\V1\CustomField>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomField::class); + $this->custom_fields = $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; + } + + /** + * Total number of `CustomField` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `CustomField` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCustomTargetingKeysRequest.php b/AdsAdManager/src/V1/ListCustomTargetingKeysRequest.php new file mode 100644 index 000000000000..bf474f6a2a8f --- /dev/null +++ b/AdsAdManager/src/V1/ListCustomTargetingKeysRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListCustomTargetingKeysRequest + */ +class ListCustomTargetingKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of CustomTargetingKeys. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `CustomTargetingKeys` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `CustomTargetingKeys` 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 `ListCustomTargetingKeys` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomTargetingKeys` + * 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of CustomTargetingKeys. + * Format: `networks/{network_code}` + * Please see {@see CustomTargetingKeyServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListCustomTargetingKeysRequest + * + * @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, which owns this collection of CustomTargetingKeys. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `CustomTargetingKeys` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `CustomTargetingKeys` 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 `ListCustomTargetingKeys` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomTargetingKeys` + * must match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingKeyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of CustomTargetingKeys. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of CustomTargetingKeys. + * Format: `networks/{network_code}` + * + * 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 `CustomTargetingKeys` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `CustomTargetingKeys` 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 `CustomTargetingKeys` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `CustomTargetingKeys` 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 `ListCustomTargetingKeys` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomTargetingKeys` + * 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 `ListCustomTargetingKeys` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomTargetingKeys` + * 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCustomTargetingKeysResponse.php b/AdsAdManager/src/V1/ListCustomTargetingKeysResponse.php new file mode 100644 index 000000000000..891f1e3aff20 --- /dev/null +++ b/AdsAdManager/src/V1/ListCustomTargetingKeysResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListCustomTargetingKeysResponse + */ +class ListCustomTargetingKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `CustomTargetingKey` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomTargetingKey custom_targeting_keys = 1; + */ + private $custom_targeting_keys; + /** + * 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 = ''; + /** + * Total number of `CustomTargetingKey` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\CustomTargetingKey>|\Google\Protobuf\Internal\RepeatedField $custom_targeting_keys + * The `CustomTargetingKey` objects from the specified network. + * @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. + * @type int $total_size + * Total number of `CustomTargetingKey` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingKeyService::initOnce(); + parent::__construct($data); + } + + /** + * The `CustomTargetingKey` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomTargetingKey custom_targeting_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomTargetingKeys() + { + return $this->custom_targeting_keys; + } + + /** + * The `CustomTargetingKey` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomTargetingKey custom_targeting_keys = 1; + * @param array<\Google\Ads\AdManager\V1\CustomTargetingKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomTargetingKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomTargetingKey::class); + $this->custom_targeting_keys = $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; + } + + /** + * Total number of `CustomTargetingKey` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `CustomTargetingKey` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCustomTargetingValuesRequest.php b/AdsAdManager/src/V1/ListCustomTargetingValuesRequest.php new file mode 100644 index 000000000000..8c2c089c1da0 --- /dev/null +++ b/AdsAdManager/src/V1/ListCustomTargetingValuesRequest.php @@ -0,0 +1,309 @@ +google.ads.admanager.v1.ListCustomTargetingValuesRequest + */ +class ListCustomTargetingValuesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of CustomTargetingValues. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `CustomTargetingValues` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `CustomTargetingValues` 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 + * `ListCustomTargetingValues` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListCustomTargetingValues` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of CustomTargetingValues. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + * Please see {@see CustomTargetingValueServiceClient::customTargetingKeyName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListCustomTargetingValuesRequest + * + * @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, which owns this collection of CustomTargetingValues. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + * @type int $page_size + * Optional. The maximum number of `CustomTargetingValues` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `CustomTargetingValues` 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 + * `ListCustomTargetingValues` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListCustomTargetingValues` must match the call that provided the page + * token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingValueService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of CustomTargetingValues. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_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, which owns this collection of CustomTargetingValues. + * Format: + * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_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 `CustomTargetingValues` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `CustomTargetingValues` 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 `CustomTargetingValues` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `CustomTargetingValues` 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 + * `ListCustomTargetingValues` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListCustomTargetingValues` 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 + * `ListCustomTargetingValues` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListCustomTargetingValues` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCustomTargetingValuesResponse.php b/AdsAdManager/src/V1/ListCustomTargetingValuesResponse.php new file mode 100644 index 000000000000..e1711c0af28f --- /dev/null +++ b/AdsAdManager/src/V1/ListCustomTargetingValuesResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListCustomTargetingValuesResponse + */ +class ListCustomTargetingValuesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `CustomTargetingValue` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomTargetingValue custom_targeting_values = 1; + */ + private $custom_targeting_values; + /** + * 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 = ''; + /** + * Total number of `CustomTargetingValue` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\CustomTargetingValue>|\Google\Protobuf\Internal\RepeatedField $custom_targeting_values + * The `CustomTargetingValue` objects from the specified network. + * @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. + * @type int $total_size + * Total number of `CustomTargetingValue` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomTargetingValueService::initOnce(); + parent::__construct($data); + } + + /** + * The `CustomTargetingValue` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomTargetingValue custom_targeting_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomTargetingValues() + { + return $this->custom_targeting_values; + } + + /** + * The `CustomTargetingValue` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomTargetingValue custom_targeting_values = 1; + * @param array<\Google\Ads\AdManager\V1\CustomTargetingValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomTargetingValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomTargetingValue::class); + $this->custom_targeting_values = $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; + } + + /** + * Total number of `CustomTargetingValue` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `CustomTargetingValue` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListEntitySignalsMappingsRequest.php b/AdsAdManager/src/V1/ListEntitySignalsMappingsRequest.php new file mode 100644 index 000000000000..a4a2945b87fe --- /dev/null +++ b/AdsAdManager/src/V1/ListEntitySignalsMappingsRequest.php @@ -0,0 +1,304 @@ +google.ads.admanager.v1.ListEntitySignalsMappingsRequest + */ +class ListEntitySignalsMappingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of EntitySignalsMappings. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `EntitySignalsMappings` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `EntitySignalsMappings` 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 + * `ListEntitySignalsMappings` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListEntitySignalsMappings` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of EntitySignalsMappings. + * Format: `networks/{network_code}` + * Please see {@see EntitySignalsMappingServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListEntitySignalsMappingsRequest + * + * @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, which owns this collection of EntitySignalsMappings. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `EntitySignalsMappings` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `EntitySignalsMappings` 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 + * `ListEntitySignalsMappings` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListEntitySignalsMappings` must match the call that provided the page + * token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of EntitySignalsMappings. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of EntitySignalsMappings. + * Format: `networks/{network_code}` + * + * 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 `EntitySignalsMappings` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `EntitySignalsMappings` 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 `EntitySignalsMappings` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `EntitySignalsMappings` 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 + * `ListEntitySignalsMappings` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListEntitySignalsMappings` 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 + * `ListEntitySignalsMappings` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListEntitySignalsMappings` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListEntitySignalsMappingsResponse.php b/AdsAdManager/src/V1/ListEntitySignalsMappingsResponse.php new file mode 100644 index 000000000000..9cd5bb39eea0 --- /dev/null +++ b/AdsAdManager/src/V1/ListEntitySignalsMappingsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListEntitySignalsMappingsResponse + */ +class ListEntitySignalsMappingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `EntitySignalsMapping` from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mappings = 1; + */ + private $entity_signals_mappings; + /** + * 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 = ''; + /** + * Total number of `EntitySignalsMappings`. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\EntitySignalsMapping>|\Google\Protobuf\Internal\RepeatedField $entity_signals_mappings + * The `EntitySignalsMapping` from the specified network. + * @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. + * @type int $total_size + * Total number of `EntitySignalsMappings`. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingService::initOnce(); + parent::__construct($data); + } + + /** + * The `EntitySignalsMapping` from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mappings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntitySignalsMappings() + { + return $this->entity_signals_mappings; + } + + /** + * The `EntitySignalsMapping` from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mappings = 1; + * @param array<\Google\Ads\AdManager\V1\EntitySignalsMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntitySignalsMappings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\EntitySignalsMapping::class); + $this->entity_signals_mappings = $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; + } + + /** + * Total number of `EntitySignalsMappings`. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `EntitySignalsMappings`. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListNetworksRequest.php b/AdsAdManager/src/V1/ListNetworksRequest.php new file mode 100644 index 000000000000..533cdfe2486e --- /dev/null +++ b/AdsAdManager/src/V1/ListNetworksRequest.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.ListNetworksRequest + */ +class ListNetworksRequest extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\NetworkService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/ListNetworksResponse.php b/AdsAdManager/src/V1/ListNetworksResponse.php new file mode 100644 index 000000000000..0e19406e6bf5 --- /dev/null +++ b/AdsAdManager/src/V1/ListNetworksResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.ListNetworksResponse + */ +class ListNetworksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Network`s a user has access to. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Network networks = 1; + */ + private $networks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Network>|\Google\Protobuf\Internal\RepeatedField $networks + * The `Network`s a user has access to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\NetworkService::initOnce(); + parent::__construct($data); + } + + /** + * The `Network`s a user has access to. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Network networks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworks() + { + return $this->networks; + } + + /** + * The `Network`s a user has access to. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Network networks = 1; + * @param array<\Google\Ads\AdManager\V1\Network>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Network::class); + $this->networks = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListOrdersRequest.php b/AdsAdManager/src/V1/ListOrdersRequest.php new file mode 100644 index 000000000000..3aad5cd01b81 --- /dev/null +++ b/AdsAdManager/src/V1/ListOrdersRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListOrdersRequest + */ +class ListOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Orders` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Orders` 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 `ListOrders` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListOrders` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListOrdersRequest + * + * @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, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Orders` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Orders` 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 `ListOrders` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListOrders` must match + * the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of Orders. + * Format: `networks/{network_code}` + * + * 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 `Orders` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Orders` 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 `Orders` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Orders` 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 `ListOrders` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListOrders` 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 `ListOrders` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListOrders` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListOrdersResponse.php b/AdsAdManager/src/V1/ListOrdersResponse.php new file mode 100644 index 000000000000..d8f3a73eeeee --- /dev/null +++ b/AdsAdManager/src/V1/ListOrdersResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListOrdersResponse + */ +class ListOrdersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Order` from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Order orders = 1; + */ + private $orders; + /** + * 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 = ''; + /** + * Total number of `Orders`. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Order>|\Google\Protobuf\Internal\RepeatedField $orders + * The `Order` from the specified network. + * @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. + * @type int $total_size + * Total number of `Orders`. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * The `Order` from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Order orders = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOrders() + { + return $this->orders; + } + + /** + * The `Order` from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Order orders = 1; + * @param array<\Google\Ads\AdManager\V1\Order>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOrders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Order::class); + $this->orders = $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; + } + + /** + * Total number of `Orders`. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Orders`. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListPlacementsRequest.php b/AdsAdManager/src/V1/ListPlacementsRequest.php new file mode 100644 index 000000000000..0c728e44c3de --- /dev/null +++ b/AdsAdManager/src/V1/ListPlacementsRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListPlacementsRequest + */ +class ListPlacementsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Placements. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Placements` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Placements` 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 `ListPlacements` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPlacements` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Placements. + * Format: `networks/{network_code}` + * Please see {@see PlacementServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListPlacementsRequest + * + * @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, which owns this collection of Placements. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Placements` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Placements` 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 `ListPlacements` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPlacements` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Placements. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of Placements. + * Format: `networks/{network_code}` + * + * 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 `Placements` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Placements` 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 `Placements` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Placements` 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 `ListPlacements` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPlacements` 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 `ListPlacements` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPlacements` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListPlacementsResponse.php b/AdsAdManager/src/V1/ListPlacementsResponse.php new file mode 100644 index 000000000000..0d509198484e --- /dev/null +++ b/AdsAdManager/src/V1/ListPlacementsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListPlacementsResponse + */ +class ListPlacementsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Placement` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Placement placements = 1; + */ + private $placements; + /** + * 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 = ''; + /** + * Total number of `Placement` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Placement>|\Google\Protobuf\Internal\RepeatedField $placements + * The `Placement` objects from the specified network. + * @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. + * @type int $total_size + * Total number of `Placement` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * The `Placement` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Placement placements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPlacements() + { + return $this->placements; + } + + /** + * The `Placement` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Placement placements = 1; + * @param array<\Google\Ads\AdManager\V1\Placement>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPlacements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Placement::class); + $this->placements = $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; + } + + /** + * Total number of `Placement` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Placement` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListReportsRequest.php b/AdsAdManager/src/V1/ListReportsRequest.php new file mode 100644 index 000000000000..4f9ef229c9d0 --- /dev/null +++ b/AdsAdManager/src/V1/ListReportsRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListReportsRequest + */ +class ListReportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of reports. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Reports` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Reports` 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 `ListReports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReports` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of reports. + * Format: `networks/{network_code}` + * Please see {@see ReportServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListReportsRequest + * + * @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, which owns this collection of reports. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Reports` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Reports` 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 `ListReports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReports` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of reports. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of reports. + * Format: `networks/{network_code}` + * + * 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 `Reports` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Reports` 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 `Reports` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Reports` 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 `ListReports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReports` 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 `ListReports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReports` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListReportsResponse.php b/AdsAdManager/src/V1/ListReportsResponse.php new file mode 100644 index 000000000000..7acc7238699f --- /dev/null +++ b/AdsAdManager/src/V1/ListReportsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListReportsResponse + */ +class ListReportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Report` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report reports = 1; + */ + private $reports; + /** + * 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 = ''; + /** + * Total number of `Report` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Report>|\Google\Protobuf\Internal\RepeatedField $reports + * The `Report` objects from the specified network. + * @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. + * @type int $total_size + * Total number of `Report` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * The `Report` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report reports = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReports() + { + return $this->reports; + } + + /** + * The `Report` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report reports = 1; + * @param array<\Google\Ads\AdManager\V1\Report>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report::class); + $this->reports = $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; + } + + /** + * Total number of `Report` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Report` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListRolesRequest.php b/AdsAdManager/src/V1/ListRolesRequest.php new file mode 100644 index 000000000000..ae086b8ea872 --- /dev/null +++ b/AdsAdManager/src/V1/ListRolesRequest.php @@ -0,0 +1,292 @@ +google.ads.admanager.v1.ListRolesRequest + */ +class ListRolesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Roles. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Roles` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Roles` 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 `ListRoles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRoles` 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Roles. + * Format: `networks/{network_code}` + * Please see {@see RoleServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListRolesRequest + * + * @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, which owns this collection of Roles. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Roles` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Roles` 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 `ListRoles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRoles` must match + * the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\RoleService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Roles. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of Roles. + * Format: `networks/{network_code}` + * + * 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 `Roles` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Roles` 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 `Roles` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Roles` 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 `ListRoles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRoles` 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 `ListRoles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListRoles` 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListRolesResponse.php b/AdsAdManager/src/V1/ListRolesResponse.php new file mode 100644 index 000000000000..6eb4ef45ab2c --- /dev/null +++ b/AdsAdManager/src/V1/ListRolesResponse.php @@ -0,0 +1,171 @@ +google.ads.admanager.v1.ListRolesResponse + */ +class ListRolesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Role` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Role roles = 1; + */ + private $roles; + /** + * 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 = ''; + /** + * Total number of `Role` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Role>|\Google\Protobuf\Internal\RepeatedField $roles + * The `Role` objects from the specified network. + * @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. + * @type int $total_size + * Total number of `Role` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\RoleService::initOnce(); + parent::__construct($data); + } + + /** + * The `Role` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Role roles = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoles() + { + return $this->roles; + } + + /** + * The `Role` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Role roles = 1; + * @param array<\Google\Ads\AdManager\V1\Role>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Role::class); + $this->roles = $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; + } + + /** + * Total number of `Role` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Role` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListTaxonomyCategoriesRequest.php b/AdsAdManager/src/V1/ListTaxonomyCategoriesRequest.php new file mode 100644 index 000000000000..fcbb1bb1167d --- /dev/null +++ b/AdsAdManager/src/V1/ListTaxonomyCategoriesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListTaxonomyCategoriesRequest + */ +class ListTaxonomyCategoriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of TaxonomyCategories. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `TaxonomyCategories` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `TaxonomyCategories` 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 `ListTaxonomyCategories` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTaxonomyCategories` + * 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 = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of TaxonomyCategories. + * Format: `networks/{network_code}` + * Please see {@see TaxonomyCategoryServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListTaxonomyCategoriesRequest + * + * @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, which owns this collection of TaxonomyCategories. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `TaxonomyCategories` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `TaxonomyCategories` 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 `ListTaxonomyCategories` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTaxonomyCategories` + * must match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TaxonomyCategoryService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of TaxonomyCategories. + * Format: `networks/{network_code}` + * + * 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, which owns this collection of TaxonomyCategories. + * Format: `networks/{network_code}` + * + * 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 `TaxonomyCategories` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `TaxonomyCategories` 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 `TaxonomyCategories` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `TaxonomyCategories` 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 `ListTaxonomyCategories` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTaxonomyCategories` + * 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 `ListTaxonomyCategories` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTaxonomyCategories` + * 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; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListTaxonomyCategoriesResponse.php b/AdsAdManager/src/V1/ListTaxonomyCategoriesResponse.php new file mode 100644 index 000000000000..66c311184902 --- /dev/null +++ b/AdsAdManager/src/V1/ListTaxonomyCategoriesResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListTaxonomyCategoriesResponse + */ +class ListTaxonomyCategoriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `TaxonomyCategory` objects. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.TaxonomyCategory taxonomy_categories = 1; + */ + private $taxonomy_categories; + /** + * 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 = ''; + /** + * Total number of `TaxonomyCategory` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\TaxonomyCategory>|\Google\Protobuf\Internal\RepeatedField $taxonomy_categories + * The `TaxonomyCategory` objects. + * @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. + * @type int $total_size + * Total number of `TaxonomyCategory` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TaxonomyCategoryService::initOnce(); + parent::__construct($data); + } + + /** + * The `TaxonomyCategory` objects. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.TaxonomyCategory taxonomy_categories = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTaxonomyCategories() + { + return $this->taxonomy_categories; + } + + /** + * The `TaxonomyCategory` objects. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.TaxonomyCategory taxonomy_categories = 1; + * @param array<\Google\Ads\AdManager\V1\TaxonomyCategory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTaxonomyCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\TaxonomyCategory::class); + $this->taxonomy_categories = $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; + } + + /** + * Total number of `TaxonomyCategory` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `TaxonomyCategory` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` will not be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Network.php b/AdsAdManager/src/V1/Network.php new file mode 100644 index 000000000000..b4bb7bf928fe --- /dev/null +++ b/AdsAdManager/src/V1/Network.php @@ -0,0 +1,393 @@ +google.ads.admanager.v1.Network + */ +class Network extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the Network. + * Format: networks/{network_code} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Display name for Network. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. Network Code. + * + * Generated from protobuf field string network_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $network_code = ''; + /** + * Output only. Property code. + * + * Generated from protobuf field string property_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $property_code = ''; + /** + * Output only. Time zone associated with the delivery of orders and + * reporting. + * + * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $time_zone = ''; + /** + * Output only. Primary currency code, in ISO-4217 format. + * + * Generated from protobuf field string currency_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $currency_code = ''; + /** + * Optional. Currency codes that can be used as an alternative to the primary + * currency code for trafficking Line Items. + * + * Generated from protobuf field repeated string secondary_currency_codes = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $secondary_currency_codes; + /** + * Output only. Top most [Ad Unit](google.ads.admanager.v1.AdUnit) to which + * descendant Ad Units can be added. + * Format: networks/{network_code}/adUnit/{ad_unit_id} + * + * Generated from protobuf field string effective_root_ad_unit = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $effective_root_ad_unit = ''; + /** + * Output only. Whether this is a test network. + * + * Generated from protobuf field bool test_network = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $test_network = false; + /** + * Output only. Network ID. + * + * Generated from protobuf field int64 network_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $network_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the Network. + * Format: networks/{network_code} + * @type string $display_name + * Optional. Display name for Network. + * @type string $network_code + * Output only. Network Code. + * @type string $property_code + * Output only. Property code. + * @type string $time_zone + * Output only. Time zone associated with the delivery of orders and + * reporting. + * @type string $currency_code + * Output only. Primary currency code, in ISO-4217 format. + * @type array|\Google\Protobuf\Internal\RepeatedField $secondary_currency_codes + * Optional. Currency codes that can be used as an alternative to the primary + * currency code for trafficking Line Items. + * @type string $effective_root_ad_unit + * Output only. Top most [Ad Unit](google.ads.admanager.v1.AdUnit) to which + * descendant Ad Units can be added. + * Format: networks/{network_code}/adUnit/{ad_unit_id} + * @type bool $test_network + * Output only. Whether this is a test network. + * @type int|string $network_id + * Output only. Network ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\NetworkMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the Network. + * Format: networks/{network_code} + * + * 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 Network. + * Format: networks/{network_code} + * + * 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; + } + + /** + * Optional. Display name for Network. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Display name for Network. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Network Code. + * + * Generated from protobuf field string network_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNetworkCode() + { + return $this->network_code; + } + + /** + * Output only. Network Code. + * + * Generated from protobuf field string network_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNetworkCode($var) + { + GPBUtil::checkString($var, True); + $this->network_code = $var; + + return $this; + } + + /** + * Output only. Property code. + * + * Generated from protobuf field string property_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPropertyCode() + { + return $this->property_code; + } + + /** + * Output only. Property code. + * + * Generated from protobuf field string property_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPropertyCode($var) + { + GPBUtil::checkString($var, True); + $this->property_code = $var; + + return $this; + } + + /** + * Output only. Time zone associated with the delivery of orders and + * reporting. + * + * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Output only. Time zone associated with the delivery of orders and + * reporting. + * + * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Output only. Primary currency code, in ISO-4217 format. + * + * Generated from protobuf field string currency_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCurrencyCode() + { + return $this->currency_code; + } + + /** + * Output only. Primary currency code, in ISO-4217 format. + * + * Generated from protobuf field string currency_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCurrencyCode($var) + { + GPBUtil::checkString($var, True); + $this->currency_code = $var; + + return $this; + } + + /** + * Optional. Currency codes that can be used as an alternative to the primary + * currency code for trafficking Line Items. + * + * Generated from protobuf field repeated string secondary_currency_codes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecondaryCurrencyCodes() + { + return $this->secondary_currency_codes; + } + + /** + * Optional. Currency codes that can be used as an alternative to the primary + * currency code for trafficking Line Items. + * + * Generated from protobuf field repeated string secondary_currency_codes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecondaryCurrencyCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->secondary_currency_codes = $arr; + + return $this; + } + + /** + * Output only. Top most [Ad Unit](google.ads.admanager.v1.AdUnit) to which + * descendant Ad Units can be added. + * Format: networks/{network_code}/adUnit/{ad_unit_id} + * + * Generated from protobuf field string effective_root_ad_unit = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getEffectiveRootAdUnit() + { + return $this->effective_root_ad_unit; + } + + /** + * Output only. Top most [Ad Unit](google.ads.admanager.v1.AdUnit) to which + * descendant Ad Units can be added. + * Format: networks/{network_code}/adUnit/{ad_unit_id} + * + * Generated from protobuf field string effective_root_ad_unit = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEffectiveRootAdUnit($var) + { + GPBUtil::checkString($var, True); + $this->effective_root_ad_unit = $var; + + return $this; + } + + /** + * Output only. Whether this is a test network. + * + * Generated from protobuf field bool test_network = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getTestNetwork() + { + return $this->test_network; + } + + /** + * Output only. Whether this is a test network. + * + * Generated from protobuf field bool test_network = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setTestNetwork($var) + { + GPBUtil::checkBool($var); + $this->test_network = $var; + + return $this; + } + + /** + * Output only. Network ID. + * + * Generated from protobuf field int64 network_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getNetworkId() + { + return $this->network_id; + } + + /** + * Output only. Network ID. + * + * Generated from protobuf field int64 network_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setNetworkId($var) + { + GPBUtil::checkInt64($var); + $this->network_id = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Order.php b/AdsAdManager/src/V1/Order.php new file mode 100644 index 000000000000..e6925980903c --- /dev/null +++ b/AdsAdManager/src/V1/Order.php @@ -0,0 +1,1169 @@ +google.ads.admanager.v1.Order + */ +class Order extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Order`. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Order ID. + * + * Generated from protobuf field int64 order_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $order_id = 0; + /** + * Required. The display name of the Order. This value has a maximum length + * of 255 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Specifies whether or not the Order is a programmatic order. + * + * Generated from protobuf field bool programmatic = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $programmatic = false; + /** + * Required. The resource name of the User responsible for trafficking the + * Order. Format: "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field string trafficker = 23 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $trafficker = ''; + /** + * Optional. The resource names of Contacts from the advertiser of this Order. + * Format: "networks/{network_code}/contacts/{contact_id}" + * + * Generated from protobuf field repeated string advertiser_contacts = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $advertiser_contacts; + /** + * Required. The resource name of the Company, which is of type + * Company.Type.ADVERTISER, to which this order belongs. Format: + * "networks/{network_code}/companies/{company_id}" + * + * Generated from protobuf field string advertiser = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $advertiser = ''; + /** + * Optional. The resource names of Contacts from the advertising Agency of + * this Order. Format: "networks/{network_code}/contacts/{contact_id}" + * + * Generated from protobuf field repeated string agency_contacts = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $agency_contacts; + /** + * Optional. The resource name of the Company, which is of type + * Company.Type.AGENCY, with which this order is associated. Format: + * "networks/{network_code}/companies/{company_id}" + * + * Generated from protobuf field string agency = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $agency = ''; + /** + * Optional. The resource names of Teams directly applied to this Order. + * Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string applied_teams = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $applied_teams; + /** + * Output only. The resource names of Teams applied to this Order including + * inherited values. Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string effective_teams = 28 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $effective_teams; + /** + * Output only. The resource name of the User who created the Order on behalf + * of the advertiser. This value is assigned by Google. Format: + * "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $creator = ''; + /** + * Output only. The ISO 4217 3-letter currency code for the currency used by + * the Order. This value is the network's currency code. + * + * Generated from protobuf field string currency_code = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $currency_code = ''; + /** + * Output only. The instant at which the Order and its associated line items + * are eligible to begin serving. This attribute is derived from the line item + * of the order that has the earliest LineItem.start_time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The instant at which the Order and its associated line items + * stop being served. This attribute is derived from the line item of the + * order that has the latest LineItem.end_time. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Indicates whether or not this Order has an end time. + * + * Generated from protobuf field bool unlimited_end_time = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $unlimited_end_time = false; + /** + * Optional. An arbitrary ID to associate to the Order, which can be used as a + * key to an external system. + * + * Generated from protobuf field int64 external_order_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $external_order_id = 0; + /** + * Output only. The archival status of the Order. + * + * Generated from protobuf field bool archived = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $archived = false; + /** + * Output only. The application which modified this order. This attribute is + * assigned by Google. + * + * Generated from protobuf field string last_modified_by_app = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_modified_by_app = ''; + /** + * Output only. The instant this Order was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Provides any additional notes that may annotate the Order. This + * attribute has a maximum length of 65,535 characters. + * + * Generated from protobuf field string notes = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $notes = ''; + /** + * Optional. The purchase order number for the Order. This value has a maximum + * length of 63 characters. + * + * Generated from protobuf field string po_number = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $po_number = ''; + /** + * Output only. The status of the Order. + * + * Generated from protobuf field .google.ads.admanager.v1.OrderStatusEnum.OrderStatus status = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + /** + * Optional. The resource name of the User responsible for the sales of the + * Order. Format: "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field string salesperson = 21 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $salesperson = ''; + /** + * Optional. Unordered list. The resource names of the secondary salespeople + * associated with the order. Format: + * "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field repeated string secondary_salespeople = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST, (.google.api.resource_reference) = { + */ + private $secondary_salespeople; + /** + * Optional. Unordered list. The resource names of the secondary traffickers + * associated with the order. Format: + * "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field repeated string secondary_traffickers = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST, (.google.api.resource_reference) = { + */ + private $secondary_traffickers; + /** + * Optional. The set of labels applied directly to this order. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $applied_labels; + /** + * Output only. Contains the set of labels applied directly to the order as + * well as those inherited from the company that owns the order. If a label + * has been negated, only the negated label is returned. This field is + * assigned by Google. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $effective_applied_labels; + /** + * Optional. The set of custom field values to this order. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 38 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $custom_field_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Order`. + * Format: `networks/{network_code}/orders/{order_id}` + * @type int|string $order_id + * Output only. Order ID. + * @type string $display_name + * Required. The display name of the Order. This value has a maximum length + * of 255 characters. + * @type bool $programmatic + * Optional. Specifies whether or not the Order is a programmatic order. + * @type string $trafficker + * Required. The resource name of the User responsible for trafficking the + * Order. Format: "networks/{network_code}/users/{user_id}" + * @type array|\Google\Protobuf\Internal\RepeatedField $advertiser_contacts + * Optional. The resource names of Contacts from the advertiser of this Order. + * Format: "networks/{network_code}/contacts/{contact_id}" + * @type string $advertiser + * Required. The resource name of the Company, which is of type + * Company.Type.ADVERTISER, to which this order belongs. Format: + * "networks/{network_code}/companies/{company_id}" + * @type array|\Google\Protobuf\Internal\RepeatedField $agency_contacts + * Optional. The resource names of Contacts from the advertising Agency of + * this Order. Format: "networks/{network_code}/contacts/{contact_id}" + * @type string $agency + * Optional. The resource name of the Company, which is of type + * Company.Type.AGENCY, with which this order is associated. Format: + * "networks/{network_code}/companies/{company_id}" + * @type array|\Google\Protobuf\Internal\RepeatedField $applied_teams + * Optional. The resource names of Teams directly applied to this Order. + * Format: "networks/{network_code}/teams/{team_id}" + * @type array|\Google\Protobuf\Internal\RepeatedField $effective_teams + * Output only. The resource names of Teams applied to this Order including + * inherited values. Format: "networks/{network_code}/teams/{team_id}" + * @type string $creator + * Output only. The resource name of the User who created the Order on behalf + * of the advertiser. This value is assigned by Google. Format: + * "networks/{network_code}/users/{user_id}" + * @type string $currency_code + * Output only. The ISO 4217 3-letter currency code for the currency used by + * the Order. This value is the network's currency code. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The instant at which the Order and its associated line items + * are eligible to begin serving. This attribute is derived from the line item + * of the order that has the earliest LineItem.start_time. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The instant at which the Order and its associated line items + * stop being served. This attribute is derived from the line item of the + * order that has the latest LineItem.end_time. + * @type bool $unlimited_end_time + * Output only. Indicates whether or not this Order has an end time. + * @type int|string $external_order_id + * Optional. An arbitrary ID to associate to the Order, which can be used as a + * key to an external system. + * @type bool $archived + * Output only. The archival status of the Order. + * @type string $last_modified_by_app + * Output only. The application which modified this order. This attribute is + * assigned by Google. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The instant this Order was last modified. + * @type string $notes + * Optional. Provides any additional notes that may annotate the Order. This + * attribute has a maximum length of 65,535 characters. + * @type string $po_number + * Optional. The purchase order number for the Order. This value has a maximum + * length of 63 characters. + * @type int $status + * Output only. The status of the Order. + * @type string $salesperson + * Optional. The resource name of the User responsible for the sales of the + * Order. Format: "networks/{network_code}/users/{user_id}" + * @type array|\Google\Protobuf\Internal\RepeatedField $secondary_salespeople + * Optional. Unordered list. The resource names of the secondary salespeople + * associated with the order. Format: + * "networks/{network_code}/users/{user_id}" + * @type array|\Google\Protobuf\Internal\RepeatedField $secondary_traffickers + * Optional. Unordered list. The resource names of the secondary traffickers + * associated with the order. Format: + * "networks/{network_code}/users/{user_id}" + * @type array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $applied_labels + * Optional. The set of labels applied directly to this order. + * @type array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $effective_applied_labels + * Output only. Contains the set of labels applied directly to the order as + * well as those inherited from the company that owns the order. If a label + * has been negated, only the negated label is returned. This field is + * assigned by Google. + * @type array<\Google\Ads\AdManager\V1\CustomFieldValue>|\Google\Protobuf\Internal\RepeatedField $custom_field_values + * Optional. The set of custom field values to this order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Order`. + * Format: `networks/{network_code}/orders/{order_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 `Order`. + * Format: `networks/{network_code}/orders/{order_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; + } + + /** + * Output only. Order ID. + * + * Generated from protobuf field int64 order_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getOrderId() + { + return $this->order_id; + } + + /** + * Output only. Order ID. + * + * Generated from protobuf field int64 order_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setOrderId($var) + { + GPBUtil::checkInt64($var); + $this->order_id = $var; + + return $this; + } + + /** + * Required. The display name of the Order. This value has a maximum length + * of 255 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the Order. This value has a maximum length + * of 255 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Specifies whether or not the Order is a programmatic order. + * + * Generated from protobuf field bool programmatic = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getProgrammatic() + { + return $this->programmatic; + } + + /** + * Optional. Specifies whether or not the Order is a programmatic order. + * + * Generated from protobuf field bool programmatic = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setProgrammatic($var) + { + GPBUtil::checkBool($var); + $this->programmatic = $var; + + return $this; + } + + /** + * Required. The resource name of the User responsible for trafficking the + * Order. Format: "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field string trafficker = 23 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTrafficker() + { + return $this->trafficker; + } + + /** + * Required. The resource name of the User responsible for trafficking the + * Order. Format: "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field string trafficker = 23 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTrafficker($var) + { + GPBUtil::checkString($var, True); + $this->trafficker = $var; + + return $this; + } + + /** + * Optional. The resource names of Contacts from the advertiser of this Order. + * Format: "networks/{network_code}/contacts/{contact_id}" + * + * Generated from protobuf field repeated string advertiser_contacts = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdvertiserContacts() + { + return $this->advertiser_contacts; + } + + /** + * Optional. The resource names of Contacts from the advertiser of this Order. + * Format: "networks/{network_code}/contacts/{contact_id}" + * + * Generated from protobuf field repeated string advertiser_contacts = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdvertiserContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->advertiser_contacts = $arr; + + return $this; + } + + /** + * Required. The resource name of the Company, which is of type + * Company.Type.ADVERTISER, to which this order belongs. Format: + * "networks/{network_code}/companies/{company_id}" + * + * Generated from protobuf field string advertiser = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAdvertiser() + { + return $this->advertiser; + } + + /** + * Required. The resource name of the Company, which is of type + * Company.Type.ADVERTISER, to which this order belongs. Format: + * "networks/{network_code}/companies/{company_id}" + * + * Generated from protobuf field string advertiser = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAdvertiser($var) + { + GPBUtil::checkString($var, True); + $this->advertiser = $var; + + return $this; + } + + /** + * Optional. The resource names of Contacts from the advertising Agency of + * this Order. Format: "networks/{network_code}/contacts/{contact_id}" + * + * Generated from protobuf field repeated string agency_contacts = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAgencyContacts() + { + return $this->agency_contacts; + } + + /** + * Optional. The resource names of Contacts from the advertising Agency of + * this Order. Format: "networks/{network_code}/contacts/{contact_id}" + * + * Generated from protobuf field repeated string agency_contacts = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAgencyContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->agency_contacts = $arr; + + return $this; + } + + /** + * Optional. The resource name of the Company, which is of type + * Company.Type.AGENCY, with which this order is associated. Format: + * "networks/{network_code}/companies/{company_id}" + * + * Generated from protobuf field string agency = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAgency() + { + return $this->agency; + } + + /** + * Optional. The resource name of the Company, which is of type + * Company.Type.AGENCY, with which this order is associated. Format: + * "networks/{network_code}/companies/{company_id}" + * + * Generated from protobuf field string agency = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAgency($var) + { + GPBUtil::checkString($var, True); + $this->agency = $var; + + return $this; + } + + /** + * Optional. The resource names of Teams directly applied to this Order. + * Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string applied_teams = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliedTeams() + { + return $this->applied_teams; + } + + /** + * Optional. The resource names of Teams directly applied to this Order. + * Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string applied_teams = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliedTeams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->applied_teams = $arr; + + return $this; + } + + /** + * Output only. The resource names of Teams applied to this Order including + * inherited values. Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string effective_teams = 28 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEffectiveTeams() + { + return $this->effective_teams; + } + + /** + * Output only. The resource names of Teams applied to this Order including + * inherited values. Format: "networks/{network_code}/teams/{team_id}" + * + * Generated from protobuf field repeated string effective_teams = 28 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEffectiveTeams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->effective_teams = $arr; + + return $this; + } + + /** + * Output only. The resource name of the User who created the Order on behalf + * of the advertiser. This value is assigned by Google. Format: + * "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Output only. The resource name of the User who created the Order on behalf + * of the advertiser. This value is assigned by Google. Format: + * "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * Output only. The ISO 4217 3-letter currency code for the currency used by + * the Order. This value is the network's currency code. + * + * Generated from protobuf field string currency_code = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCurrencyCode() + { + return $this->currency_code; + } + + /** + * Output only. The ISO 4217 3-letter currency code for the currency used by + * the Order. This value is the network's currency code. + * + * Generated from protobuf field string currency_code = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCurrencyCode($var) + { + GPBUtil::checkString($var, True); + $this->currency_code = $var; + + return $this; + } + + /** + * Output only. The instant at which the Order and its associated line items + * are eligible to begin serving. This attribute is derived from the line item + * of the order that has the earliest LineItem.start_time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The instant at which the Order and its associated line items + * are eligible to begin serving. This attribute is derived from the line item + * of the order that has the earliest LineItem.start_time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The instant at which the Order and its associated line items + * stop being served. This attribute is derived from the line item of the + * order that has the latest LineItem.end_time. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The instant at which the Order and its associated line items + * stop being served. This attribute is derived from the line item of the + * order that has the latest LineItem.end_time. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Indicates whether or not this Order has an end time. + * + * Generated from protobuf field bool unlimited_end_time = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getUnlimitedEndTime() + { + return $this->unlimited_end_time; + } + + /** + * Output only. Indicates whether or not this Order has an end time. + * + * Generated from protobuf field bool unlimited_end_time = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setUnlimitedEndTime($var) + { + GPBUtil::checkBool($var); + $this->unlimited_end_time = $var; + + return $this; + } + + /** + * Optional. An arbitrary ID to associate to the Order, which can be used as a + * key to an external system. + * + * Generated from protobuf field int64 external_order_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getExternalOrderId() + { + return $this->external_order_id; + } + + /** + * Optional. An arbitrary ID to associate to the Order, which can be used as a + * key to an external system. + * + * Generated from protobuf field int64 external_order_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setExternalOrderId($var) + { + GPBUtil::checkInt64($var); + $this->external_order_id = $var; + + return $this; + } + + /** + * Output only. The archival status of the Order. + * + * Generated from protobuf field bool archived = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getArchived() + { + return $this->archived; + } + + /** + * Output only. The archival status of the Order. + * + * Generated from protobuf field bool archived = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setArchived($var) + { + GPBUtil::checkBool($var); + $this->archived = $var; + + return $this; + } + + /** + * Output only. The application which modified this order. This attribute is + * assigned by Google. + * + * Generated from protobuf field string last_modified_by_app = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLastModifiedByApp() + { + return $this->last_modified_by_app; + } + + /** + * Output only. The application which modified this order. This attribute is + * assigned by Google. + * + * Generated from protobuf field string last_modified_by_app = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLastModifiedByApp($var) + { + GPBUtil::checkString($var, True); + $this->last_modified_by_app = $var; + + return $this; + } + + /** + * Output only. The instant this Order was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The instant this Order was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Provides any additional notes that may annotate the Order. This + * attribute has a maximum length of 65,535 characters. + * + * Generated from protobuf field string notes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNotes() + { + return $this->notes; + } + + /** + * Optional. Provides any additional notes that may annotate the Order. This + * attribute has a maximum length of 65,535 characters. + * + * Generated from protobuf field string notes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNotes($var) + { + GPBUtil::checkString($var, True); + $this->notes = $var; + + return $this; + } + + /** + * Optional. The purchase order number for the Order. This value has a maximum + * length of 63 characters. + * + * Generated from protobuf field string po_number = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPoNumber() + { + return $this->po_number; + } + + /** + * Optional. The purchase order number for the Order. This value has a maximum + * length of 63 characters. + * + * Generated from protobuf field string po_number = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPoNumber($var) + { + GPBUtil::checkString($var, True); + $this->po_number = $var; + + return $this; + } + + /** + * Output only. The status of the Order. + * + * Generated from protobuf field .google.ads.admanager.v1.OrderStatusEnum.OrderStatus status = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. The status of the Order. + * + * Generated from protobuf field .google.ads.admanager.v1.OrderStatusEnum.OrderStatus status = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\OrderStatusEnum\OrderStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Optional. The resource name of the User responsible for the sales of the + * Order. Format: "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field string salesperson = 21 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getSalesperson() + { + return $this->salesperson; + } + + /** + * Optional. The resource name of the User responsible for the sales of the + * Order. Format: "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field string salesperson = 21 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSalesperson($var) + { + GPBUtil::checkString($var, True); + $this->salesperson = $var; + + return $this; + } + + /** + * Optional. Unordered list. The resource names of the secondary salespeople + * associated with the order. Format: + * "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field repeated string secondary_salespeople = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecondarySalespeople() + { + return $this->secondary_salespeople; + } + + /** + * Optional. Unordered list. The resource names of the secondary salespeople + * associated with the order. Format: + * "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field repeated string secondary_salespeople = 22 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecondarySalespeople($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->secondary_salespeople = $arr; + + return $this; + } + + /** + * Optional. Unordered list. The resource names of the secondary traffickers + * associated with the order. Format: + * "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field repeated string secondary_traffickers = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecondaryTraffickers() + { + return $this->secondary_traffickers; + } + + /** + * Optional. Unordered list. The resource names of the secondary traffickers + * associated with the order. Format: + * "networks/{network_code}/users/{user_id}" + * + * Generated from protobuf field repeated string secondary_traffickers = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecondaryTraffickers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->secondary_traffickers = $arr; + + return $this; + } + + /** + * Optional. The set of labels applied directly to this order. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliedLabels() + { + return $this->applied_labels; + } + + /** + * Optional. The set of labels applied directly to this order. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliedLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AppliedLabel::class); + $this->applied_labels = $arr; + + return $this; + } + + /** + * Output only. Contains the set of labels applied directly to the order as + * well as those inherited from the company that owns the order. If a label + * has been negated, only the negated label is returned. This field is + * assigned by Google. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEffectiveAppliedLabels() + { + return $this->effective_applied_labels; + } + + /** + * Output only. Contains the set of labels applied directly to the order as + * well as those inherited from the company that owns the order. If a label + * has been negated, only the negated label is returned. This field is + * assigned by Google. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Ads\AdManager\V1\AppliedLabel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEffectiveAppliedLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AppliedLabel::class); + $this->effective_applied_labels = $arr; + + return $this; + } + + /** + * Optional. The set of custom field values to this order. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomFieldValues() + { + return $this->custom_field_values; + } + + /** + * Optional. The set of custom field values to this order. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\CustomFieldValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomFieldValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomFieldValue::class); + $this->custom_field_values = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/OrderStatusEnum.php b/AdsAdManager/src/V1/OrderStatusEnum.php new file mode 100644 index 000000000000..4ba75691537a --- /dev/null +++ b/AdsAdManager/src/V1/OrderStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.OrderStatusEnum + */ +class OrderStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/OrderStatusEnum/OrderStatus.php b/AdsAdManager/src/V1/OrderStatusEnum/OrderStatus.php new file mode 100644 index 000000000000..fa1c3dbeca5f --- /dev/null +++ b/AdsAdManager/src/V1/OrderStatusEnum/OrderStatus.php @@ -0,0 +1,100 @@ +google.ads.admanager.v1.OrderStatusEnum.OrderStatus + */ +class OrderStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum ORDER_STATUS_UNSPECIFIED = 0; + */ + const ORDER_STATUS_UNSPECIFIED = 0; + /** + * Indicates that the Order has just been created but no approval has been + * requested yet. + * + * Generated from protobuf enum DRAFT = 2; + */ + const DRAFT = 2; + /** + * Indicates that a request for approval for the Order has been made. + * + * Generated from protobuf enum PENDING_APPROVAL = 3; + */ + const PENDING_APPROVAL = 3; + /** + * Indicates that the Order has been approved and is ready to serve. + * + * Generated from protobuf enum APPROVED = 4; + */ + const APPROVED = 4; + /** + * Indicates that the Order has been disapproved and is not eligible to + * serve. + * + * Generated from protobuf enum DISAPPROVED = 5; + */ + const DISAPPROVED = 5; + /** + * This is a legacy state. Paused status should be checked on LineItems + * within the order. + * + * Generated from protobuf enum PAUSED = 6; + */ + const PAUSED = 6; + /** + * Indicates that the Order has been canceled and cannot serve. + * + * Generated from protobuf enum CANCELED = 7; + */ + const CANCELED = 7; + /** + * Indicates that the Order has been deleted. + * + * Generated from protobuf enum DELETED = 8; + */ + const DELETED = 8; + + private static $valueToName = [ + self::ORDER_STATUS_UNSPECIFIED => 'ORDER_STATUS_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::PENDING_APPROVAL => 'PENDING_APPROVAL', + self::APPROVED => 'APPROVED', + self::DISAPPROVED => 'DISAPPROVED', + self::PAUSED => 'PAUSED', + self::CANCELED => 'CANCELED', + self::DELETED => 'DELETED', + ]; + + 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/AdsAdManager/src/V1/Placement.php b/AdsAdManager/src/V1/Placement.php new file mode 100644 index 000000000000..fe7d0b835a1b --- /dev/null +++ b/AdsAdManager/src/V1/Placement.php @@ -0,0 +1,339 @@ +google.ads.admanager.v1.Placement + */ +class Placement extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Placement`. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. `Placement` ID. + * + * Generated from protobuf field int64 placement_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $placement_id = 0; + /** + * Required. The display name of the placement. Its maximum length is 255 + * characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. A description of the Placement. This value is optional and its + * maximum length is 65,535 characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. A string used to uniquely identify the Placement for purposes + * of serving the ad. This attribute is read-only and is assigned by Google + * when a placement is created. + * + * Generated from protobuf field string placement_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $placement_code = ''; + /** + * Output only. The status of the Placement. This attribute is read-only. + * + * Generated from protobuf field .google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + /** + * Optional. The resource names of AdUnits that constitute the Placement. + * Format: "networks/{network_code}/adUnits/{ad_unit_id}" + * + * Generated from protobuf field repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_ad_units; + /** + * Output only. The instant this Placement was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Placement`. + * Format: `networks/{network_code}/placements/{placement_id}` + * @type int|string $placement_id + * Output only. `Placement` ID. + * @type string $display_name + * Required. The display name of the placement. Its maximum length is 255 + * characters. + * @type string $description + * Optional. A description of the Placement. This value is optional and its + * maximum length is 65,535 characters. + * @type string $placement_code + * Output only. A string used to uniquely identify the Placement for purposes + * of serving the ad. This attribute is read-only and is assigned by Google + * when a placement is created. + * @type int $status + * Output only. The status of the Placement. This attribute is read-only. + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_ad_units + * Optional. The resource names of AdUnits that constitute the Placement. + * Format: "networks/{network_code}/adUnits/{ad_unit_id}" + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The instant this Placement was last modified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Placement`. + * Format: `networks/{network_code}/placements/{placement_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 `Placement`. + * Format: `networks/{network_code}/placements/{placement_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; + } + + /** + * Output only. `Placement` ID. + * + * Generated from protobuf field int64 placement_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getPlacementId() + { + return $this->placement_id; + } + + /** + * Output only. `Placement` ID. + * + * Generated from protobuf field int64 placement_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setPlacementId($var) + { + GPBUtil::checkInt64($var); + $this->placement_id = $var; + + return $this; + } + + /** + * Required. The display name of the placement. Its maximum length is 255 + * characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the placement. Its maximum length is 255 + * characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. A description of the Placement. This value is optional and its + * maximum length is 65,535 characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of the Placement. This value is optional and its + * maximum length is 65,535 characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. A string used to uniquely identify the Placement for purposes + * of serving the ad. This attribute is read-only and is assigned by Google + * when a placement is created. + * + * Generated from protobuf field string placement_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPlacementCode() + { + return $this->placement_code; + } + + /** + * Output only. A string used to uniquely identify the Placement for purposes + * of serving the ad. This attribute is read-only and is assigned by Google + * when a placement is created. + * + * Generated from protobuf field string placement_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPlacementCode($var) + { + GPBUtil::checkString($var, True); + $this->placement_code = $var; + + return $this; + } + + /** + * Output only. The status of the Placement. This attribute is read-only. + * + * Generated from protobuf field .google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. The status of the Placement. This attribute is read-only. + * + * Generated from protobuf field .google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\PlacementStatusEnum\PlacementStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Optional. The resource names of AdUnits that constitute the Placement. + * Format: "networks/{network_code}/adUnits/{ad_unit_id}" + * + * Generated from protobuf field repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedAdUnits() + { + return $this->targeted_ad_units; + } + + /** + * Optional. The resource names of AdUnits that constitute the Placement. + * Format: "networks/{network_code}/adUnits/{ad_unit_id}" + * + * Generated from protobuf field repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedAdUnits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_ad_units = $arr; + + return $this; + } + + /** + * Output only. The instant this Placement was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The instant this Placement was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/PlacementStatusEnum.php b/AdsAdManager/src/V1/PlacementStatusEnum.php new file mode 100644 index 000000000000..08bc6de84382 --- /dev/null +++ b/AdsAdManager/src/V1/PlacementStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.PlacementStatusEnum + */ +class PlacementStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/PlacementStatusEnum/PlacementStatus.php b/AdsAdManager/src/V1/PlacementStatusEnum/PlacementStatus.php new file mode 100644 index 000000000000..2d158e2c81e5 --- /dev/null +++ b/AdsAdManager/src/V1/PlacementStatusEnum/PlacementStatus.php @@ -0,0 +1,69 @@ +google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus + */ +class PlacementStatus +{ + /** + * Not specified value. + * + * Generated from protobuf enum PLACEMENT_STATUS_UNSPECIFIED = 0; + */ + const PLACEMENT_STATUS_UNSPECIFIED = 0; + /** + * Stats are collected, user-visible. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * No stats collected, not user-visible. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + /** + * No stats collected, user-visible. + * + * Generated from protobuf enum ARCHIVED = 3; + */ + const ARCHIVED = 3; + + private static $valueToName = [ + self::PLACEMENT_STATUS_UNSPECIFIED => 'PLACEMENT_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + self::ARCHIVED => 'ARCHIVED', + ]; + + 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/AdsAdManager/src/V1/Report.php b/AdsAdManager/src/V1/Report.php new file mode 100644 index 000000000000..b8cd8e12c83b --- /dev/null +++ b/AdsAdManager/src/V1/Report.php @@ -0,0 +1,391 @@ +google.ads.admanager.v1.Report + */ +class Report extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the report. + * Report resource name have the form: + * `networks/{network_code}/reports/{report_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Report ID. + * + * Generated from protobuf field int64 report_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $report_id = 0; + /** + * Optional. The visibility of a report. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Visibility visibility = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $visibility = 0; + /** + * Required. The report definition of the report. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition report_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_definition = null; + /** + * Optional. Display name for the report. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. The instant this report was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The instant this report was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The locale of this report. Locale is set from the user's + * locale at the time of the request. Locale can not be modified. + * + * Generated from protobuf field string locale = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $locale = ''; + /** + * Optional. The schedule options of this report. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions schedule_options = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $schedule_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the report. + * Report resource name have the form: + * `networks/{network_code}/reports/{report_id}` + * @type int|string $report_id + * Output only. Report ID. + * @type int $visibility + * Optional. The visibility of a report. + * @type \Google\Ads\AdManager\V1\ReportDefinition $report_definition + * Required. The report definition of the report. + * @type string $display_name + * Optional. Display name for the report. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The instant this report was last modified. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The instant this report was created. + * @type string $locale + * Output only. The locale of this report. Locale is set from the user's + * locale at the time of the request. Locale can not be modified. + * @type \Google\Ads\AdManager\V1\ScheduleOptions $schedule_options + * Optional. The schedule options of this report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the report. + * Report resource name have the form: + * `networks/{network_code}/reports/{report_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 report. + * Report resource name have the form: + * `networks/{network_code}/reports/{report_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; + } + + /** + * Output only. Report ID. + * + * Generated from protobuf field int64 report_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getReportId() + { + return $this->report_id; + } + + /** + * Output only. Report ID. + * + * Generated from protobuf field int64 report_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setReportId($var) + { + GPBUtil::checkInt64($var); + $this->report_id = $var; + + return $this; + } + + /** + * Optional. The visibility of a report. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Visibility visibility = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVisibility() + { + return $this->visibility; + } + + /** + * Optional. The visibility of a report. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Visibility visibility = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVisibility($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\Visibility::class); + $this->visibility = $var; + + return $this; + } + + /** + * Required. The report definition of the report. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition report_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\ReportDefinition|null + */ + public function getReportDefinition() + { + return $this->report_definition; + } + + public function hasReportDefinition() + { + return isset($this->report_definition); + } + + public function clearReportDefinition() + { + unset($this->report_definition); + } + + /** + * Required. The report definition of the report. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition report_definition = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\ReportDefinition $var + * @return $this + */ + public function setReportDefinition($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition::class); + $this->report_definition = $var; + + return $this; + } + + /** + * Optional. Display name for the report. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Display name for the report. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The instant this report was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The instant this report was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The instant this report was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The instant this report was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The locale of this report. Locale is set from the user's + * locale at the time of the request. Locale can not be modified. + * + * Generated from protobuf field string locale = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocale() + { + return $this->locale; + } + + /** + * Output only. The locale of this report. Locale is set from the user's + * locale at the time of the request. Locale can not be modified. + * + * Generated from protobuf field string locale = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocale($var) + { + GPBUtil::checkString($var, True); + $this->locale = $var; + + return $this; + } + + /** + * Optional. The schedule options of this report. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions schedule_options = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\ScheduleOptions|null + */ + public function getScheduleOptions() + { + return $this->schedule_options; + } + + public function hasScheduleOptions() + { + return isset($this->schedule_options); + } + + public function clearScheduleOptions() + { + unset($this->schedule_options); + } + + /** + * Optional. The schedule options of this report. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions schedule_options = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\ScheduleOptions $var + * @return $this + */ + public function setScheduleOptions($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ScheduleOptions::class); + $this->schedule_options = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Report/DataTable.php b/AdsAdManager/src/V1/Report/DataTable.php new file mode 100644 index 000000000000..753d6b5fecc3 --- /dev/null +++ b/AdsAdManager/src/V1/Report/DataTable.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.Report.DataTable + */ +class DataTable extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + +} + + diff --git a/AdsAdManager/src/V1/Report/DataTable/MetricValueGroup.php b/AdsAdManager/src/V1/Report/DataTable/MetricValueGroup.php new file mode 100644 index 000000000000..2188d6ab1d43 --- /dev/null +++ b/AdsAdManager/src/V1/Report/DataTable/MetricValueGroup.php @@ -0,0 +1,287 @@ +google.ads.admanager.v1.Report.DataTable.MetricValueGroup + */ +class MetricValueGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Data for the PRIMARY MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value primary_values = 1; + */ + private $primary_values; + /** + * Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value primary_percent_of_total_values = 2; + */ + private $primary_percent_of_total_values; + /** + * Data for the COMPARISON MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value comparison_values = 3; + */ + private $comparison_values; + /** + * Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value comparison_percent_of_total_values = 4; + */ + private $comparison_percent_of_total_values; + /** + * Data for the ABSOLUTE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value absolute_change_values = 5; + */ + private $absolute_change_values; + /** + * Data for the RELATIVE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value relative_change_values = 6; + */ + private $relative_change_values; + /** + * If true, the flag's conditions are met. If false, the flag's + * conditions are not met. flag_values has the same length as + * flags and index i of flag_values represents the flag at index i + * of flags. + * + * Generated from protobuf field repeated bool flag_values = 7; + */ + private $flag_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $primary_values + * Data for the PRIMARY MetricValueType. + * @type array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $primary_percent_of_total_values + * Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + * @type array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $comparison_values + * Data for the COMPARISON MetricValueType. + * @type array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $comparison_percent_of_total_values + * Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + * @type array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $absolute_change_values + * Data for the ABSOLUTE_CHANGE MetricValueType. + * @type array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $relative_change_values + * Data for the RELATIVE_CHANGE MetricValueType. + * @type array|\Google\Protobuf\Internal\RepeatedField $flag_values + * If true, the flag's conditions are met. If false, the flag's + * conditions are not met. flag_values has the same length as + * flags and index i of flag_values represents the flag at index i + * of flags. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Data for the PRIMARY MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value primary_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrimaryValues() + { + return $this->primary_values; + } + + /** + * Data for the PRIMARY MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value primary_values = 1; + * @param array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrimaryValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Value::class); + $this->primary_values = $arr; + + return $this; + } + + /** + * Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value primary_percent_of_total_values = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrimaryPercentOfTotalValues() + { + return $this->primary_percent_of_total_values; + } + + /** + * Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value primary_percent_of_total_values = 2; + * @param array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrimaryPercentOfTotalValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Value::class); + $this->primary_percent_of_total_values = $arr; + + return $this; + } + + /** + * Data for the COMPARISON MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value comparison_values = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComparisonValues() + { + return $this->comparison_values; + } + + /** + * Data for the COMPARISON MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value comparison_values = 3; + * @param array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComparisonValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Value::class); + $this->comparison_values = $arr; + + return $this; + } + + /** + * Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value comparison_percent_of_total_values = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComparisonPercentOfTotalValues() + { + return $this->comparison_percent_of_total_values; + } + + /** + * Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value comparison_percent_of_total_values = 4; + * @param array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComparisonPercentOfTotalValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Value::class); + $this->comparison_percent_of_total_values = $arr; + + return $this; + } + + /** + * Data for the ABSOLUTE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value absolute_change_values = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAbsoluteChangeValues() + { + return $this->absolute_change_values; + } + + /** + * Data for the ABSOLUTE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value absolute_change_values = 5; + * @param array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAbsoluteChangeValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Value::class); + $this->absolute_change_values = $arr; + + return $this; + } + + /** + * Data for the RELATIVE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value relative_change_values = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelativeChangeValues() + { + return $this->relative_change_values; + } + + /** + * Data for the RELATIVE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value relative_change_values = 6; + * @param array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelativeChangeValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Value::class); + $this->relative_change_values = $arr; + + return $this; + } + + /** + * If true, the flag's conditions are met. If false, the flag's + * conditions are not met. flag_values has the same length as + * flags and index i of flag_values represents the flag at index i + * of flags. + * + * Generated from protobuf field repeated bool flag_values = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFlagValues() + { + return $this->flag_values; + } + + /** + * If true, the flag's conditions are met. If false, the flag's + * conditions are not met. flag_values has the same length as + * flags and index i of flag_values represents the flag at index i + * of flags. + * + * Generated from protobuf field repeated bool flag_values = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFlagValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL); + $this->flag_values = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/DataTable/Row.php b/AdsAdManager/src/V1/Report/DataTable/Row.php new file mode 100644 index 000000000000..1894770a3f50 --- /dev/null +++ b/AdsAdManager/src/V1/Report/DataTable/Row.php @@ -0,0 +1,134 @@ +google.ads.admanager.v1.Report.DataTable.Row + */ +class Row extends \Google\Protobuf\Internal\Message +{ + /** + * The order of the dimension values is the same as the order of the + * dimensions specified in the request. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value dimension_values = 1; + */ + private $dimension_values; + /** + * The length of the metric_value_groups + * field will be equal to the length of the date_ranges field in the + * fetch response. The metric_value_groups field is + * ordered such that each index corresponds to the date_range at the same + * index. For example, given date_ranges [x, y], metric_value_groups will + * have a length of two. The first entry in metric_value_groups represents + * the metrics for date x and the second entry in metric_value_groups + * represents the metrics for date y. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DataTable.MetricValueGroup metric_value_groups = 2; + */ + private $metric_value_groups; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $dimension_values + * The order of the dimension values is the same as the order of the + * dimensions specified in the request. + * @type array<\Google\Ads\AdManager\V1\Report\DataTable\MetricValueGroup>|\Google\Protobuf\Internal\RepeatedField $metric_value_groups + * The length of the metric_value_groups + * field will be equal to the length of the date_ranges field in the + * fetch response. The metric_value_groups field is + * ordered such that each index corresponds to the date_range at the same + * index. For example, given date_ranges [x, y], metric_value_groups will + * have a length of two. The first entry in metric_value_groups represents + * the metrics for date x and the second entry in metric_value_groups + * represents the metrics for date y. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * The order of the dimension values is the same as the order of the + * dimensions specified in the request. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value dimension_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDimensionValues() + { + return $this->dimension_values; + } + + /** + * The order of the dimension values is the same as the order of the + * dimensions specified in the request. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value dimension_values = 1; + * @param array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDimensionValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Value::class); + $this->dimension_values = $arr; + + return $this; + } + + /** + * The length of the metric_value_groups + * field will be equal to the length of the date_ranges field in the + * fetch response. The metric_value_groups field is + * ordered such that each index corresponds to the date_range at the same + * index. For example, given date_ranges [x, y], metric_value_groups will + * have a length of two. The first entry in metric_value_groups represents + * the metrics for date x and the second entry in metric_value_groups + * represents the metrics for date y. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DataTable.MetricValueGroup metric_value_groups = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetricValueGroups() + { + return $this->metric_value_groups; + } + + /** + * The length of the metric_value_groups + * field will be equal to the length of the date_ranges field in the + * fetch response. The metric_value_groups field is + * ordered such that each index corresponds to the date_range at the same + * index. For example, given date_ranges [x, y], metric_value_groups will + * have a length of two. The first entry in metric_value_groups represents + * the metrics for date x and the second entry in metric_value_groups + * represents the metrics for date y. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DataTable.MetricValueGroup metric_value_groups = 2; + * @param array<\Google\Ads\AdManager\V1\Report\DataTable\MetricValueGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetricValueGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\DataTable\MetricValueGroup::class); + $this->metric_value_groups = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/DateRange.php b/AdsAdManager/src/V1/Report/DateRange.php new file mode 100644 index 000000000000..87e60b4346a9 --- /dev/null +++ b/AdsAdManager/src/V1/Report/DateRange.php @@ -0,0 +1,109 @@ +google.ads.admanager.v1.Report.DateRange + */ +class DateRange extends \Google\Protobuf\Internal\Message +{ + protected $date_range_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange $fixed + * A fixed date range. + * @type int $relative + * A relative date range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * A fixed date range. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange.FixedDateRange fixed = 1; + * @return \Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange|null + */ + public function getFixed() + { + return $this->readOneof(1); + } + + public function hasFixed() + { + return $this->hasOneof(1); + } + + /** + * A fixed date range. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange.FixedDateRange fixed = 1; + * @param \Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange $var + * @return $this + */ + public function setFixed($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A relative date range. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange.RelativeDateRange relative = 2; + * @return int + */ + public function getRelative() + { + return $this->readOneof(2); + } + + public function hasRelative() + { + return $this->hasOneof(2); + } + + /** + * A relative date range. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange.RelativeDateRange relative = 2; + * @param int $var + * @return $this + */ + public function setRelative($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\DateRange\RelativeDateRange::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getDateRangeType() + { + return $this->whichOneof("date_range_type"); + } + +} + + diff --git a/AdsAdManager/src/V1/Report/DateRange/FixedDateRange.php b/AdsAdManager/src/V1/Report/DateRange/FixedDateRange.php new file mode 100644 index 000000000000..9cdfe0f4ab53 --- /dev/null +++ b/AdsAdManager/src/V1/Report/DateRange/FixedDateRange.php @@ -0,0 +1,122 @@ +google.ads.admanager.v1.Report.DateRange.FixedDateRange + */ +class FixedDateRange extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The start date of this date range. + * + * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_date = null; + /** + * Required. The end date (inclusive) of this date range. + * + * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $end_date = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Date $start_date + * Required. The start date of this date range. + * @type \Google\Type\Date $end_date + * Required. The end date (inclusive) of this date range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The start date of this date range. + * + * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The start date of this date range. + * + * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->start_date = $var; + + return $this; + } + + /** + * Required. The end date (inclusive) of this date range. + * + * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The end date (inclusive) of this date range. + * + * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_date = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/DateRange/RelativeDateRange.php b/AdsAdManager/src/V1/Report/DateRange/RelativeDateRange.php new file mode 100644 index 000000000000..c896e0fd85c9 --- /dev/null +++ b/AdsAdManager/src/V1/Report/DateRange/RelativeDateRange.php @@ -0,0 +1,276 @@ +google.ads.admanager.v1.Report.DateRange.RelativeDateRange + */ +class RelativeDateRange +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum RELATIVE_DATE_RANGE_UNSPECIFIED = 0; + */ + const RELATIVE_DATE_RANGE_UNSPECIFIED = 0; + /** + * The date the report is run. + * + * Generated from protobuf enum TODAY = 1; + */ + const TODAY = 1; + /** + * The date a day before the date that the report is run. + * + * Generated from protobuf enum YESTERDAY = 2; + */ + const YESTERDAY = 2; + /** + * The full week in which this report is run. Could include dates in + * the future. + * + * Generated from protobuf enum THIS_WEEK = 3; + */ + const THIS_WEEK = 3; + /** + * From the beginning of the calendar week (Monday to Sunday) in which the + * up to and including the day the report is run. + * + * Generated from protobuf enum THIS_WEEK_TO_DATE = 29; + */ + const THIS_WEEK_TO_DATE = 29; + /** + * The full month in which this report is run. Could include dates in + * the future. + * + * Generated from protobuf enum THIS_MONTH = 4; + */ + const THIS_MONTH = 4; + /** + * From the beginning of the calendar month in which the report is run, to + * up to and including the day the report is run. + * + * Generated from protobuf enum THIS_MONTH_TO_DATE = 26; + */ + const THIS_MONTH_TO_DATE = 26; + /** + * The full quarter in which this report is run. Could include dates + * in the future. + * + * Generated from protobuf enum THIS_QUARTER = 5; + */ + const THIS_QUARTER = 5; + /** + * From the beginning of the calendar quarter in which the report is run, + * up to and including the day the report is run. + * + * Generated from protobuf enum THIS_QUARTER_TO_DATE = 27; + */ + const THIS_QUARTER_TO_DATE = 27; + /** + * The full year in which this report is run. Could include dates in + * the future. + * + * Generated from protobuf enum THIS_YEAR = 6; + */ + const THIS_YEAR = 6; + /** + * From the beginning of the calendar year in which the report is run, to + * up to and including the day the report is run. + * + * Generated from protobuf enum THIS_YEAR_TO_DATE = 28; + */ + const THIS_YEAR_TO_DATE = 28; + /** + * The entire previous calendar week, Monday to Sunday (inclusive), + * preceding the calendar week the report is run. + * + * Generated from protobuf enum LAST_WEEK = 7; + */ + const LAST_WEEK = 7; + /** + * The entire previous calendar month preceding the calendar month the + * report is run. + * + * Generated from protobuf enum LAST_MONTH = 8; + */ + const LAST_MONTH = 8; + /** + * The entire previous calendar quarter preceding the calendar quarter the + * report is run. + * + * Generated from protobuf enum LAST_QUARTER = 9; + */ + const LAST_QUARTER = 9; + /** + * The entire previous calendar year preceding the calendar year the + * report is run. + * + * Generated from protobuf enum LAST_YEAR = 10; + */ + const LAST_YEAR = 10; + /** + * The 7 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_7_DAYS = 11; + */ + const LAST_7_DAYS = 11; + /** + * The 30 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_30_DAYS = 12; + */ + const LAST_30_DAYS = 12; + /** + * The 60 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_60_DAYS = 13; + */ + const LAST_60_DAYS = 13; + /** + * The 90 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_90_DAYS = 14; + */ + const LAST_90_DAYS = 14; + /** + * The 180 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_180_DAYS = 15; + */ + const LAST_180_DAYS = 15; + /** + * The 360 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_360_DAYS = 16; + */ + const LAST_360_DAYS = 16; + /** + * The 365 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_365_DAYS = 17; + */ + const LAST_365_DAYS = 17; + /** + * The entire previous 3 calendar months preceding the calendar month the + * report is run. + * + * Generated from protobuf enum LAST_3_MONTHS = 18; + */ + const LAST_3_MONTHS = 18; + /** + * The entire previous 6 calendar months preceding the calendar month the + * report is run. + * + * Generated from protobuf enum LAST_6_MONTHS = 19; + */ + const LAST_6_MONTHS = 19; + /** + * The entire previous 6 calendar months preceding the calendar month the + * report is run. + * + * Generated from protobuf enum LAST_12_MONTHS = 20; + */ + const LAST_12_MONTHS = 20; + /** + * From 3 years before the report is run, to the day before the report is + * run, inclusive. + * + * Generated from protobuf enum ALL_AVAILABLE = 21; + */ + const ALL_AVAILABLE = 21; + /** + * Only valid when used in the comparison_date_range field. The complete + * period preceding the date period provided in date_range. + * In the case where date_range is a FixedDateRange of N days, this will + * be a period of N days where the end date is the date preceding the + * start date of the date_range. + * In the case where date_range is a RelativeDateRange, this will be a + * period of the same time frame preceding the date_range. In the case + * where the date_range does not capture the full period because a report + * is run in the middle of that period, this will still be the full + * preceding period. For example, if date_range is THIS_WEEK, but the + * report is run on a Wednesday, THIS_WEEK will be Monday - Wednesday, but + * PREVIOUS_PERIOD will be Monday - Sunday. + * + * Generated from protobuf enum PREVIOUS_PERIOD = 22; + */ + const PREVIOUS_PERIOD = 22; + /** + * Only valid when used in the comparison_date_range field. The period + * starting 1 year prior to the date period provided in date_range. + * In the case where date_range is a FixedDateRange, this will be a date + * range starting 1 year prior to the date_range start date and ending 1 + * year prior to the date_range end date. + * In the case where date_range is a RelativeDateRange, this will be a + * period of the same time frame exactly 1 year prior to the date_range. + * In the case where the date_range does not capture the full period + * because a report is run in the middle of that period, this will still + * be the full period 1 year prior. For example, if date range is + * THIS_WEEK, but the report is run on a Wednesday, THIS_WEEK will be + * Monday - Wednesday, but SAME_PERIOD_PREVIOUS_YEAR will be Monday - + * Sunday. + * + * Generated from protobuf enum SAME_PERIOD_PREVIOUS_YEAR = 24; + */ + const SAME_PERIOD_PREVIOUS_YEAR = 24; + + private static $valueToName = [ + self::RELATIVE_DATE_RANGE_UNSPECIFIED => 'RELATIVE_DATE_RANGE_UNSPECIFIED', + self::TODAY => 'TODAY', + self::YESTERDAY => 'YESTERDAY', + self::THIS_WEEK => 'THIS_WEEK', + self::THIS_WEEK_TO_DATE => 'THIS_WEEK_TO_DATE', + self::THIS_MONTH => 'THIS_MONTH', + self::THIS_MONTH_TO_DATE => 'THIS_MONTH_TO_DATE', + self::THIS_QUARTER => 'THIS_QUARTER', + self::THIS_QUARTER_TO_DATE => 'THIS_QUARTER_TO_DATE', + self::THIS_YEAR => 'THIS_YEAR', + self::THIS_YEAR_TO_DATE => 'THIS_YEAR_TO_DATE', + self::LAST_WEEK => 'LAST_WEEK', + self::LAST_MONTH => 'LAST_MONTH', + self::LAST_QUARTER => 'LAST_QUARTER', + self::LAST_YEAR => 'LAST_YEAR', + self::LAST_7_DAYS => 'LAST_7_DAYS', + self::LAST_30_DAYS => 'LAST_30_DAYS', + self::LAST_60_DAYS => 'LAST_60_DAYS', + self::LAST_90_DAYS => 'LAST_90_DAYS', + self::LAST_180_DAYS => 'LAST_180_DAYS', + self::LAST_360_DAYS => 'LAST_360_DAYS', + self::LAST_365_DAYS => 'LAST_365_DAYS', + self::LAST_3_MONTHS => 'LAST_3_MONTHS', + self::LAST_6_MONTHS => 'LAST_6_MONTHS', + self::LAST_12_MONTHS => 'LAST_12_MONTHS', + self::ALL_AVAILABLE => 'ALL_AVAILABLE', + self::PREVIOUS_PERIOD => 'PREVIOUS_PERIOD', + self::SAME_PERIOD_PREVIOUS_YEAR => 'SAME_PERIOD_PREVIOUS_YEAR', + ]; + + 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/AdsAdManager/src/V1/Report/Dimension.php b/AdsAdManager/src/V1/Report/Dimension.php new file mode 100644 index 000000000000..c9d11ec8cb70 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Dimension.php @@ -0,0 +1,4169 @@ +google.ads.admanager.v1.Report.Dimension + */ +class Dimension +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum DIMENSION_UNSPECIFIED = 0; + */ + const DIMENSION_UNSPECIFIED = 0; + /** + * The domain name of the advertiser. + * + * Generated from protobuf enum ADVERTISER_DOMAIN_NAME = 242; + */ + const ADVERTISER_DOMAIN_NAME = 242; + /** + * The ID used in an external system for advertiser identification + * + * Generated from protobuf enum ADVERTISER_EXTERNAL_ID = 228; + */ + const ADVERTISER_EXTERNAL_ID = 228; + /** + * The ID of an advertiser company assigned to an order + * + * Generated from protobuf enum ADVERTISER_ID = 131; + */ + const ADVERTISER_ID = 131; + /** + * Labels applied to the advertiser + * can be used for either competitive exclusion or ad exclusion + * + * Generated from protobuf enum ADVERTISER_LABELS = 230; + */ + const ADVERTISER_LABELS = 230; + /** + * Label ids applied to the advertiser + * can be used for either competitive exclusion or ad exclusion + * + * Generated from protobuf enum ADVERTISER_LABEL_IDS = 229; + */ + const ADVERTISER_LABEL_IDS = 229; + /** + * The name of an advertiser company assigned to an order + * + * Generated from protobuf enum ADVERTISER_NAME = 132; + */ + const ADVERTISER_NAME = 132; + /** + * The name of the contact associated with an advertiser company + * + * Generated from protobuf enum ADVERTISER_PRIMARY_CONTACT = 227; + */ + const ADVERTISER_PRIMARY_CONTACT = 227; + /** + * Shows an ENUM value describing whether a given piece of publisher + * inventory was above (ATF) or below the fold (BTF) of a page. + * + * Generated from protobuf enum AD_LOCATION = 390; + */ + const AD_LOCATION = 390; + /** + * Shows a localized string describing whether a given piece of publisher + * inventory was above (ATF) or below the fold (BTF) of a page. + * + * Generated from protobuf enum AD_LOCATION_NAME = 391; + */ + const AD_LOCATION_NAME = 391; + /** + * The code of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_CODE = 64; + */ + const AD_UNIT_CODE = 64; + /** + * The code of the first level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_1 = 65; + */ + const AD_UNIT_CODE_LEVEL_1 = 65; + /** + * The code of the tenth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_10 = 74; + */ + const AD_UNIT_CODE_LEVEL_10 = 74; + /** + * The code of the eleventh level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_11 = 75; + */ + const AD_UNIT_CODE_LEVEL_11 = 75; + /** + * The code of the twelfth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_12 = 76; + */ + const AD_UNIT_CODE_LEVEL_12 = 76; + /** + * The code of the thirteenth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_13 = 77; + */ + const AD_UNIT_CODE_LEVEL_13 = 77; + /** + * The code of the fourteenth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_14 = 78; + */ + const AD_UNIT_CODE_LEVEL_14 = 78; + /** + * The code of the fifteenth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_15 = 79; + */ + const AD_UNIT_CODE_LEVEL_15 = 79; + /** + * The code of the sixteenth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_16 = 80; + */ + const AD_UNIT_CODE_LEVEL_16 = 80; + /** + * The code of the second level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_2 = 66; + */ + const AD_UNIT_CODE_LEVEL_2 = 66; + /** + * The code of the third level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_3 = 67; + */ + const AD_UNIT_CODE_LEVEL_3 = 67; + /** + * The code of the fourth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_4 = 68; + */ + const AD_UNIT_CODE_LEVEL_4 = 68; + /** + * The code of the fifth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_5 = 69; + */ + const AD_UNIT_CODE_LEVEL_5 = 69; + /** + * The code of the sixth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_6 = 70; + */ + const AD_UNIT_CODE_LEVEL_6 = 70; + /** + * The code of the seventh level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_7 = 71; + */ + const AD_UNIT_CODE_LEVEL_7 = 71; + /** + * The code of the eighth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_8 = 72; + */ + const AD_UNIT_CODE_LEVEL_8 = 72; + /** + * The code of the ninth level ad unit of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_9 = 73; + */ + const AD_UNIT_CODE_LEVEL_9 = 73; + /** + * The depth of the ad unit's hierarchy + * + * Generated from protobuf enum AD_UNIT_DEPTH = 101; + */ + const AD_UNIT_DEPTH = 101; + /** + * The ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID = 25; + */ + const AD_UNIT_ID = 25; + /** + * The full hierarchy of ad unit IDs where the ad was requested, from + * root to leaf, excluding the root ad unit ID. + * + * Generated from protobuf enum AD_UNIT_ID_ALL_LEVEL = 27; + */ + const AD_UNIT_ID_ALL_LEVEL = 27; + /** + * The first level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_1 = 30; + */ + const AD_UNIT_ID_LEVEL_1 = 30; + /** + * The tenth level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_10 = 48; + */ + const AD_UNIT_ID_LEVEL_10 = 48; + /** + * The eleventh level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_11 = 50; + */ + const AD_UNIT_ID_LEVEL_11 = 50; + /** + * The twelfth level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_12 = 52; + */ + const AD_UNIT_ID_LEVEL_12 = 52; + /** + * The thirteenth level ad unit ID of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_13 = 54; + */ + const AD_UNIT_ID_LEVEL_13 = 54; + /** + * The fourteenth level ad unit ID of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_14 = 56; + */ + const AD_UNIT_ID_LEVEL_14 = 56; + /** + * The fifteenth level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_15 = 58; + */ + const AD_UNIT_ID_LEVEL_15 = 58; + /** + * The sixteenth level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_16 = 60; + */ + const AD_UNIT_ID_LEVEL_16 = 60; + /** + * The second level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_2 = 32; + */ + const AD_UNIT_ID_LEVEL_2 = 32; + /** + * The third level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_3 = 34; + */ + const AD_UNIT_ID_LEVEL_3 = 34; + /** + * The fourth level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_4 = 36; + */ + const AD_UNIT_ID_LEVEL_4 = 36; + /** + * The fifth level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_5 = 38; + */ + const AD_UNIT_ID_LEVEL_5 = 38; + /** + * The sixth level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_6 = 40; + */ + const AD_UNIT_ID_LEVEL_6 = 40; + /** + * The seventh level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_7 = 42; + */ + const AD_UNIT_ID_LEVEL_7 = 42; + /** + * The eighth level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_8 = 44; + */ + const AD_UNIT_ID_LEVEL_8 = 44; + /** + * The ninth level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_9 = 46; + */ + const AD_UNIT_ID_LEVEL_9 = 46; + /** + * The top-level ad unit ID of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_ID_TOP_LEVEL = 142; + */ + const AD_UNIT_ID_TOP_LEVEL = 142; + /** + * The name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME = 26; + */ + const AD_UNIT_NAME = 26; + /** + * The full hierarchy of ad unit names where the ad was requested, from + * root to leaf, excluding the root ad unit name. + * + * Generated from protobuf enum AD_UNIT_NAME_ALL_LEVEL = 29; + */ + const AD_UNIT_NAME_ALL_LEVEL = 29; + /** + * The first level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_1 = 31; + */ + const AD_UNIT_NAME_LEVEL_1 = 31; + /** + * The tenth level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_10 = 49; + */ + const AD_UNIT_NAME_LEVEL_10 = 49; + /** + * The eleventh level ad unit name of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_11 = 51; + */ + const AD_UNIT_NAME_LEVEL_11 = 51; + /** + * The twelfth level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_12 = 53; + */ + const AD_UNIT_NAME_LEVEL_12 = 53; + /** + * The thirteenth level ad unit name of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_13 = 55; + */ + const AD_UNIT_NAME_LEVEL_13 = 55; + /** + * The fourteenth level ad unit name of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_14 = 57; + */ + const AD_UNIT_NAME_LEVEL_14 = 57; + /** + * The fifteenth level ad unit name of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_15 = 59; + */ + const AD_UNIT_NAME_LEVEL_15 = 59; + /** + * The sixteenth level ad unit name of the ad unit where the ad was + * requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_16 = 61; + */ + const AD_UNIT_NAME_LEVEL_16 = 61; + /** + * The second level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_2 = 33; + */ + const AD_UNIT_NAME_LEVEL_2 = 33; + /** + * The third level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_3 = 35; + */ + const AD_UNIT_NAME_LEVEL_3 = 35; + /** + * The fourth level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_4 = 37; + */ + const AD_UNIT_NAME_LEVEL_4 = 37; + /** + * The fifth level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_5 = 39; + */ + const AD_UNIT_NAME_LEVEL_5 = 39; + /** + * The sixth level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_6 = 41; + */ + const AD_UNIT_NAME_LEVEL_6 = 41; + /** + * The seventh level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_7 = 43; + */ + const AD_UNIT_NAME_LEVEL_7 = 43; + /** + * The eighth level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_8 = 45; + */ + const AD_UNIT_NAME_LEVEL_8 = 45; + /** + * The ninth level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_9 = 47; + */ + const AD_UNIT_NAME_LEVEL_9 = 47; + /** + * The top-level ad unit name of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_NAME_TOP_LEVEL = 143; + */ + const AD_UNIT_NAME_TOP_LEVEL = 143; + /** + * The reward amount of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_REWARD_AMOUNT = 63; + */ + const AD_UNIT_REWARD_AMOUNT = 63; + /** + * The reward type of the ad unit where the ad was requested. + * + * Generated from protobuf enum AD_UNIT_REWARD_TYPE = 62; + */ + const AD_UNIT_REWARD_TYPE = 62; + /** + * The status of the ad unit + * + * Generated from protobuf enum AD_UNIT_STATUS = 206; + */ + const AD_UNIT_STATUS = 206; + /** + * The name of the status of the ad unit + * + * Generated from protobuf enum AD_UNIT_STATUS_NAME = 207; + */ + const AD_UNIT_STATUS_NAME = 207; + /** + * The app version. + * + * Generated from protobuf enum APP_VERSION = 392; + */ + const APP_VERSION = 392; + /** + * The ID used in an external system for advertiser identification + * + * Generated from protobuf enum BACKFILL_ADVERTISER_EXTERNAL_ID = 349; + */ + const BACKFILL_ADVERTISER_EXTERNAL_ID = 349; + /** + * The ID of an advertiser company assigned to a backfill order + * + * Generated from protobuf enum BACKFILL_ADVERTISER_ID = 346; + */ + const BACKFILL_ADVERTISER_ID = 346; + /** + * Labels applied to the advertiser + * can be used for either competitive exclusion or ad exclusion + * + * Generated from protobuf enum BACKFILL_ADVERTISER_LABELS = 351; + */ + const BACKFILL_ADVERTISER_LABELS = 351; + /** + * Label ids applied to the advertiser + * can be used for either competitive exclusion or ad exclusion + * + * Generated from protobuf enum BACKFILL_ADVERTISER_LABEL_IDS = 350; + */ + const BACKFILL_ADVERTISER_LABEL_IDS = 350; + /** + * The name of an advertiser company assigned to a backfill order + * + * Generated from protobuf enum BACKFILL_ADVERTISER_NAME = 347; + */ + const BACKFILL_ADVERTISER_NAME = 347; + /** + * The name of the contact associated with an advertiser company + * + * Generated from protobuf enum BACKFILL_ADVERTISER_PRIMARY_CONTACT = 348; + */ + const BACKFILL_ADVERTISER_PRIMARY_CONTACT = 348; + /** + * Enum value of Backfill creative billing type + * + * Generated from protobuf enum BACKFILL_CREATIVE_BILLING_TYPE = 378; + */ + const BACKFILL_CREATIVE_BILLING_TYPE = 378; + /** + * Localized string value of Backfill creative billing type + * + * Generated from protobuf enum BACKFILL_CREATIVE_BILLING_TYPE_NAME = 379; + */ + const BACKFILL_CREATIVE_BILLING_TYPE_NAME = 379; + /** + * Represents the click-through URL of a Backfill creative + * + * Generated from protobuf enum BACKFILL_CREATIVE_CLICK_THROUGH_URL = 376; + */ + const BACKFILL_CREATIVE_CLICK_THROUGH_URL = 376; + /** + * The ID of a Backfill creative + * + * Generated from protobuf enum BACKFILL_CREATIVE_ID = 370; + */ + const BACKFILL_CREATIVE_ID = 370; + /** + * Backfill creative name + * + * Generated from protobuf enum BACKFILL_CREATIVE_NAME = 371; + */ + const BACKFILL_CREATIVE_NAME = 371; + /** + * Third party vendor name of a Backfill creative + * + * Generated from protobuf enum BACKFILL_CREATIVE_THIRD_PARTY_VENDOR = 377; + */ + const BACKFILL_CREATIVE_THIRD_PARTY_VENDOR = 377; + /** + * Enum value of Backfill creative type + * + * Generated from protobuf enum BACKFILL_CREATIVE_TYPE = 374; + */ + const BACKFILL_CREATIVE_TYPE = 374; + /** + * Localized string name of Backfill creative type + * + * Generated from protobuf enum BACKFILL_CREATIVE_TYPE_NAME = 375; + */ + const BACKFILL_CREATIVE_TYPE_NAME = 375; + /** + * Whether a Backfill line item is archived. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_ARCHIVED = 278; + */ + const BACKFILL_LINE_ITEM_ARCHIVED = 278; + /** + * Backfill line item comanion delivery option ENUM value. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION = 258; + */ + const BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION = 258; + /** + * Localized Backfill line item comanion delivery option name. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 259; + */ + const BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 259; + /** + * The computed status of the BackfillLineItem. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_COMPUTED_STATUS = 296; + */ + const BACKFILL_LINE_ITEM_COMPUTED_STATUS = 296; + /** + * The localized name of the computed status of the BackfillLineItem. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME = 297; + */ + const BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME = 297; + /** + * The contracted units bought for the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY = 280; + */ + const BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY = 280; + /** + * The cost per unit of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_COST_PER_UNIT = 272; + */ + const BACKFILL_LINE_ITEM_COST_PER_UNIT = 272; + /** + * Backfill line item cost type ENUM value. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_COST_TYPE = 264; + */ + const BACKFILL_LINE_ITEM_COST_TYPE = 264; + /** + * Localized Backfill line item cost type name. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_COST_TYPE_NAME = 265; + */ + const BACKFILL_LINE_ITEM_COST_TYPE_NAME = 265; + /** + * Represent the end date of a Backfill creative associated with a Backfill + * line item + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CREATIVE_END_DATE = 381; + */ + const BACKFILL_LINE_ITEM_CREATIVE_END_DATE = 381; + /** + * The creative rotation type of the BackfillLineItem. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE = 290; + */ + const BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE = 290; + /** + * The localized name of the creative rotation type of the BackfillLineItem. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 291; + */ + const BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 291; + /** + * Represent the start date of a Backfill creative associated with a + * Backfill line item + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CREATIVE_START_DATE = 380; + */ + const BACKFILL_LINE_ITEM_CREATIVE_START_DATE = 380; + /** + * The 3 letter currency code of the Backfill line item + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CURRENCY_CODE = 288; + */ + const BACKFILL_LINE_ITEM_CURRENCY_CODE = 288; + /** + * The progress made for the delivery of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_DELIVERY_INDICATOR = 274; + */ + const BACKFILL_LINE_ITEM_DELIVERY_INDICATOR = 274; + /** + * The delivery rate type of the BackfillLineItem. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE = 292; + */ + const BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE = 292; + /** + * The localized name of the delivery rate type of the BackfillLineItem. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 293; + */ + const BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 293; + /** + * The discount of the BackfillLineItem in whole units in the + * BackfillLineItem's currency code, or if unspecified the Network's + * currency code. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE = 294; + */ + const BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE = 294; + /** + * The discount of the BackfillLineItem in percentage. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE = 295; + */ + const BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE = 295; + /** + * The end date of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_END_DATE = 267; + */ + const BACKFILL_LINE_ITEM_END_DATE = 267; + /** + * The end date and time of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_END_DATE_TIME = 269; + */ + const BACKFILL_LINE_ITEM_END_DATE_TIME = 269; + /** + * The ENUM value of the environment a Backfill line item is targeting. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE = 302; + */ + const BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE = 302; + /** + * The localized name of the environment a Backfill line item is targeting. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME = 257; + */ + const BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME = 257; + /** + * The deal ID of the Backfill line item. Set for Programmatic Direct + * campaigns. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID = 285; + */ + const BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID = 285; + /** + * The external ID of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_EXTERNAL_ID = 273; + */ + const BACKFILL_LINE_ITEM_EXTERNAL_ID = 273; + /** + * The frequency cap of the Backfill line item (descriptive string). + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_FREQUENCY_CAP = 303; + */ + const BACKFILL_LINE_ITEM_FREQUENCY_CAP = 303; + /** + * Backfill line item ID. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_ID = 298; + */ + const BACKFILL_LINE_ITEM_ID = 298; + /** + * The application that last modified the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP = 289; + */ + const BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP = 289; + /** + * The total number of clicks delivered of the lifetime of the Backfill line + * item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_LIFETIME_CLICKS = 283; + */ + const BACKFILL_LINE_ITEM_LIFETIME_CLICKS = 283; + /** + * The total number of impressions delivered over the lifetime of the + * Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS = 282; + */ + const BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS = 282; + /** + * The total number of viewable impressions delivered over the lifetime of + * the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 284; + */ + const BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 284; + /** + * Whether or not the Backfill line item is Makegood. Makegood refers to + * free inventory offered to buyers to compensate for mistakes or + * under-delivery in the original campaigns. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_MAKEGOOD = 276; + */ + const BACKFILL_LINE_ITEM_MAKEGOOD = 276; + /** + * Backfill line item name. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_NAME = 299; + */ + const BACKFILL_LINE_ITEM_NAME = 299; + /** + * The cost of booking for the Backfill line item (non-CPD). + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE = 286; + */ + const BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE = 286; + /** + * Whether a Backfill line item is eligible for opitimization. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_OPTIMIZABLE = 277; + */ + const BACKFILL_LINE_ITEM_OPTIMIZABLE = 277; + /** + * Goal type ENUM value of the primary goal of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE = 262; + */ + const BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE = 262; + /** + * Localized goal type name of the primary goal of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 263; + */ + const BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 263; + /** + * Unit type ENUM value of the primary goal of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 260; + */ + const BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 260; + /** + * Localized unit type name of the primary goal of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 261; + */ + const BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 261; + /** + * The priority of this Backfill line item as a value between 1 and 16. + * In general, a lower priority means more serving priority for the + * Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_PRIORITY = 266; + */ + const BACKFILL_LINE_ITEM_PRIORITY = 266; + /** + * ENUM value describing the state of inventory reservation for the + * BackfillLineItem. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_RESERVATION_STATUS = 306; + */ + const BACKFILL_LINE_ITEM_RESERVATION_STATUS = 306; + /** + * Localized string describing the state of inventory reservation for the + * BackfillLineItem. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME = 307; + */ + const BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME = 307; + /** + * The start date of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_START_DATE = 268; + */ + const BACKFILL_LINE_ITEM_START_DATE = 268; + /** + * The start date and time of the Backfill line item. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_START_DATE_TIME = 270; + */ + const BACKFILL_LINE_ITEM_START_DATE_TIME = 270; + /** + * Backfill line item type ENUM value. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_TYPE = 300; + */ + const BACKFILL_LINE_ITEM_TYPE = 300; + /** + * Localized Backfill line item type name. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_TYPE_NAME = 301; + */ + const BACKFILL_LINE_ITEM_TYPE_NAME = 301; + /** + * Whether the Backfill line item end time and end date is set to + * effectively never end. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_UNLIMITED_END = 271; + */ + const BACKFILL_LINE_ITEM_UNLIMITED_END = 271; + /** + * The artificial cost per unit used by the Ad server to help rank + * inventory. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT = 275; + */ + const BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT = 275; + /** + * The web property code used for dynamic allocation Backfill line items. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE = 287; + */ + const BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE = 287; + /** + * The ID of Backfill creative, includes regular creatives, and master and + * companions in case of creative sets + * + * Generated from protobuf enum BACKFILL_MASTER_COMPANION_CREATIVE_ID = 372; + */ + const BACKFILL_MASTER_COMPANION_CREATIVE_ID = 372; + /** + * Name of Backfill creative, includes regular creatives, and master and + * companions in case of creative sets + * + * Generated from protobuf enum BACKFILL_MASTER_COMPANION_CREATIVE_NAME = 373; + */ + const BACKFILL_MASTER_COMPANION_CREATIVE_NAME = 373; + /** + * Backfill order agency. + * + * Generated from protobuf enum BACKFILL_ORDER_AGENCY = 313; + */ + const BACKFILL_ORDER_AGENCY = 313; + /** + * Backfill order agency ID. + * + * Generated from protobuf enum BACKFILL_ORDER_AGENCY_ID = 314; + */ + const BACKFILL_ORDER_AGENCY_ID = 314; + /** + * Backfill order booked CPC. + * + * Generated from protobuf enum BACKFILL_ORDER_BOOKED_CPC = 315; + */ + const BACKFILL_ORDER_BOOKED_CPC = 315; + /** + * Backfill order booked CPM. + * + * Generated from protobuf enum BACKFILL_ORDER_BOOKED_CPM = 316; + */ + const BACKFILL_ORDER_BOOKED_CPM = 316; + /** + * Backfill order delivery status ENUM value. + * + * Generated from protobuf enum BACKFILL_ORDER_DELIVERY_STATUS = 340; + */ + const BACKFILL_ORDER_DELIVERY_STATUS = 340; + /** + * Backfill order delivery status localized name. + * + * Generated from protobuf enum BACKFILL_ORDER_DELIVERY_STATUS_NAME = 341; + */ + const BACKFILL_ORDER_DELIVERY_STATUS_NAME = 341; + /** + * Backfill order end date. + * + * Generated from protobuf enum BACKFILL_ORDER_END_DATE = 317; + */ + const BACKFILL_ORDER_END_DATE = 317; + /** + * Backfill order end date and time. + * + * Generated from protobuf enum BACKFILL_ORDER_END_DATE_TIME = 319; + */ + const BACKFILL_ORDER_END_DATE_TIME = 319; + /** + * Backfill order external ID. + * + * Generated from protobuf enum BACKFILL_ORDER_EXTERNAL_ID = 320; + */ + const BACKFILL_ORDER_EXTERNAL_ID = 320; + /** + * Backfill order id. + * + * Generated from protobuf enum BACKFILL_ORDER_ID = 338; + */ + const BACKFILL_ORDER_ID = 338; + /** + * Backfill order labels. + * + * Generated from protobuf enum BACKFILL_ORDER_LABELS = 334; + */ + const BACKFILL_ORDER_LABELS = 334; + /** + * Backfill order labels IDs. + * + * Generated from protobuf enum BACKFILL_ORDER_LABEL_IDS = 335; + */ + const BACKFILL_ORDER_LABEL_IDS = 335; + /** + * Backfill order lifetime clicks. + * + * Generated from protobuf enum BACKFILL_ORDER_LIFETIME_CLICKS = 322; + */ + const BACKFILL_ORDER_LIFETIME_CLICKS = 322; + /** + * Backfill order lifetime impressions. + * + * Generated from protobuf enum BACKFILL_ORDER_LIFETIME_IMPRESSIONS = 323; + */ + const BACKFILL_ORDER_LIFETIME_IMPRESSIONS = 323; + /** + * Backfill order name. + * + * Generated from protobuf enum BACKFILL_ORDER_NAME = 339; + */ + const BACKFILL_ORDER_NAME = 339; + /** + * Backfill order PO number. + * + * Generated from protobuf enum BACKFILL_ORDER_PO_NUMBER = 324; + */ + const BACKFILL_ORDER_PO_NUMBER = 324; + /** + * Whether the Backfill order is programmatic. + * + * Generated from protobuf enum BACKFILL_ORDER_PROGRAMMATIC = 321; + */ + const BACKFILL_ORDER_PROGRAMMATIC = 321; + /** + * Backfill order sales person. + * + * Generated from protobuf enum BACKFILL_ORDER_SALESPERSON = 325; + */ + const BACKFILL_ORDER_SALESPERSON = 325; + /** + * Backfill order secondary sales people. + * + * Generated from protobuf enum BACKFILL_ORDER_SECONDARY_SALESPEOPLE = 329; + */ + const BACKFILL_ORDER_SECONDARY_SALESPEOPLE = 329; + /** + * Backfill order secondary sales people ID. + * + * Generated from protobuf enum BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID = 328; + */ + const BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID = 328; + /** + * Backfill order secondary traffickers. + * + * Generated from protobuf enum BACKFILL_ORDER_SECONDARY_TRAFFICKERS = 331; + */ + const BACKFILL_ORDER_SECONDARY_TRAFFICKERS = 331; + /** + * Backfill order secondary traffickers ID. + * + * Generated from protobuf enum BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID = 330; + */ + const BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID = 330; + /** + * Backfill order start date. + * + * Generated from protobuf enum BACKFILL_ORDER_START_DATE = 332; + */ + const BACKFILL_ORDER_START_DATE = 332; + /** + * Backfill order start date and time. + * + * Generated from protobuf enum BACKFILL_ORDER_START_DATE_TIME = 333; + */ + const BACKFILL_ORDER_START_DATE_TIME = 333; + /** + * Backfill order trafficker. + * + * Generated from protobuf enum BACKFILL_ORDER_TRAFFICKER = 326; + */ + const BACKFILL_ORDER_TRAFFICKER = 326; + /** + * Backfill order trafficker ID. + * + * Generated from protobuf enum BACKFILL_ORDER_TRAFFICKER_ID = 327; + */ + const BACKFILL_ORDER_TRAFFICKER_ID = 327; + /** + * Whether the Backfill order end time and end date is set to effectively + * never end. + * + * Generated from protobuf enum BACKFILL_ORDER_UNLIMITED_END = 318; + */ + const BACKFILL_ORDER_UNLIMITED_END = 318; + /** + * The ID of the buyer on a backfill programmatic proposal. + * + * Generated from protobuf enum BACKFILL_PROGRAMMATIC_BUYER_ID = 336; + */ + const BACKFILL_PROGRAMMATIC_BUYER_ID = 336; + /** + * The name of the buyer on a backfill programmatic proposal. + * + * Generated from protobuf enum BACKFILL_PROGRAMMATIC_BUYER_NAME = 337; + */ + const BACKFILL_PROGRAMMATIC_BUYER_NAME = 337; + /** + * The amount of information about the Publisher's page sent to the buyer + * who purchased the impressions. + * + * Generated from protobuf enum BRANDING_TYPE = 383; + */ + const BRANDING_TYPE = 383; + /** + * The localized version of branding type, the amount of information about + * the Publisher's page sent to the buyer who purchased the impressions. + * + * Generated from protobuf enum BRANDING_TYPE_NAME = 384; + */ + const BRANDING_TYPE_NAME = 384; + /** + * Browser category. + * + * Generated from protobuf enum BROWSER_CATEGORY = 119; + */ + const BROWSER_CATEGORY = 119; + /** + * Browser category name. + * + * Generated from protobuf enum BROWSER_CATEGORY_NAME = 120; + */ + const BROWSER_CATEGORY_NAME = 120; + /** + * The ID of the browser. + * + * Generated from protobuf enum BROWSER_ID = 235; + */ + const BROWSER_ID = 235; + /** + * The name of the browser. + * + * Generated from protobuf enum BROWSER_NAME = 236; + */ + const BROWSER_NAME = 236; + /** + * Mobile carrier ID. + * + * Generated from protobuf enum CARRIER_ID = 369; + */ + const CARRIER_ID = 369; + /** + * Name of the mobile carrier. + * + * Generated from protobuf enum CARRIER_NAME = 368; + */ + const CARRIER_NAME = 368; + /** + * The ID of an advertiser, classified by Google, associated with a creative + * transacted + * + * Generated from protobuf enum CLASSIFIED_ADVERTISER_ID = 133; + */ + const CLASSIFIED_ADVERTISER_ID = 133; + /** + * The name of an advertiser, classified by Google, associated with a + * creative transacted + * + * Generated from protobuf enum CLASSIFIED_ADVERTISER_NAME = 134; + */ + const CLASSIFIED_ADVERTISER_NAME = 134; + /** + * ID of the brand, as classified by Google, + * + * Generated from protobuf enum CLASSIFIED_BRAND_ID = 243; + */ + const CLASSIFIED_BRAND_ID = 243; + /** + * Name of the brand, as classified by Google, + * + * Generated from protobuf enum CLASSIFIED_BRAND_NAME = 244; + */ + const CLASSIFIED_BRAND_NAME = 244; + /** + * ID of the video content served. + * + * Generated from protobuf enum CONTENT_ID = 246; + */ + const CONTENT_ID = 246; + /** + * Name of the video content served. + * + * Generated from protobuf enum CONTENT_NAME = 247; + */ + const CONTENT_NAME = 247; + /** + * The criteria ID of the country in which the ad served. + * + * Generated from protobuf enum COUNTRY_ID = 11; + */ + const COUNTRY_ID = 11; + /** + * The name of the country in which the ad served. + * + * Generated from protobuf enum COUNTRY_NAME = 12; + */ + const COUNTRY_NAME = 12; + /** + * Enum value of creative billing type + * + * Generated from protobuf enum CREATIVE_BILLING_TYPE = 366; + */ + const CREATIVE_BILLING_TYPE = 366; + /** + * Localized string value of creative billing type + * + * Generated from protobuf enum CREATIVE_BILLING_TYPE_NAME = 367; + */ + const CREATIVE_BILLING_TYPE_NAME = 367; + /** + * Represents the click-through URL of a creative + * + * Generated from protobuf enum CREATIVE_CLICK_THROUGH_URL = 174; + */ + const CREATIVE_CLICK_THROUGH_URL = 174; + /** + * The ID of a creative + * + * Generated from protobuf enum CREATIVE_ID = 138; + */ + const CREATIVE_ID = 138; + /** + * Creative name + * + * Generated from protobuf enum CREATIVE_NAME = 139; + */ + const CREATIVE_NAME = 139; + /** + * Creative technology ENUM + * + * Generated from protobuf enum CREATIVE_TECHNOLOGY = 148; + */ + const CREATIVE_TECHNOLOGY = 148; + /** + * Creative technology locallized name + * + * Generated from protobuf enum CREATIVE_TECHNOLOGY_NAME = 149; + */ + const CREATIVE_TECHNOLOGY_NAME = 149; + /** + * Third party vendor name of a creative + * + * Generated from protobuf enum CREATIVE_THIRD_PARTY_VENDOR = 361; + */ + const CREATIVE_THIRD_PARTY_VENDOR = 361; + /** + * Enum value of creative type + * + * Generated from protobuf enum CREATIVE_TYPE = 344; + */ + const CREATIVE_TYPE = 344; + /** + * Localized string name of creative type + * + * Generated from protobuf enum CREATIVE_TYPE_NAME = 345; + */ + const CREATIVE_TYPE_NAME = 345; + /** + * Breaks down reporting data by date. + * + * Generated from protobuf enum DATE = 3; + */ + const DATE = 3; + /** + * Breaks down reporting data by day of the week. Monday is 1 and 7 is + * Sunday. + * + * Generated from protobuf enum DAY_OF_WEEK = 4; + */ + const DAY_OF_WEEK = 4; + /** + * Demand channel. + * + * Generated from protobuf enum DEMAND_CHANNEL = 9; + */ + const DEMAND_CHANNEL = 9; + /** + * Demand channel name. + * + * Generated from protobuf enum DEMAND_CHANNEL_NAME = 10; + */ + const DEMAND_CHANNEL_NAME = 10; + /** + * Demand subchannel. + * + * Generated from protobuf enum DEMAND_SUBCHANNEL = 22; + */ + const DEMAND_SUBCHANNEL = 22; + /** + * Demand subchannel name. + * + * Generated from protobuf enum DEMAND_SUBCHANNEL_NAME = 23; + */ + const DEMAND_SUBCHANNEL_NAME = 23; + /** + * The device on which an ad was served. + * + * Generated from protobuf enum DEVICE = 226; + */ + const DEVICE = 226; + /** + * The device category to which an ad is being targeted. + * + * Generated from protobuf enum DEVICE_CATEGORY = 15; + */ + const DEVICE_CATEGORY = 15; + /** + * The name of the category of device (smartphone, feature phone, tablet, or + * desktop) to which an ad is being targeted. + * + * Generated from protobuf enum DEVICE_CATEGORY_NAME = 16; + */ + const DEVICE_CATEGORY_NAME = 16; + /** + * The localized name of the device on which an ad was served. + * + * Generated from protobuf enum DEVICE_NAME = 225; + */ + const DEVICE_NAME = 225; + /** + * ID of the yield partner as classified by Google + * + * Generated from protobuf enum EXCHANGE_THIRD_PARTY_COMPANY_ID = 185; + */ + const EXCHANGE_THIRD_PARTY_COMPANY_ID = 185; + /** + * Name of the yield partner as classified by Google + * + * Generated from protobuf enum EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186; + */ + const EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186; + /** + * The ID of the first look pricing rule. + * + * Generated from protobuf enum FIRST_LOOK_PRICING_RULE_ID = 248; + */ + const FIRST_LOOK_PRICING_RULE_ID = 248; + /** + * The name of the first look pricing rule. + * + * Generated from protobuf enum FIRST_LOOK_PRICING_RULE_NAME = 249; + */ + const FIRST_LOOK_PRICING_RULE_NAME = 249; + /** + * Breaks down reporting data by hour in one day. + * + * Generated from protobuf enum HOUR = 100; + */ + const HOUR = 100; + /** + * The interaction type of an ad. + * + * Generated from protobuf enum INTERACTION_TYPE = 223; + */ + const INTERACTION_TYPE = 223; + /** + * The localized name of the interaction type of an ad. + * + * Generated from protobuf enum INTERACTION_TYPE_NAME = 224; + */ + const INTERACTION_TYPE_NAME = 224; + /** + * Inventory format. + * The format of the ad unit (e.g, banner) where the ad was requested. + * + * Generated from protobuf enum INVENTORY_FORMAT = 17; + */ + const INVENTORY_FORMAT = 17; + /** + * Inventory format name. + * The format of the ad unit (e.g, banner) where the ad was requested. + * + * Generated from protobuf enum INVENTORY_FORMAT_NAME = 18; + */ + const INVENTORY_FORMAT_NAME = 18; + /** + * Inventory type. + * The kind of web page or device where the ad was requested. + * + * Generated from protobuf enum INVENTORY_TYPE = 19; + */ + const INVENTORY_TYPE = 19; + /** + * Inventory type name. + * The kind of web page or device where the ad was requested. + * + * Generated from protobuf enum INVENTORY_TYPE_NAME = 20; + */ + const INVENTORY_TYPE_NAME = 20; + /** + * Whether traffic is Adx Direct. + * + * Generated from protobuf enum IS_ADX_DIRECT = 382; + */ + const IS_ADX_DIRECT = 382; + /** + * Whether traffic is First Look. + * + * Generated from protobuf enum IS_FIRST_LOOK_DEAL = 401; + */ + const IS_FIRST_LOOK_DEAL = 401; + /** + * The Custom Targeting Value ID + * + * Generated from protobuf enum KEY_VALUES_ID = 214; + */ + const KEY_VALUES_ID = 214; + /** + * The Custom Targeting Value formatted like = + * + * Generated from protobuf enum KEY_VALUES_NAME = 215; + */ + const KEY_VALUES_NAME = 215; + /** + * Whether a Line item is archived. + * + * Generated from protobuf enum LINE_ITEM_ARCHIVED = 188; + */ + const LINE_ITEM_ARCHIVED = 188; + /** + * Line item comanion delivery option ENUM value. + * + * Generated from protobuf enum LINE_ITEM_COMPANION_DELIVERY_OPTION = 204; + */ + const LINE_ITEM_COMPANION_DELIVERY_OPTION = 204; + /** + * Localized line item comanion delivery option name. + * + * Generated from protobuf enum LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205; + */ + const LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205; + /** + * The computed status of the LineItem. + * + * Generated from protobuf enum LINE_ITEM_COMPUTED_STATUS = 250; + */ + const LINE_ITEM_COMPUTED_STATUS = 250; + /** + * The localized name of the computed status of the LineItem. + * + * Generated from protobuf enum LINE_ITEM_COMPUTED_STATUS_NAME = 251; + */ + const LINE_ITEM_COMPUTED_STATUS_NAME = 251; + /** + * The contracted units bought for the Line item. + * + * Generated from protobuf enum LINE_ITEM_CONTRACTED_QUANTITY = 92; + */ + const LINE_ITEM_CONTRACTED_QUANTITY = 92; + /** + * The cost per unit of the Line item. + * + * Generated from protobuf enum LINE_ITEM_COST_PER_UNIT = 85; + */ + const LINE_ITEM_COST_PER_UNIT = 85; + /** + * Line item cost type ENUM value. + * + * Generated from protobuf enum LINE_ITEM_COST_TYPE = 212; + */ + const LINE_ITEM_COST_TYPE = 212; + /** + * Localized line item cost type name. + * + * Generated from protobuf enum LINE_ITEM_COST_TYPE_NAME = 213; + */ + const LINE_ITEM_COST_TYPE_NAME = 213; + /** + * Represent the end date of a creative associated with line item + * + * Generated from protobuf enum LINE_ITEM_CREATIVE_END_DATE = 176; + */ + const LINE_ITEM_CREATIVE_END_DATE = 176; + /** + * The creative rotation type of the LineItem. + * + * Generated from protobuf enum LINE_ITEM_CREATIVE_ROTATION_TYPE = 189; + */ + const LINE_ITEM_CREATIVE_ROTATION_TYPE = 189; + /** + * The localized name of the creative rotation type of the LineItem. + * + * Generated from protobuf enum LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190; + */ + const LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190; + /** + * Represent the start date of a creative associated with line item + * + * Generated from protobuf enum LINE_ITEM_CREATIVE_START_DATE = 175; + */ + const LINE_ITEM_CREATIVE_START_DATE = 175; + /** + * The 3 letter currency code of the Line Item + * + * Generated from protobuf enum LINE_ITEM_CURRENCY_CODE = 180; + */ + const LINE_ITEM_CURRENCY_CODE = 180; + /** + * The progress made for the delivery of the Line item. + * + * Generated from protobuf enum LINE_ITEM_DELIVERY_INDICATOR = 87; + */ + const LINE_ITEM_DELIVERY_INDICATOR = 87; + /** + * The delivery rate type of the LineItem. + * + * Generated from protobuf enum LINE_ITEM_DELIVERY_RATE_TYPE = 191; + */ + const LINE_ITEM_DELIVERY_RATE_TYPE = 191; + /** + * The localized name of the delivery rate type of the LineItem. + * + * Generated from protobuf enum LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192; + */ + const LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192; + /** + * The discount of the LineItem in whole units in the LineItem's currency + * code, or if unspecified the Network's currency code. + * + * Generated from protobuf enum LINE_ITEM_DISCOUNT_ABSOLUTE = 195; + */ + const LINE_ITEM_DISCOUNT_ABSOLUTE = 195; + /** + * The discount of the LineItem in percentage. + * + * Generated from protobuf enum LINE_ITEM_DISCOUNT_PERCENTAGE = 196; + */ + const LINE_ITEM_DISCOUNT_PERCENTAGE = 196; + /** + * The end date of the Line item. + * + * Generated from protobuf enum LINE_ITEM_END_DATE = 81; + */ + const LINE_ITEM_END_DATE = 81; + /** + * The end date and time of the Line item. + * + * Generated from protobuf enum LINE_ITEM_END_DATE_TIME = 83; + */ + const LINE_ITEM_END_DATE_TIME = 83; + /** + * The ENUM value of the environment a LineItem is targeting. + * + * Generated from protobuf enum LINE_ITEM_ENVIRONMENT_TYPE = 201; + */ + const LINE_ITEM_ENVIRONMENT_TYPE = 201; + /** + * The localized name of the environment a LineItem is targeting. + * + * Generated from protobuf enum LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202; + */ + const LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202; + /** + * The deal ID of the Line item. Set for Programmatic Direct campaigns. + * + * Generated from protobuf enum LINE_ITEM_EXTERNAL_DEAL_ID = 97; + */ + const LINE_ITEM_EXTERNAL_DEAL_ID = 97; + /** + * The external ID of the Line item. + * + * Generated from protobuf enum LINE_ITEM_EXTERNAL_ID = 86; + */ + const LINE_ITEM_EXTERNAL_ID = 86; + /** + * The frequency cap of the Line item (descriptive string). + * + * Generated from protobuf enum LINE_ITEM_FREQUENCY_CAP = 256; + */ + const LINE_ITEM_FREQUENCY_CAP = 256; + /** + * Line item ID. + * + * Generated from protobuf enum LINE_ITEM_ID = 1; + */ + const LINE_ITEM_ID = 1; + /** + * The application that last modified the Line Item. + * + * Generated from protobuf enum LINE_ITEM_LAST_MODIFIED_BY_APP = 181; + */ + const LINE_ITEM_LAST_MODIFIED_BY_APP = 181; + /** + * The total number of clicks delivered of the lifetime of the Line item. + * + * Generated from protobuf enum LINE_ITEM_LIFETIME_CLICKS = 95; + */ + const LINE_ITEM_LIFETIME_CLICKS = 95; + /** + * The total number of impressions delivered over the lifetime of the + * Line item. + * + * Generated from protobuf enum LINE_ITEM_LIFETIME_IMPRESSIONS = 94; + */ + const LINE_ITEM_LIFETIME_IMPRESSIONS = 94; + /** + * The total number of viewable impressions delivered over the lifetime of + * the Line item. + * + * Generated from protobuf enum LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96; + */ + const LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96; + /** + * Whether or not the Line item is Makegood. Makegood refers to free + * inventory offered to buyers to compensate for mistakes or under-delivery + * in the original campaigns. + * + * Generated from protobuf enum LINE_ITEM_MAKEGOOD = 89; + */ + const LINE_ITEM_MAKEGOOD = 89; + /** + * Line item Name. + * + * Generated from protobuf enum LINE_ITEM_NAME = 2; + */ + const LINE_ITEM_NAME = 2; + /** + * The cost of booking for the Line item (non-CPD). + * + * Generated from protobuf enum LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98; + */ + const LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98; + /** + * Whether a Line item is eligible for opitimization. + * + * Generated from protobuf enum LINE_ITEM_OPTIMIZABLE = 90; + */ + const LINE_ITEM_OPTIMIZABLE = 90; + /** + * Goal type ENUM value of the primary goal of the line item. + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_TYPE = 210; + */ + const LINE_ITEM_PRIMARY_GOAL_TYPE = 210; + /** + * Localized goal type name of the primary goal of the line item. + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211; + */ + const LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211; + /** + * The total number of impressions or clicks that are reserved for a + * line item. For line items of type BULK or PRICE_PRIORITY, this represents + * the number of remaining impressions reserved. If the line item has an + * impression cap goal, this represents the number of impressions or + * conversions that the line item will stop serving at if reached. + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93; + */ + const LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93; + /** + * The percentage of impressions or clicks that are reserved for a + * line item. For line items of type SPONSORSHIP, this represents the + * percentage of available impressions reserved. For line items of type + * NETWORK or HOUSE, this represents the percentage of remaining impressions + * reserved. + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396; + */ + const LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396; + /** + * Unit type ENUM value of the primary goal of the line item. + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208; + */ + const LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208; + /** + * Localized unit type name of the primary goal of the line item. + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209; + */ + const LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209; + /** + * The priority of this Line item as a value between 1 and 16. + * In general, a lower priority means more serving priority for the + * Line item. + * + * Generated from protobuf enum LINE_ITEM_PRIORITY = 24; + */ + const LINE_ITEM_PRIORITY = 24; + /** + * ENUM value describing the state of inventory reservation for the + * LineItem. + * + * Generated from protobuf enum LINE_ITEM_RESERVATION_STATUS = 304; + */ + const LINE_ITEM_RESERVATION_STATUS = 304; + /** + * Localized string describing the state of inventory reservation for the + * LineItem. + * + * Generated from protobuf enum LINE_ITEM_RESERVATION_STATUS_NAME = 305; + */ + const LINE_ITEM_RESERVATION_STATUS_NAME = 305; + /** + * The start date of the Line item. + * + * Generated from protobuf enum LINE_ITEM_START_DATE = 82; + */ + const LINE_ITEM_START_DATE = 82; + /** + * The start date and time of the Line item. + * + * Generated from protobuf enum LINE_ITEM_START_DATE_TIME = 84; + */ + const LINE_ITEM_START_DATE_TIME = 84; + /** + * Line item type ENUM value. + * + * Generated from protobuf enum LINE_ITEM_TYPE = 193; + */ + const LINE_ITEM_TYPE = 193; + /** + * Localized line item type name. + * + * Generated from protobuf enum LINE_ITEM_TYPE_NAME = 194; + */ + const LINE_ITEM_TYPE_NAME = 194; + /** + * Whether the Line item end time and end date is set to effectively never + * end. + * + * Generated from protobuf enum LINE_ITEM_UNLIMITED_END = 187; + */ + const LINE_ITEM_UNLIMITED_END = 187; + /** + * The artificial cost per unit used by the Ad server to help rank + * inventory. + * + * Generated from protobuf enum LINE_ITEM_VALUE_COST_PER_UNIT = 88; + */ + const LINE_ITEM_VALUE_COST_PER_UNIT = 88; + /** + * The web property code used for dynamic allocation Line Items. + * + * Generated from protobuf enum LINE_ITEM_WEB_PROPERTY_CODE = 179; + */ + const LINE_ITEM_WEB_PROPERTY_CODE = 179; + /** + * The ID of creative, includes regular creatives, and master and companions + * in case of creative sets + * + * Generated from protobuf enum MASTER_COMPANION_CREATIVE_ID = 140; + */ + const MASTER_COMPANION_CREATIVE_ID = 140; + /** + * Name of creative, includes regular creatives, and master and companions + * in case of creative sets + * + * Generated from protobuf enum MASTER_COMPANION_CREATIVE_NAME = 141; + */ + const MASTER_COMPANION_CREATIVE_NAME = 141; + /** + * Whether the mobile app is free. + * + * Generated from protobuf enum MOBILE_APP_FREE = 128; + */ + const MOBILE_APP_FREE = 128; + /** + * URL of app icon for the mobile app. + * + * Generated from protobuf enum MOBILE_APP_ICON_URL = 129; + */ + const MOBILE_APP_ICON_URL = 129; + /** + * The ID of the Mobile App. + * + * Generated from protobuf enum MOBILE_APP_ID = 123; + */ + const MOBILE_APP_ID = 123; + /** + * The name of the mobile app. + * + * Generated from protobuf enum MOBILE_APP_NAME = 127; + */ + const MOBILE_APP_NAME = 127; + /** + * Ownership status of the mobile app. + * + * Generated from protobuf enum MOBILE_APP_OWNERSHIP_STATUS = 311; + */ + const MOBILE_APP_OWNERSHIP_STATUS = 311; + /** + * Ownership status of the mobile app. + * + * Generated from protobuf enum MOBILE_APP_OWNERSHIP_STATUS_NAME = 312; + */ + const MOBILE_APP_OWNERSHIP_STATUS_NAME = 312; + /** + * The App Store of the mobile app. + * + * Generated from protobuf enum MOBILE_APP_STORE = 125; + */ + const MOBILE_APP_STORE = 125; + /** + * The localized name of the mobile app store. + * + * Generated from protobuf enum MOBILE_APP_STORE_NAME = 245; + */ + const MOBILE_APP_STORE_NAME = 245; + /** + * Mobile inventory type. + * Identifies whether a mobile ad came from a regular web page, an AMP web + * page, or a mobile app. + * Values match the Inventory type dimension available in the Overview Home + * dashboard. Note: Video takes precedence over any other value, for + * example, if there is an in-stream video impression on a desktop device, + * it will be attributed to in-stream video and not desktop web. + * + * Generated from protobuf enum MOBILE_INVENTORY_TYPE = 99; + */ + const MOBILE_INVENTORY_TYPE = 99; + /** + * Mobile inventory type name. + * Identifies whether a mobile ad came from a regular web page, an AMP web + * page, or a mobile app. + * + * Generated from protobuf enum MOBILE_INVENTORY_TYPE_NAME = 21; + */ + const MOBILE_INVENTORY_TYPE_NAME = 21; + /** + * SDK version of the mobile device. + * + * Generated from protobuf enum MOBILE_SDK_VERSION_NAME = 130; + */ + const MOBILE_SDK_VERSION_NAME = 130; + /** + * Breaks down reporting data by month and year. + * + * Generated from protobuf enum MONTH_YEAR = 6; + */ + const MONTH_YEAR = 6; + /** + * Native ad format ID. + * + * Generated from protobuf enum NATIVE_AD_FORMAT_ID = 255; + */ + const NATIVE_AD_FORMAT_ID = 255; + /** + * Native ad format name. + * + * Generated from protobuf enum NATIVE_AD_FORMAT_NAME = 254; + */ + const NATIVE_AD_FORMAT_NAME = 254; + /** + * Native style ID. + * + * Generated from protobuf enum NATIVE_STYLE_ID = 253; + */ + const NATIVE_STYLE_ID = 253; + /** + * Native style name. + * + * Generated from protobuf enum NATIVE_STYLE_NAME = 252; + */ + const NATIVE_STYLE_NAME = 252; + /** + * Operating system category. + * + * Generated from protobuf enum OPERATING_SYSTEM_CATEGORY = 117; + */ + const OPERATING_SYSTEM_CATEGORY = 117; + /** + * Operating system category name. + * + * Generated from protobuf enum OPERATING_SYSTEM_CATEGORY_NAME = 118; + */ + const OPERATING_SYSTEM_CATEGORY_NAME = 118; + /** + * ID of the operating system version. + * + * Generated from protobuf enum OPERATING_SYSTEM_VERSION_ID = 238; + */ + const OPERATING_SYSTEM_VERSION_ID = 238; + /** + * Details of the operating system, including version. + * + * Generated from protobuf enum OPERATING_SYSTEM_VERSION_NAME = 237; + */ + const OPERATING_SYSTEM_VERSION_NAME = 237; + /** + * Order agency. + * + * Generated from protobuf enum ORDER_AGENCY = 150; + */ + const ORDER_AGENCY = 150; + /** + * Order agency ID. + * + * Generated from protobuf enum ORDER_AGENCY_ID = 151; + */ + const ORDER_AGENCY_ID = 151; + /** + * Order booked CPC. + * + * Generated from protobuf enum ORDER_BOOKED_CPC = 152; + */ + const ORDER_BOOKED_CPC = 152; + /** + * Order booked CPM. + * + * Generated from protobuf enum ORDER_BOOKED_CPM = 153; + */ + const ORDER_BOOKED_CPM = 153; + /** + * Order delivery status ENUM value. + * + * Generated from protobuf enum ORDER_DELIVERY_STATUS = 231; + */ + const ORDER_DELIVERY_STATUS = 231; + /** + * Order delivery status localized name. + * + * Generated from protobuf enum ORDER_DELIVERY_STATUS_NAME = 239; + */ + const ORDER_DELIVERY_STATUS_NAME = 239; + /** + * Order end date. + * + * Generated from protobuf enum ORDER_END_DATE = 154; + */ + const ORDER_END_DATE = 154; + /** + * Order end date and time. + * + * Generated from protobuf enum ORDER_END_DATE_TIME = 155; + */ + const ORDER_END_DATE_TIME = 155; + /** + * Order external ID. + * + * Generated from protobuf enum ORDER_EXTERNAL_ID = 156; + */ + const ORDER_EXTERNAL_ID = 156; + /** + * Order id. + * + * Generated from protobuf enum ORDER_ID = 7; + */ + const ORDER_ID = 7; + /** + * Order labels. + * + * Generated from protobuf enum ORDER_LABELS = 170; + */ + const ORDER_LABELS = 170; + /** + * Order labels IDs. + * + * Generated from protobuf enum ORDER_LABEL_IDS = 171; + */ + const ORDER_LABEL_IDS = 171; + /** + * Order lifetime clicks. + * + * Generated from protobuf enum ORDER_LIFETIME_CLICKS = 158; + */ + const ORDER_LIFETIME_CLICKS = 158; + /** + * Order lifetime impressions. + * + * Generated from protobuf enum ORDER_LIFETIME_IMPRESSIONS = 159; + */ + const ORDER_LIFETIME_IMPRESSIONS = 159; + /** + * Order name. + * + * Generated from protobuf enum ORDER_NAME = 8; + */ + const ORDER_NAME = 8; + /** + * Order PO number. + * + * Generated from protobuf enum ORDER_PO_NUMBER = 160; + */ + const ORDER_PO_NUMBER = 160; + /** + * Whether the Order is programmatic. + * + * Generated from protobuf enum ORDER_PROGRAMMATIC = 157; + */ + const ORDER_PROGRAMMATIC = 157; + /** + * Order sales person. + * + * Generated from protobuf enum ORDER_SALESPERSON = 161; + */ + const ORDER_SALESPERSON = 161; + /** + * Order secondary sales people. + * + * Generated from protobuf enum ORDER_SECONDARY_SALESPEOPLE = 164; + */ + const ORDER_SECONDARY_SALESPEOPLE = 164; + /** + * Order secondary sales people ID. + * + * Generated from protobuf enum ORDER_SECONDARY_SALESPEOPLE_ID = 165; + */ + const ORDER_SECONDARY_SALESPEOPLE_ID = 165; + /** + * Order secondary traffickers. + * + * Generated from protobuf enum ORDER_SECONDARY_TRAFFICKERS = 166; + */ + const ORDER_SECONDARY_TRAFFICKERS = 166; + /** + * Order secondary traffickers ID. + * + * Generated from protobuf enum ORDER_SECONDARY_TRAFFICKERS_ID = 167; + */ + const ORDER_SECONDARY_TRAFFICKERS_ID = 167; + /** + * Order start date. + * + * Generated from protobuf enum ORDER_START_DATE = 168; + */ + const ORDER_START_DATE = 168; + /** + * Order start date and time. + * + * Generated from protobuf enum ORDER_START_DATE_TIME = 169; + */ + const ORDER_START_DATE_TIME = 169; + /** + * Order trafficker. + * + * Generated from protobuf enum ORDER_TRAFFICKER = 162; + */ + const ORDER_TRAFFICKER = 162; + /** + * Order trafficker ID. + * + * Generated from protobuf enum ORDER_TRAFFICKER_ID = 163; + */ + const ORDER_TRAFFICKER_ID = 163; + /** + * Whether the Order end time and end date is set to effectively never + * end. + * + * Generated from protobuf enum ORDER_UNLIMITED_END = 203; + */ + const ORDER_UNLIMITED_END = 203; + /** + * Placement ID + * + * Generated from protobuf enum PLACEMENT_ID = 113; + */ + const PLACEMENT_ID = 113; + /** + * The full list of placement IDs associated with the ad unit. + * + * Generated from protobuf enum PLACEMENT_ID_ALL = 144; + */ + const PLACEMENT_ID_ALL = 144; + /** + * Placement name + * + * Generated from protobuf enum PLACEMENT_NAME = 114; + */ + const PLACEMENT_NAME = 114; + /** + * The full list of placement names associated with the ad unit. + * + * Generated from protobuf enum PLACEMENT_NAME_ALL = 145; + */ + const PLACEMENT_NAME_ALL = 145; + /** + * Placement status ENUM value + * + * Generated from protobuf enum PLACEMENT_STATUS = 362; + */ + const PLACEMENT_STATUS = 362; + /** + * The full list of placement status ENUM values associated with the ad + * unit. + * + * Generated from protobuf enum PLACEMENT_STATUS_ALL = 363; + */ + const PLACEMENT_STATUS_ALL = 363; + /** + * Localized placement status name. + * + * Generated from protobuf enum PLACEMENT_STATUS_NAME = 364; + */ + const PLACEMENT_STATUS_NAME = 364; + /** + * The full list of localized placement status names associated with the ad + * unit. + * + * Generated from protobuf enum PLACEMENT_STATUS_NAME_ALL = 365; + */ + const PLACEMENT_STATUS_NAME_ALL = 365; + /** + * The ID of the buyer on a programmatic proposal. + * + * Generated from protobuf enum PROGRAMMATIC_BUYER_ID = 240; + */ + const PROGRAMMATIC_BUYER_ID = 240; + /** + * The name of the buyer on a programmatic proposal. + * + * Generated from protobuf enum PROGRAMMATIC_BUYER_NAME = 241; + */ + const PROGRAMMATIC_BUYER_NAME = 241; + /** + * Programmatic channel. + * The type of transaction that occurred in Ad Exchange. + * + * Generated from protobuf enum PROGRAMMATIC_CHANNEL = 13; + */ + const PROGRAMMATIC_CHANNEL = 13; + /** + * Programmatic channel name. + * The type of transaction that occurred in Ad Exchange. + * + * Generated from protobuf enum PROGRAMMATIC_CHANNEL_NAME = 14; + */ + const PROGRAMMATIC_CHANNEL_NAME = 14; + /** + * The size of a rendered creative, It can differ with the creative's size + * if a creative is shown in an ad slot of a different size. + * + * Generated from protobuf enum RENDERED_CREATIVE_SIZE = 343; + */ + const RENDERED_CREATIVE_SIZE = 343; + /** + * Inventory Requested Ad Sizes dimension + * + * Generated from protobuf enum REQUESTED_AD_SIZES = 352; + */ + const REQUESTED_AD_SIZES = 352; + /** + * Request type ENUM + * + * Generated from protobuf enum REQUEST_TYPE = 146; + */ + const REQUEST_TYPE = 146; + /** + * Request type locallized name + * + * Generated from protobuf enum REQUEST_TYPE_NAME = 147; + */ + const REQUEST_TYPE_NAME = 147; + /** + * Information about domain or subdomains. + * + * Generated from protobuf enum SITE = 387; + */ + const SITE = 387; + /** + * The ID of the browser, device or other environment into which a line item + * or creative was served. + * + * Generated from protobuf enum TARGETING_ID = 232; + */ + const TARGETING_ID = 232; + /** + * Information about the browser, device and other environments into which + * a line item or creative was served. + * + * Generated from protobuf enum TARGETING_NAME = 233; + */ + const TARGETING_NAME = 233; + /** + * The way in which advertisers targeted their ads. + * + * Generated from protobuf enum TARGETING_TYPE = 385; + */ + const TARGETING_TYPE = 385; + /** + * The localized name of the way in which advertisers targeted their ads. + * + * Generated from protobuf enum TARGETING_TYPE_NAME = 386; + */ + const TARGETING_TYPE_NAME = 386; + /** + * Inventory Traffic source dimension + * + * Generated from protobuf enum TRAFFIC_SOURCE = 388; + */ + const TRAFFIC_SOURCE = 388; + /** + * Inventory Traffic source dimension name + * + * Generated from protobuf enum TRAFFIC_SOURCE_NAME = 389; + */ + const TRAFFIC_SOURCE_NAME = 389; + /** + * Unified pricing rule ID dimension + * + * Generated from protobuf enum UNIFIED_PRICING_RULE_ID = 393; + */ + const UNIFIED_PRICING_RULE_ID = 393; + /** + * Unified pricing rule name dimension + * + * Generated from protobuf enum UNIFIED_PRICING_RULE_NAME = 394; + */ + const UNIFIED_PRICING_RULE_NAME = 394; + /** + * The video placement enum as defined by ADCOM 1.0-202303. + * + * Generated from protobuf enum VIDEO_PLCMT = 172; + */ + const VIDEO_PLCMT = 172; + /** + * The localized name of the video placement as defined by ADCOM 1.0-202303. + * + * Generated from protobuf enum VIDEO_PLCMT_NAME = 173; + */ + const VIDEO_PLCMT_NAME = 173; + /** + * Breaks down reporting data by week of the year. + * + * Generated from protobuf enum WEEK = 5; + */ + const WEEK = 5; + /** + * Name of the company within a yield group + * + * Generated from protobuf enum YIELD_GROUP_BUYER_NAME = 184; + */ + const YIELD_GROUP_BUYER_NAME = 184; + /** + * ID of the group of ad networks or exchanges used for Mediation and Open + * Bidding + * + * Generated from protobuf enum YIELD_GROUP_ID = 182; + */ + const YIELD_GROUP_ID = 182; + /** + * Name of the group of ad networks or exchanges used for Mediation and Open + * Bidding + * + * Generated from protobuf enum YIELD_GROUP_NAME = 183; + */ + const YIELD_GROUP_NAME = 183; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 0 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10000; + */ + const LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10000; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 1 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10001; + */ + const LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10001; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 2 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10002; + */ + const LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10002; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 3 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10003; + */ + const LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10003; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 4 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10004; + */ + const LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10004; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 5 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10005; + */ + const LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10005; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 6 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10006; + */ + const LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10006; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 7 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10007; + */ + const LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10007; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 8 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10008; + */ + const LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10008; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 9 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10009; + */ + const LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10009; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 10 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10010; + */ + const LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10010; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 11 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10011; + */ + const LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10011; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 12 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10012; + */ + const LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10012; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 13 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10013; + */ + const LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10013; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 14 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10014; + */ + const LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10014; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 0 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11000; + */ + const LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11000; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 1 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11001; + */ + const LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11001; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 2 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11002; + */ + const LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11002; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 3 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11003; + */ + const LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11003; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 4 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11004; + */ + const LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11004; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 5 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11005; + */ + const LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11005; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 6 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11006; + */ + const LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11006; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 7 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11007; + */ + const LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11007; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 8 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11008; + */ + const LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11008; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 9 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11009; + */ + const LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11009; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 10 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11010; + */ + const LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11010; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 11 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11011; + */ + const LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11011; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 12 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11012; + */ + const LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11012; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 13 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11013; + */ + const LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11013; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 14 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11014; + */ + const LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11014; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 0 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_0_OPTION_ID = 12000; + */ + const ORDER_CUSTOM_FIELD_0_OPTION_ID = 12000; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 1 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_1_OPTION_ID = 12001; + */ + const ORDER_CUSTOM_FIELD_1_OPTION_ID = 12001; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 2 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_2_OPTION_ID = 12002; + */ + const ORDER_CUSTOM_FIELD_2_OPTION_ID = 12002; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 3 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_3_OPTION_ID = 12003; + */ + const ORDER_CUSTOM_FIELD_3_OPTION_ID = 12003; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 4 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_4_OPTION_ID = 12004; + */ + const ORDER_CUSTOM_FIELD_4_OPTION_ID = 12004; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 5 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_5_OPTION_ID = 12005; + */ + const ORDER_CUSTOM_FIELD_5_OPTION_ID = 12005; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 6 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_6_OPTION_ID = 12006; + */ + const ORDER_CUSTOM_FIELD_6_OPTION_ID = 12006; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 7 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_7_OPTION_ID = 12007; + */ + const ORDER_CUSTOM_FIELD_7_OPTION_ID = 12007; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 8 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_8_OPTION_ID = 12008; + */ + const ORDER_CUSTOM_FIELD_8_OPTION_ID = 12008; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 9 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_9_OPTION_ID = 12009; + */ + const ORDER_CUSTOM_FIELD_9_OPTION_ID = 12009; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 10 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_10_OPTION_ID = 12010; + */ + const ORDER_CUSTOM_FIELD_10_OPTION_ID = 12010; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 11 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_11_OPTION_ID = 12011; + */ + const ORDER_CUSTOM_FIELD_11_OPTION_ID = 12011; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 12 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_12_OPTION_ID = 12012; + */ + const ORDER_CUSTOM_FIELD_12_OPTION_ID = 12012; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 13 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_13_OPTION_ID = 12013; + */ + const ORDER_CUSTOM_FIELD_13_OPTION_ID = 12013; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 14 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_14_OPTION_ID = 12014; + */ + const ORDER_CUSTOM_FIELD_14_OPTION_ID = 12014; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 0 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_0_VALUE = 13000; + */ + const ORDER_CUSTOM_FIELD_0_VALUE = 13000; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 1 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_1_VALUE = 13001; + */ + const ORDER_CUSTOM_FIELD_1_VALUE = 13001; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 2 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_2_VALUE = 13002; + */ + const ORDER_CUSTOM_FIELD_2_VALUE = 13002; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 3 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_3_VALUE = 13003; + */ + const ORDER_CUSTOM_FIELD_3_VALUE = 13003; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 4 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_4_VALUE = 13004; + */ + const ORDER_CUSTOM_FIELD_4_VALUE = 13004; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 5 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_5_VALUE = 13005; + */ + const ORDER_CUSTOM_FIELD_5_VALUE = 13005; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 6 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_6_VALUE = 13006; + */ + const ORDER_CUSTOM_FIELD_6_VALUE = 13006; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 7 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_7_VALUE = 13007; + */ + const ORDER_CUSTOM_FIELD_7_VALUE = 13007; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 8 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_8_VALUE = 13008; + */ + const ORDER_CUSTOM_FIELD_8_VALUE = 13008; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 9 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_9_VALUE = 13009; + */ + const ORDER_CUSTOM_FIELD_9_VALUE = 13009; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 10 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_10_VALUE = 13010; + */ + const ORDER_CUSTOM_FIELD_10_VALUE = 13010; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 11 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_11_VALUE = 13011; + */ + const ORDER_CUSTOM_FIELD_11_VALUE = 13011; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 12 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_12_VALUE = 13012; + */ + const ORDER_CUSTOM_FIELD_12_VALUE = 13012; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 13 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_13_VALUE = 13013; + */ + const ORDER_CUSTOM_FIELD_13_VALUE = 13013; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 14 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_14_VALUE = 13014; + */ + const ORDER_CUSTOM_FIELD_14_VALUE = 13014; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 0 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14000; + */ + const CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14000; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 1 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14001; + */ + const CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14001; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 2 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14002; + */ + const CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14002; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 3 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14003; + */ + const CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14003; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 4 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14004; + */ + const CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14004; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 5 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14005; + */ + const CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14005; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 6 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14006; + */ + const CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14006; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 7 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14007; + */ + const CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14007; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 8 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14008; + */ + const CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14008; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 9 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14009; + */ + const CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14009; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 10 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14010; + */ + const CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14010; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 11 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14011; + */ + const CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14011; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 12 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14012; + */ + const CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14012; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 13 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14013; + */ + const CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14013; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 14 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14014; + */ + const CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14014; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 0 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_0_VALUE = 15000; + */ + const CREATIVE_CUSTOM_FIELD_0_VALUE = 15000; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 1 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_1_VALUE = 15001; + */ + const CREATIVE_CUSTOM_FIELD_1_VALUE = 15001; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 2 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_2_VALUE = 15002; + */ + const CREATIVE_CUSTOM_FIELD_2_VALUE = 15002; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 3 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_3_VALUE = 15003; + */ + const CREATIVE_CUSTOM_FIELD_3_VALUE = 15003; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 4 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_4_VALUE = 15004; + */ + const CREATIVE_CUSTOM_FIELD_4_VALUE = 15004; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 5 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_5_VALUE = 15005; + */ + const CREATIVE_CUSTOM_FIELD_5_VALUE = 15005; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 6 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_6_VALUE = 15006; + */ + const CREATIVE_CUSTOM_FIELD_6_VALUE = 15006; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 7 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_7_VALUE = 15007; + */ + const CREATIVE_CUSTOM_FIELD_7_VALUE = 15007; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 8 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_8_VALUE = 15008; + */ + const CREATIVE_CUSTOM_FIELD_8_VALUE = 15008; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 9 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_9_VALUE = 15009; + */ + const CREATIVE_CUSTOM_FIELD_9_VALUE = 15009; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 10 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_10_VALUE = 15010; + */ + const CREATIVE_CUSTOM_FIELD_10_VALUE = 15010; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 11 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_11_VALUE = 15011; + */ + const CREATIVE_CUSTOM_FIELD_11_VALUE = 15011; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 12 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_12_VALUE = 15012; + */ + const CREATIVE_CUSTOM_FIELD_12_VALUE = 15012; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 13 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_13_VALUE = 15013; + */ + const CREATIVE_CUSTOM_FIELD_13_VALUE = 15013; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 14 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_14_VALUE = 15014; + */ + const CREATIVE_CUSTOM_FIELD_14_VALUE = 15014; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16000; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16000; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16001; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16001; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16002; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16002; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16003; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16003; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16004; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16004; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16005; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16005; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16006; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16006; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16007; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16007; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16008; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16008; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16009; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16009; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16010; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16010; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16011; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16011; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16012; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16012; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16013; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16013; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16014; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16014; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17000; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17000; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17001; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17001; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17002; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17002; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17003; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17003; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17004; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17004; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17005; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17005; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17006; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17006; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17007; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17007; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17008; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17008; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17009; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17009; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17010; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17010; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17011; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17011; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17012; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17012; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17013; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17013; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17014; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17014; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 0 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18000; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18000; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 1 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18001; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18001; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 2 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18002; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18002; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 3 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18003; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18003; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 4 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18004; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18004; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 5 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18005; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18005; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 6 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18006; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18006; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 7 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18007; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18007; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 8 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18008; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18008; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 9 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18009; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18009; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 10 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18010; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18010; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 11 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18011; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18011; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 12 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18012; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18012; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 13 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18013; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18013; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 14 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18014; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18014; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 0 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19000; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19000; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 1 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19001; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19001; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 2 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19002; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19002; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 3 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19003; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19003; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 4 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19004; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19004; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 5 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19005; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19005; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 6 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19006; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19006; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 7 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19007; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19007; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 8 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19008; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19008; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 9 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19009; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19009; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 10 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19010; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19010; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 11 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19011; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19011; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 12 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19012; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19012; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 13 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19013; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19013; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 14 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19014; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19014; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 0 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20000; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20000; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20001; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20001; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20002; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20002; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20003; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20003; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20004; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20004; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20005; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20005; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20006; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20006; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20007; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20007; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20008; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20008; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20009; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20009; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20010; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20010; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20011; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20011; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20012; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20012; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20013; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20013; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20014; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20014; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 0 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21000; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21000; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21001; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21001; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21002; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21002; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21003; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21003; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21004; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21004; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21005; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21005; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21006; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21006; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21007; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21007; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21008; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21008; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21009; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21009; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21010; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21010; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21011; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21011; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21012; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21012; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21013; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21013; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21014; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21014; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 0 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_0_VALUE_ID = 100000; + */ + const CUSTOM_DIMENSION_0_VALUE_ID = 100000; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 1 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_1_VALUE_ID = 100001; + */ + const CUSTOM_DIMENSION_1_VALUE_ID = 100001; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 2 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_2_VALUE_ID = 100002; + */ + const CUSTOM_DIMENSION_2_VALUE_ID = 100002; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 3 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_3_VALUE_ID = 100003; + */ + const CUSTOM_DIMENSION_3_VALUE_ID = 100003; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 4 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_4_VALUE_ID = 100004; + */ + const CUSTOM_DIMENSION_4_VALUE_ID = 100004; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 5 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_5_VALUE_ID = 100005; + */ + const CUSTOM_DIMENSION_5_VALUE_ID = 100005; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 6 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_6_VALUE_ID = 100006; + */ + const CUSTOM_DIMENSION_6_VALUE_ID = 100006; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 9 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_7_VALUE_ID = 100007; + */ + const CUSTOM_DIMENSION_7_VALUE_ID = 100007; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 8 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_8_VALUE_ID = 100008; + */ + const CUSTOM_DIMENSION_8_VALUE_ID = 100008; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 9 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_9_VALUE_ID = 100009; + */ + const CUSTOM_DIMENSION_9_VALUE_ID = 100009; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 0 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_0_VALUE = 101000; + */ + const CUSTOM_DIMENSION_0_VALUE = 101000; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 1 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_1_VALUE = 101001; + */ + const CUSTOM_DIMENSION_1_VALUE = 101001; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 2 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_2_VALUE = 101002; + */ + const CUSTOM_DIMENSION_2_VALUE = 101002; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 3 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_3_VALUE = 101003; + */ + const CUSTOM_DIMENSION_3_VALUE = 101003; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 4 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_4_VALUE = 101004; + */ + const CUSTOM_DIMENSION_4_VALUE = 101004; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 5 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_5_VALUE = 101005; + */ + const CUSTOM_DIMENSION_5_VALUE = 101005; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 6 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_6_VALUE = 101006; + */ + const CUSTOM_DIMENSION_6_VALUE = 101006; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 7 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_7_VALUE = 101007; + */ + const CUSTOM_DIMENSION_7_VALUE = 101007; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 8 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_8_VALUE = 101008; + */ + const CUSTOM_DIMENSION_8_VALUE = 101008; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * id in index 9 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_9_VALUE = 101009; + */ + const CUSTOM_DIMENSION_9_VALUE = 101009; + + private static $valueToName = [ + self::DIMENSION_UNSPECIFIED => 'DIMENSION_UNSPECIFIED', + self::ADVERTISER_DOMAIN_NAME => 'ADVERTISER_DOMAIN_NAME', + self::ADVERTISER_EXTERNAL_ID => 'ADVERTISER_EXTERNAL_ID', + self::ADVERTISER_ID => 'ADVERTISER_ID', + self::ADVERTISER_LABELS => 'ADVERTISER_LABELS', + self::ADVERTISER_LABEL_IDS => 'ADVERTISER_LABEL_IDS', + self::ADVERTISER_NAME => 'ADVERTISER_NAME', + self::ADVERTISER_PRIMARY_CONTACT => 'ADVERTISER_PRIMARY_CONTACT', + self::AD_LOCATION => 'AD_LOCATION', + self::AD_LOCATION_NAME => 'AD_LOCATION_NAME', + self::AD_UNIT_CODE => 'AD_UNIT_CODE', + self::AD_UNIT_CODE_LEVEL_1 => 'AD_UNIT_CODE_LEVEL_1', + self::AD_UNIT_CODE_LEVEL_10 => 'AD_UNIT_CODE_LEVEL_10', + self::AD_UNIT_CODE_LEVEL_11 => 'AD_UNIT_CODE_LEVEL_11', + self::AD_UNIT_CODE_LEVEL_12 => 'AD_UNIT_CODE_LEVEL_12', + self::AD_UNIT_CODE_LEVEL_13 => 'AD_UNIT_CODE_LEVEL_13', + self::AD_UNIT_CODE_LEVEL_14 => 'AD_UNIT_CODE_LEVEL_14', + self::AD_UNIT_CODE_LEVEL_15 => 'AD_UNIT_CODE_LEVEL_15', + self::AD_UNIT_CODE_LEVEL_16 => 'AD_UNIT_CODE_LEVEL_16', + self::AD_UNIT_CODE_LEVEL_2 => 'AD_UNIT_CODE_LEVEL_2', + self::AD_UNIT_CODE_LEVEL_3 => 'AD_UNIT_CODE_LEVEL_3', + self::AD_UNIT_CODE_LEVEL_4 => 'AD_UNIT_CODE_LEVEL_4', + self::AD_UNIT_CODE_LEVEL_5 => 'AD_UNIT_CODE_LEVEL_5', + self::AD_UNIT_CODE_LEVEL_6 => 'AD_UNIT_CODE_LEVEL_6', + self::AD_UNIT_CODE_LEVEL_7 => 'AD_UNIT_CODE_LEVEL_7', + self::AD_UNIT_CODE_LEVEL_8 => 'AD_UNIT_CODE_LEVEL_8', + self::AD_UNIT_CODE_LEVEL_9 => 'AD_UNIT_CODE_LEVEL_9', + self::AD_UNIT_DEPTH => 'AD_UNIT_DEPTH', + self::AD_UNIT_ID => 'AD_UNIT_ID', + self::AD_UNIT_ID_ALL_LEVEL => 'AD_UNIT_ID_ALL_LEVEL', + self::AD_UNIT_ID_LEVEL_1 => 'AD_UNIT_ID_LEVEL_1', + self::AD_UNIT_ID_LEVEL_10 => 'AD_UNIT_ID_LEVEL_10', + self::AD_UNIT_ID_LEVEL_11 => 'AD_UNIT_ID_LEVEL_11', + self::AD_UNIT_ID_LEVEL_12 => 'AD_UNIT_ID_LEVEL_12', + self::AD_UNIT_ID_LEVEL_13 => 'AD_UNIT_ID_LEVEL_13', + self::AD_UNIT_ID_LEVEL_14 => 'AD_UNIT_ID_LEVEL_14', + self::AD_UNIT_ID_LEVEL_15 => 'AD_UNIT_ID_LEVEL_15', + self::AD_UNIT_ID_LEVEL_16 => 'AD_UNIT_ID_LEVEL_16', + self::AD_UNIT_ID_LEVEL_2 => 'AD_UNIT_ID_LEVEL_2', + self::AD_UNIT_ID_LEVEL_3 => 'AD_UNIT_ID_LEVEL_3', + self::AD_UNIT_ID_LEVEL_4 => 'AD_UNIT_ID_LEVEL_4', + self::AD_UNIT_ID_LEVEL_5 => 'AD_UNIT_ID_LEVEL_5', + self::AD_UNIT_ID_LEVEL_6 => 'AD_UNIT_ID_LEVEL_6', + self::AD_UNIT_ID_LEVEL_7 => 'AD_UNIT_ID_LEVEL_7', + self::AD_UNIT_ID_LEVEL_8 => 'AD_UNIT_ID_LEVEL_8', + self::AD_UNIT_ID_LEVEL_9 => 'AD_UNIT_ID_LEVEL_9', + self::AD_UNIT_ID_TOP_LEVEL => 'AD_UNIT_ID_TOP_LEVEL', + self::AD_UNIT_NAME => 'AD_UNIT_NAME', + self::AD_UNIT_NAME_ALL_LEVEL => 'AD_UNIT_NAME_ALL_LEVEL', + self::AD_UNIT_NAME_LEVEL_1 => 'AD_UNIT_NAME_LEVEL_1', + self::AD_UNIT_NAME_LEVEL_10 => 'AD_UNIT_NAME_LEVEL_10', + self::AD_UNIT_NAME_LEVEL_11 => 'AD_UNIT_NAME_LEVEL_11', + self::AD_UNIT_NAME_LEVEL_12 => 'AD_UNIT_NAME_LEVEL_12', + self::AD_UNIT_NAME_LEVEL_13 => 'AD_UNIT_NAME_LEVEL_13', + self::AD_UNIT_NAME_LEVEL_14 => 'AD_UNIT_NAME_LEVEL_14', + self::AD_UNIT_NAME_LEVEL_15 => 'AD_UNIT_NAME_LEVEL_15', + self::AD_UNIT_NAME_LEVEL_16 => 'AD_UNIT_NAME_LEVEL_16', + self::AD_UNIT_NAME_LEVEL_2 => 'AD_UNIT_NAME_LEVEL_2', + self::AD_UNIT_NAME_LEVEL_3 => 'AD_UNIT_NAME_LEVEL_3', + self::AD_UNIT_NAME_LEVEL_4 => 'AD_UNIT_NAME_LEVEL_4', + self::AD_UNIT_NAME_LEVEL_5 => 'AD_UNIT_NAME_LEVEL_5', + self::AD_UNIT_NAME_LEVEL_6 => 'AD_UNIT_NAME_LEVEL_6', + self::AD_UNIT_NAME_LEVEL_7 => 'AD_UNIT_NAME_LEVEL_7', + self::AD_UNIT_NAME_LEVEL_8 => 'AD_UNIT_NAME_LEVEL_8', + self::AD_UNIT_NAME_LEVEL_9 => 'AD_UNIT_NAME_LEVEL_9', + self::AD_UNIT_NAME_TOP_LEVEL => 'AD_UNIT_NAME_TOP_LEVEL', + self::AD_UNIT_REWARD_AMOUNT => 'AD_UNIT_REWARD_AMOUNT', + self::AD_UNIT_REWARD_TYPE => 'AD_UNIT_REWARD_TYPE', + self::AD_UNIT_STATUS => 'AD_UNIT_STATUS', + self::AD_UNIT_STATUS_NAME => 'AD_UNIT_STATUS_NAME', + self::APP_VERSION => 'APP_VERSION', + self::BACKFILL_ADVERTISER_EXTERNAL_ID => 'BACKFILL_ADVERTISER_EXTERNAL_ID', + self::BACKFILL_ADVERTISER_ID => 'BACKFILL_ADVERTISER_ID', + self::BACKFILL_ADVERTISER_LABELS => 'BACKFILL_ADVERTISER_LABELS', + self::BACKFILL_ADVERTISER_LABEL_IDS => 'BACKFILL_ADVERTISER_LABEL_IDS', + self::BACKFILL_ADVERTISER_NAME => 'BACKFILL_ADVERTISER_NAME', + self::BACKFILL_ADVERTISER_PRIMARY_CONTACT => 'BACKFILL_ADVERTISER_PRIMARY_CONTACT', + self::BACKFILL_CREATIVE_BILLING_TYPE => 'BACKFILL_CREATIVE_BILLING_TYPE', + self::BACKFILL_CREATIVE_BILLING_TYPE_NAME => 'BACKFILL_CREATIVE_BILLING_TYPE_NAME', + self::BACKFILL_CREATIVE_CLICK_THROUGH_URL => 'BACKFILL_CREATIVE_CLICK_THROUGH_URL', + self::BACKFILL_CREATIVE_ID => 'BACKFILL_CREATIVE_ID', + self::BACKFILL_CREATIVE_NAME => 'BACKFILL_CREATIVE_NAME', + self::BACKFILL_CREATIVE_THIRD_PARTY_VENDOR => 'BACKFILL_CREATIVE_THIRD_PARTY_VENDOR', + self::BACKFILL_CREATIVE_TYPE => 'BACKFILL_CREATIVE_TYPE', + self::BACKFILL_CREATIVE_TYPE_NAME => 'BACKFILL_CREATIVE_TYPE_NAME', + self::BACKFILL_LINE_ITEM_ARCHIVED => 'BACKFILL_LINE_ITEM_ARCHIVED', + self::BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION => 'BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION', + self::BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME => 'BACKFILL_LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME', + self::BACKFILL_LINE_ITEM_COMPUTED_STATUS => 'BACKFILL_LINE_ITEM_COMPUTED_STATUS', + self::BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME => 'BACKFILL_LINE_ITEM_COMPUTED_STATUS_NAME', + self::BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY => 'BACKFILL_LINE_ITEM_CONTRACTED_QUANTITY', + self::BACKFILL_LINE_ITEM_COST_PER_UNIT => 'BACKFILL_LINE_ITEM_COST_PER_UNIT', + self::BACKFILL_LINE_ITEM_COST_TYPE => 'BACKFILL_LINE_ITEM_COST_TYPE', + self::BACKFILL_LINE_ITEM_COST_TYPE_NAME => 'BACKFILL_LINE_ITEM_COST_TYPE_NAME', + self::BACKFILL_LINE_ITEM_CREATIVE_END_DATE => 'BACKFILL_LINE_ITEM_CREATIVE_END_DATE', + self::BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE => 'BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE', + self::BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME => 'BACKFILL_LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME', + self::BACKFILL_LINE_ITEM_CREATIVE_START_DATE => 'BACKFILL_LINE_ITEM_CREATIVE_START_DATE', + self::BACKFILL_LINE_ITEM_CURRENCY_CODE => 'BACKFILL_LINE_ITEM_CURRENCY_CODE', + self::BACKFILL_LINE_ITEM_DELIVERY_INDICATOR => 'BACKFILL_LINE_ITEM_DELIVERY_INDICATOR', + self::BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE => 'BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE', + self::BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME => 'BACKFILL_LINE_ITEM_DELIVERY_RATE_TYPE_NAME', + self::BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE => 'BACKFILL_LINE_ITEM_DISCOUNT_ABSOLUTE', + self::BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE => 'BACKFILL_LINE_ITEM_DISCOUNT_PERCENTAGE', + self::BACKFILL_LINE_ITEM_END_DATE => 'BACKFILL_LINE_ITEM_END_DATE', + self::BACKFILL_LINE_ITEM_END_DATE_TIME => 'BACKFILL_LINE_ITEM_END_DATE_TIME', + self::BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE => 'BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE', + self::BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME => 'BACKFILL_LINE_ITEM_ENVIRONMENT_TYPE_NAME', + self::BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID => 'BACKFILL_LINE_ITEM_EXTERNAL_DEAL_ID', + self::BACKFILL_LINE_ITEM_EXTERNAL_ID => 'BACKFILL_LINE_ITEM_EXTERNAL_ID', + self::BACKFILL_LINE_ITEM_FREQUENCY_CAP => 'BACKFILL_LINE_ITEM_FREQUENCY_CAP', + self::BACKFILL_LINE_ITEM_ID => 'BACKFILL_LINE_ITEM_ID', + self::BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP => 'BACKFILL_LINE_ITEM_LAST_MODIFIED_BY_APP', + self::BACKFILL_LINE_ITEM_LIFETIME_CLICKS => 'BACKFILL_LINE_ITEM_LIFETIME_CLICKS', + self::BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS => 'BACKFILL_LINE_ITEM_LIFETIME_IMPRESSIONS', + self::BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS => 'BACKFILL_LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS', + self::BACKFILL_LINE_ITEM_MAKEGOOD => 'BACKFILL_LINE_ITEM_MAKEGOOD', + self::BACKFILL_LINE_ITEM_NAME => 'BACKFILL_LINE_ITEM_NAME', + self::BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE => 'BACKFILL_LINE_ITEM_NON_CPD_BOOKED_REVENUE', + self::BACKFILL_LINE_ITEM_OPTIMIZABLE => 'BACKFILL_LINE_ITEM_OPTIMIZABLE', + self::BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE => 'BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE', + self::BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME => 'BACKFILL_LINE_ITEM_PRIMARY_GOAL_TYPE_NAME', + self::BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE => 'BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE', + self::BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME => 'BACKFILL_LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME', + self::BACKFILL_LINE_ITEM_PRIORITY => 'BACKFILL_LINE_ITEM_PRIORITY', + self::BACKFILL_LINE_ITEM_RESERVATION_STATUS => 'BACKFILL_LINE_ITEM_RESERVATION_STATUS', + self::BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME => 'BACKFILL_LINE_ITEM_RESERVATION_STATUS_NAME', + self::BACKFILL_LINE_ITEM_START_DATE => 'BACKFILL_LINE_ITEM_START_DATE', + self::BACKFILL_LINE_ITEM_START_DATE_TIME => 'BACKFILL_LINE_ITEM_START_DATE_TIME', + self::BACKFILL_LINE_ITEM_TYPE => 'BACKFILL_LINE_ITEM_TYPE', + self::BACKFILL_LINE_ITEM_TYPE_NAME => 'BACKFILL_LINE_ITEM_TYPE_NAME', + self::BACKFILL_LINE_ITEM_UNLIMITED_END => 'BACKFILL_LINE_ITEM_UNLIMITED_END', + self::BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT => 'BACKFILL_LINE_ITEM_VALUE_COST_PER_UNIT', + self::BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE => 'BACKFILL_LINE_ITEM_WEB_PROPERTY_CODE', + self::BACKFILL_MASTER_COMPANION_CREATIVE_ID => 'BACKFILL_MASTER_COMPANION_CREATIVE_ID', + self::BACKFILL_MASTER_COMPANION_CREATIVE_NAME => 'BACKFILL_MASTER_COMPANION_CREATIVE_NAME', + self::BACKFILL_ORDER_AGENCY => 'BACKFILL_ORDER_AGENCY', + self::BACKFILL_ORDER_AGENCY_ID => 'BACKFILL_ORDER_AGENCY_ID', + self::BACKFILL_ORDER_BOOKED_CPC => 'BACKFILL_ORDER_BOOKED_CPC', + self::BACKFILL_ORDER_BOOKED_CPM => 'BACKFILL_ORDER_BOOKED_CPM', + self::BACKFILL_ORDER_DELIVERY_STATUS => 'BACKFILL_ORDER_DELIVERY_STATUS', + self::BACKFILL_ORDER_DELIVERY_STATUS_NAME => 'BACKFILL_ORDER_DELIVERY_STATUS_NAME', + self::BACKFILL_ORDER_END_DATE => 'BACKFILL_ORDER_END_DATE', + self::BACKFILL_ORDER_END_DATE_TIME => 'BACKFILL_ORDER_END_DATE_TIME', + self::BACKFILL_ORDER_EXTERNAL_ID => 'BACKFILL_ORDER_EXTERNAL_ID', + self::BACKFILL_ORDER_ID => 'BACKFILL_ORDER_ID', + self::BACKFILL_ORDER_LABELS => 'BACKFILL_ORDER_LABELS', + self::BACKFILL_ORDER_LABEL_IDS => 'BACKFILL_ORDER_LABEL_IDS', + self::BACKFILL_ORDER_LIFETIME_CLICKS => 'BACKFILL_ORDER_LIFETIME_CLICKS', + self::BACKFILL_ORDER_LIFETIME_IMPRESSIONS => 'BACKFILL_ORDER_LIFETIME_IMPRESSIONS', + self::BACKFILL_ORDER_NAME => 'BACKFILL_ORDER_NAME', + self::BACKFILL_ORDER_PO_NUMBER => 'BACKFILL_ORDER_PO_NUMBER', + self::BACKFILL_ORDER_PROGRAMMATIC => 'BACKFILL_ORDER_PROGRAMMATIC', + self::BACKFILL_ORDER_SALESPERSON => 'BACKFILL_ORDER_SALESPERSON', + self::BACKFILL_ORDER_SECONDARY_SALESPEOPLE => 'BACKFILL_ORDER_SECONDARY_SALESPEOPLE', + self::BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID => 'BACKFILL_ORDER_SECONDARY_SALESPEOPLE_ID', + self::BACKFILL_ORDER_SECONDARY_TRAFFICKERS => 'BACKFILL_ORDER_SECONDARY_TRAFFICKERS', + self::BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID => 'BACKFILL_ORDER_SECONDARY_TRAFFICKERS_ID', + self::BACKFILL_ORDER_START_DATE => 'BACKFILL_ORDER_START_DATE', + self::BACKFILL_ORDER_START_DATE_TIME => 'BACKFILL_ORDER_START_DATE_TIME', + self::BACKFILL_ORDER_TRAFFICKER => 'BACKFILL_ORDER_TRAFFICKER', + self::BACKFILL_ORDER_TRAFFICKER_ID => 'BACKFILL_ORDER_TRAFFICKER_ID', + self::BACKFILL_ORDER_UNLIMITED_END => 'BACKFILL_ORDER_UNLIMITED_END', + self::BACKFILL_PROGRAMMATIC_BUYER_ID => 'BACKFILL_PROGRAMMATIC_BUYER_ID', + self::BACKFILL_PROGRAMMATIC_BUYER_NAME => 'BACKFILL_PROGRAMMATIC_BUYER_NAME', + self::BRANDING_TYPE => 'BRANDING_TYPE', + self::BRANDING_TYPE_NAME => 'BRANDING_TYPE_NAME', + self::BROWSER_CATEGORY => 'BROWSER_CATEGORY', + self::BROWSER_CATEGORY_NAME => 'BROWSER_CATEGORY_NAME', + self::BROWSER_ID => 'BROWSER_ID', + self::BROWSER_NAME => 'BROWSER_NAME', + self::CARRIER_ID => 'CARRIER_ID', + self::CARRIER_NAME => 'CARRIER_NAME', + self::CLASSIFIED_ADVERTISER_ID => 'CLASSIFIED_ADVERTISER_ID', + self::CLASSIFIED_ADVERTISER_NAME => 'CLASSIFIED_ADVERTISER_NAME', + self::CLASSIFIED_BRAND_ID => 'CLASSIFIED_BRAND_ID', + self::CLASSIFIED_BRAND_NAME => 'CLASSIFIED_BRAND_NAME', + self::CONTENT_ID => 'CONTENT_ID', + self::CONTENT_NAME => 'CONTENT_NAME', + self::COUNTRY_ID => 'COUNTRY_ID', + self::COUNTRY_NAME => 'COUNTRY_NAME', + self::CREATIVE_BILLING_TYPE => 'CREATIVE_BILLING_TYPE', + self::CREATIVE_BILLING_TYPE_NAME => 'CREATIVE_BILLING_TYPE_NAME', + self::CREATIVE_CLICK_THROUGH_URL => 'CREATIVE_CLICK_THROUGH_URL', + self::CREATIVE_ID => 'CREATIVE_ID', + self::CREATIVE_NAME => 'CREATIVE_NAME', + self::CREATIVE_TECHNOLOGY => 'CREATIVE_TECHNOLOGY', + self::CREATIVE_TECHNOLOGY_NAME => 'CREATIVE_TECHNOLOGY_NAME', + self::CREATIVE_THIRD_PARTY_VENDOR => 'CREATIVE_THIRD_PARTY_VENDOR', + self::CREATIVE_TYPE => 'CREATIVE_TYPE', + self::CREATIVE_TYPE_NAME => 'CREATIVE_TYPE_NAME', + self::DATE => 'DATE', + self::DAY_OF_WEEK => 'DAY_OF_WEEK', + self::DEMAND_CHANNEL => 'DEMAND_CHANNEL', + self::DEMAND_CHANNEL_NAME => 'DEMAND_CHANNEL_NAME', + self::DEMAND_SUBCHANNEL => 'DEMAND_SUBCHANNEL', + self::DEMAND_SUBCHANNEL_NAME => 'DEMAND_SUBCHANNEL_NAME', + self::DEVICE => 'DEVICE', + self::DEVICE_CATEGORY => 'DEVICE_CATEGORY', + self::DEVICE_CATEGORY_NAME => 'DEVICE_CATEGORY_NAME', + self::DEVICE_NAME => 'DEVICE_NAME', + self::EXCHANGE_THIRD_PARTY_COMPANY_ID => 'EXCHANGE_THIRD_PARTY_COMPANY_ID', + self::EXCHANGE_THIRD_PARTY_COMPANY_NAME => 'EXCHANGE_THIRD_PARTY_COMPANY_NAME', + self::FIRST_LOOK_PRICING_RULE_ID => 'FIRST_LOOK_PRICING_RULE_ID', + self::FIRST_LOOK_PRICING_RULE_NAME => 'FIRST_LOOK_PRICING_RULE_NAME', + self::HOUR => 'HOUR', + self::INTERACTION_TYPE => 'INTERACTION_TYPE', + self::INTERACTION_TYPE_NAME => 'INTERACTION_TYPE_NAME', + self::INVENTORY_FORMAT => 'INVENTORY_FORMAT', + self::INVENTORY_FORMAT_NAME => 'INVENTORY_FORMAT_NAME', + self::INVENTORY_TYPE => 'INVENTORY_TYPE', + self::INVENTORY_TYPE_NAME => 'INVENTORY_TYPE_NAME', + self::IS_ADX_DIRECT => 'IS_ADX_DIRECT', + self::IS_FIRST_LOOK_DEAL => 'IS_FIRST_LOOK_DEAL', + self::KEY_VALUES_ID => 'KEY_VALUES_ID', + self::KEY_VALUES_NAME => 'KEY_VALUES_NAME', + self::LINE_ITEM_ARCHIVED => 'LINE_ITEM_ARCHIVED', + self::LINE_ITEM_COMPANION_DELIVERY_OPTION => 'LINE_ITEM_COMPANION_DELIVERY_OPTION', + self::LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME => 'LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME', + self::LINE_ITEM_COMPUTED_STATUS => 'LINE_ITEM_COMPUTED_STATUS', + self::LINE_ITEM_COMPUTED_STATUS_NAME => 'LINE_ITEM_COMPUTED_STATUS_NAME', + self::LINE_ITEM_CONTRACTED_QUANTITY => 'LINE_ITEM_CONTRACTED_QUANTITY', + self::LINE_ITEM_COST_PER_UNIT => 'LINE_ITEM_COST_PER_UNIT', + self::LINE_ITEM_COST_TYPE => 'LINE_ITEM_COST_TYPE', + self::LINE_ITEM_COST_TYPE_NAME => 'LINE_ITEM_COST_TYPE_NAME', + self::LINE_ITEM_CREATIVE_END_DATE => 'LINE_ITEM_CREATIVE_END_DATE', + self::LINE_ITEM_CREATIVE_ROTATION_TYPE => 'LINE_ITEM_CREATIVE_ROTATION_TYPE', + self::LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME => 'LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME', + self::LINE_ITEM_CREATIVE_START_DATE => 'LINE_ITEM_CREATIVE_START_DATE', + self::LINE_ITEM_CURRENCY_CODE => 'LINE_ITEM_CURRENCY_CODE', + self::LINE_ITEM_DELIVERY_INDICATOR => 'LINE_ITEM_DELIVERY_INDICATOR', + self::LINE_ITEM_DELIVERY_RATE_TYPE => 'LINE_ITEM_DELIVERY_RATE_TYPE', + self::LINE_ITEM_DELIVERY_RATE_TYPE_NAME => 'LINE_ITEM_DELIVERY_RATE_TYPE_NAME', + self::LINE_ITEM_DISCOUNT_ABSOLUTE => 'LINE_ITEM_DISCOUNT_ABSOLUTE', + self::LINE_ITEM_DISCOUNT_PERCENTAGE => 'LINE_ITEM_DISCOUNT_PERCENTAGE', + self::LINE_ITEM_END_DATE => 'LINE_ITEM_END_DATE', + self::LINE_ITEM_END_DATE_TIME => 'LINE_ITEM_END_DATE_TIME', + self::LINE_ITEM_ENVIRONMENT_TYPE => 'LINE_ITEM_ENVIRONMENT_TYPE', + self::LINE_ITEM_ENVIRONMENT_TYPE_NAME => 'LINE_ITEM_ENVIRONMENT_TYPE_NAME', + self::LINE_ITEM_EXTERNAL_DEAL_ID => 'LINE_ITEM_EXTERNAL_DEAL_ID', + self::LINE_ITEM_EXTERNAL_ID => 'LINE_ITEM_EXTERNAL_ID', + self::LINE_ITEM_FREQUENCY_CAP => 'LINE_ITEM_FREQUENCY_CAP', + self::LINE_ITEM_ID => 'LINE_ITEM_ID', + self::LINE_ITEM_LAST_MODIFIED_BY_APP => 'LINE_ITEM_LAST_MODIFIED_BY_APP', + self::LINE_ITEM_LIFETIME_CLICKS => 'LINE_ITEM_LIFETIME_CLICKS', + self::LINE_ITEM_LIFETIME_IMPRESSIONS => 'LINE_ITEM_LIFETIME_IMPRESSIONS', + self::LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS => 'LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS', + self::LINE_ITEM_MAKEGOOD => 'LINE_ITEM_MAKEGOOD', + self::LINE_ITEM_NAME => 'LINE_ITEM_NAME', + self::LINE_ITEM_NON_CPD_BOOKED_REVENUE => 'LINE_ITEM_NON_CPD_BOOKED_REVENUE', + self::LINE_ITEM_OPTIMIZABLE => 'LINE_ITEM_OPTIMIZABLE', + self::LINE_ITEM_PRIMARY_GOAL_TYPE => 'LINE_ITEM_PRIMARY_GOAL_TYPE', + self::LINE_ITEM_PRIMARY_GOAL_TYPE_NAME => 'LINE_ITEM_PRIMARY_GOAL_TYPE_NAME', + self::LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE => 'LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE', + self::LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE => 'LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE', + self::LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE => 'LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE', + self::LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME => 'LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME', + self::LINE_ITEM_PRIORITY => 'LINE_ITEM_PRIORITY', + self::LINE_ITEM_RESERVATION_STATUS => 'LINE_ITEM_RESERVATION_STATUS', + self::LINE_ITEM_RESERVATION_STATUS_NAME => 'LINE_ITEM_RESERVATION_STATUS_NAME', + self::LINE_ITEM_START_DATE => 'LINE_ITEM_START_DATE', + self::LINE_ITEM_START_DATE_TIME => 'LINE_ITEM_START_DATE_TIME', + self::LINE_ITEM_TYPE => 'LINE_ITEM_TYPE', + self::LINE_ITEM_TYPE_NAME => 'LINE_ITEM_TYPE_NAME', + self::LINE_ITEM_UNLIMITED_END => 'LINE_ITEM_UNLIMITED_END', + self::LINE_ITEM_VALUE_COST_PER_UNIT => 'LINE_ITEM_VALUE_COST_PER_UNIT', + self::LINE_ITEM_WEB_PROPERTY_CODE => 'LINE_ITEM_WEB_PROPERTY_CODE', + self::MASTER_COMPANION_CREATIVE_ID => 'MASTER_COMPANION_CREATIVE_ID', + self::MASTER_COMPANION_CREATIVE_NAME => 'MASTER_COMPANION_CREATIVE_NAME', + self::MOBILE_APP_FREE => 'MOBILE_APP_FREE', + self::MOBILE_APP_ICON_URL => 'MOBILE_APP_ICON_URL', + self::MOBILE_APP_ID => 'MOBILE_APP_ID', + self::MOBILE_APP_NAME => 'MOBILE_APP_NAME', + self::MOBILE_APP_OWNERSHIP_STATUS => 'MOBILE_APP_OWNERSHIP_STATUS', + self::MOBILE_APP_OWNERSHIP_STATUS_NAME => 'MOBILE_APP_OWNERSHIP_STATUS_NAME', + self::MOBILE_APP_STORE => 'MOBILE_APP_STORE', + self::MOBILE_APP_STORE_NAME => 'MOBILE_APP_STORE_NAME', + self::MOBILE_INVENTORY_TYPE => 'MOBILE_INVENTORY_TYPE', + self::MOBILE_INVENTORY_TYPE_NAME => 'MOBILE_INVENTORY_TYPE_NAME', + self::MOBILE_SDK_VERSION_NAME => 'MOBILE_SDK_VERSION_NAME', + self::MONTH_YEAR => 'MONTH_YEAR', + self::NATIVE_AD_FORMAT_ID => 'NATIVE_AD_FORMAT_ID', + self::NATIVE_AD_FORMAT_NAME => 'NATIVE_AD_FORMAT_NAME', + self::NATIVE_STYLE_ID => 'NATIVE_STYLE_ID', + self::NATIVE_STYLE_NAME => 'NATIVE_STYLE_NAME', + self::OPERATING_SYSTEM_CATEGORY => 'OPERATING_SYSTEM_CATEGORY', + self::OPERATING_SYSTEM_CATEGORY_NAME => 'OPERATING_SYSTEM_CATEGORY_NAME', + self::OPERATING_SYSTEM_VERSION_ID => 'OPERATING_SYSTEM_VERSION_ID', + self::OPERATING_SYSTEM_VERSION_NAME => 'OPERATING_SYSTEM_VERSION_NAME', + self::ORDER_AGENCY => 'ORDER_AGENCY', + self::ORDER_AGENCY_ID => 'ORDER_AGENCY_ID', + self::ORDER_BOOKED_CPC => 'ORDER_BOOKED_CPC', + self::ORDER_BOOKED_CPM => 'ORDER_BOOKED_CPM', + self::ORDER_DELIVERY_STATUS => 'ORDER_DELIVERY_STATUS', + self::ORDER_DELIVERY_STATUS_NAME => 'ORDER_DELIVERY_STATUS_NAME', + self::ORDER_END_DATE => 'ORDER_END_DATE', + self::ORDER_END_DATE_TIME => 'ORDER_END_DATE_TIME', + self::ORDER_EXTERNAL_ID => 'ORDER_EXTERNAL_ID', + self::ORDER_ID => 'ORDER_ID', + self::ORDER_LABELS => 'ORDER_LABELS', + self::ORDER_LABEL_IDS => 'ORDER_LABEL_IDS', + self::ORDER_LIFETIME_CLICKS => 'ORDER_LIFETIME_CLICKS', + self::ORDER_LIFETIME_IMPRESSIONS => 'ORDER_LIFETIME_IMPRESSIONS', + self::ORDER_NAME => 'ORDER_NAME', + self::ORDER_PO_NUMBER => 'ORDER_PO_NUMBER', + self::ORDER_PROGRAMMATIC => 'ORDER_PROGRAMMATIC', + self::ORDER_SALESPERSON => 'ORDER_SALESPERSON', + self::ORDER_SECONDARY_SALESPEOPLE => 'ORDER_SECONDARY_SALESPEOPLE', + self::ORDER_SECONDARY_SALESPEOPLE_ID => 'ORDER_SECONDARY_SALESPEOPLE_ID', + self::ORDER_SECONDARY_TRAFFICKERS => 'ORDER_SECONDARY_TRAFFICKERS', + self::ORDER_SECONDARY_TRAFFICKERS_ID => 'ORDER_SECONDARY_TRAFFICKERS_ID', + self::ORDER_START_DATE => 'ORDER_START_DATE', + self::ORDER_START_DATE_TIME => 'ORDER_START_DATE_TIME', + self::ORDER_TRAFFICKER => 'ORDER_TRAFFICKER', + self::ORDER_TRAFFICKER_ID => 'ORDER_TRAFFICKER_ID', + self::ORDER_UNLIMITED_END => 'ORDER_UNLIMITED_END', + self::PLACEMENT_ID => 'PLACEMENT_ID', + self::PLACEMENT_ID_ALL => 'PLACEMENT_ID_ALL', + self::PLACEMENT_NAME => 'PLACEMENT_NAME', + self::PLACEMENT_NAME_ALL => 'PLACEMENT_NAME_ALL', + self::PLACEMENT_STATUS => 'PLACEMENT_STATUS', + self::PLACEMENT_STATUS_ALL => 'PLACEMENT_STATUS_ALL', + self::PLACEMENT_STATUS_NAME => 'PLACEMENT_STATUS_NAME', + self::PLACEMENT_STATUS_NAME_ALL => 'PLACEMENT_STATUS_NAME_ALL', + self::PROGRAMMATIC_BUYER_ID => 'PROGRAMMATIC_BUYER_ID', + self::PROGRAMMATIC_BUYER_NAME => 'PROGRAMMATIC_BUYER_NAME', + self::PROGRAMMATIC_CHANNEL => 'PROGRAMMATIC_CHANNEL', + self::PROGRAMMATIC_CHANNEL_NAME => 'PROGRAMMATIC_CHANNEL_NAME', + self::RENDERED_CREATIVE_SIZE => 'RENDERED_CREATIVE_SIZE', + self::REQUESTED_AD_SIZES => 'REQUESTED_AD_SIZES', + self::REQUEST_TYPE => 'REQUEST_TYPE', + self::REQUEST_TYPE_NAME => 'REQUEST_TYPE_NAME', + self::SITE => 'SITE', + self::TARGETING_ID => 'TARGETING_ID', + self::TARGETING_NAME => 'TARGETING_NAME', + self::TARGETING_TYPE => 'TARGETING_TYPE', + self::TARGETING_TYPE_NAME => 'TARGETING_TYPE_NAME', + self::TRAFFIC_SOURCE => 'TRAFFIC_SOURCE', + self::TRAFFIC_SOURCE_NAME => 'TRAFFIC_SOURCE_NAME', + self::UNIFIED_PRICING_RULE_ID => 'UNIFIED_PRICING_RULE_ID', + self::UNIFIED_PRICING_RULE_NAME => 'UNIFIED_PRICING_RULE_NAME', + self::VIDEO_PLCMT => 'VIDEO_PLCMT', + self::VIDEO_PLCMT_NAME => 'VIDEO_PLCMT_NAME', + self::WEEK => 'WEEK', + self::YIELD_GROUP_BUYER_NAME => 'YIELD_GROUP_BUYER_NAME', + self::YIELD_GROUP_ID => 'YIELD_GROUP_ID', + self::YIELD_GROUP_NAME => 'YIELD_GROUP_NAME', + self::LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_0_VALUE => 'LINE_ITEM_CUSTOM_FIELD_0_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_1_VALUE => 'LINE_ITEM_CUSTOM_FIELD_1_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_2_VALUE => 'LINE_ITEM_CUSTOM_FIELD_2_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_3_VALUE => 'LINE_ITEM_CUSTOM_FIELD_3_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_4_VALUE => 'LINE_ITEM_CUSTOM_FIELD_4_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_5_VALUE => 'LINE_ITEM_CUSTOM_FIELD_5_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_6_VALUE => 'LINE_ITEM_CUSTOM_FIELD_6_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_7_VALUE => 'LINE_ITEM_CUSTOM_FIELD_7_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_8_VALUE => 'LINE_ITEM_CUSTOM_FIELD_8_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_9_VALUE => 'LINE_ITEM_CUSTOM_FIELD_9_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_10_VALUE => 'LINE_ITEM_CUSTOM_FIELD_10_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_11_VALUE => 'LINE_ITEM_CUSTOM_FIELD_11_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_12_VALUE => 'LINE_ITEM_CUSTOM_FIELD_12_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_13_VALUE => 'LINE_ITEM_CUSTOM_FIELD_13_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_14_VALUE => 'LINE_ITEM_CUSTOM_FIELD_14_VALUE', + self::ORDER_CUSTOM_FIELD_0_OPTION_ID => 'ORDER_CUSTOM_FIELD_0_OPTION_ID', + self::ORDER_CUSTOM_FIELD_1_OPTION_ID => 'ORDER_CUSTOM_FIELD_1_OPTION_ID', + self::ORDER_CUSTOM_FIELD_2_OPTION_ID => 'ORDER_CUSTOM_FIELD_2_OPTION_ID', + self::ORDER_CUSTOM_FIELD_3_OPTION_ID => 'ORDER_CUSTOM_FIELD_3_OPTION_ID', + self::ORDER_CUSTOM_FIELD_4_OPTION_ID => 'ORDER_CUSTOM_FIELD_4_OPTION_ID', + self::ORDER_CUSTOM_FIELD_5_OPTION_ID => 'ORDER_CUSTOM_FIELD_5_OPTION_ID', + self::ORDER_CUSTOM_FIELD_6_OPTION_ID => 'ORDER_CUSTOM_FIELD_6_OPTION_ID', + self::ORDER_CUSTOM_FIELD_7_OPTION_ID => 'ORDER_CUSTOM_FIELD_7_OPTION_ID', + self::ORDER_CUSTOM_FIELD_8_OPTION_ID => 'ORDER_CUSTOM_FIELD_8_OPTION_ID', + self::ORDER_CUSTOM_FIELD_9_OPTION_ID => 'ORDER_CUSTOM_FIELD_9_OPTION_ID', + self::ORDER_CUSTOM_FIELD_10_OPTION_ID => 'ORDER_CUSTOM_FIELD_10_OPTION_ID', + self::ORDER_CUSTOM_FIELD_11_OPTION_ID => 'ORDER_CUSTOM_FIELD_11_OPTION_ID', + self::ORDER_CUSTOM_FIELD_12_OPTION_ID => 'ORDER_CUSTOM_FIELD_12_OPTION_ID', + self::ORDER_CUSTOM_FIELD_13_OPTION_ID => 'ORDER_CUSTOM_FIELD_13_OPTION_ID', + self::ORDER_CUSTOM_FIELD_14_OPTION_ID => 'ORDER_CUSTOM_FIELD_14_OPTION_ID', + self::ORDER_CUSTOM_FIELD_0_VALUE => 'ORDER_CUSTOM_FIELD_0_VALUE', + self::ORDER_CUSTOM_FIELD_1_VALUE => 'ORDER_CUSTOM_FIELD_1_VALUE', + self::ORDER_CUSTOM_FIELD_2_VALUE => 'ORDER_CUSTOM_FIELD_2_VALUE', + self::ORDER_CUSTOM_FIELD_3_VALUE => 'ORDER_CUSTOM_FIELD_3_VALUE', + self::ORDER_CUSTOM_FIELD_4_VALUE => 'ORDER_CUSTOM_FIELD_4_VALUE', + self::ORDER_CUSTOM_FIELD_5_VALUE => 'ORDER_CUSTOM_FIELD_5_VALUE', + self::ORDER_CUSTOM_FIELD_6_VALUE => 'ORDER_CUSTOM_FIELD_6_VALUE', + self::ORDER_CUSTOM_FIELD_7_VALUE => 'ORDER_CUSTOM_FIELD_7_VALUE', + self::ORDER_CUSTOM_FIELD_8_VALUE => 'ORDER_CUSTOM_FIELD_8_VALUE', + self::ORDER_CUSTOM_FIELD_9_VALUE => 'ORDER_CUSTOM_FIELD_9_VALUE', + self::ORDER_CUSTOM_FIELD_10_VALUE => 'ORDER_CUSTOM_FIELD_10_VALUE', + self::ORDER_CUSTOM_FIELD_11_VALUE => 'ORDER_CUSTOM_FIELD_11_VALUE', + self::ORDER_CUSTOM_FIELD_12_VALUE => 'ORDER_CUSTOM_FIELD_12_VALUE', + self::ORDER_CUSTOM_FIELD_13_VALUE => 'ORDER_CUSTOM_FIELD_13_VALUE', + self::ORDER_CUSTOM_FIELD_14_VALUE => 'ORDER_CUSTOM_FIELD_14_VALUE', + self::CREATIVE_CUSTOM_FIELD_0_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_0_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_1_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_1_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_2_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_2_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_3_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_3_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_4_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_4_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_5_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_5_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_6_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_6_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_7_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_7_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_8_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_8_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_9_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_9_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_10_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_10_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_11_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_11_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_12_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_12_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_13_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_13_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_14_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_14_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_0_VALUE => 'CREATIVE_CUSTOM_FIELD_0_VALUE', + self::CREATIVE_CUSTOM_FIELD_1_VALUE => 'CREATIVE_CUSTOM_FIELD_1_VALUE', + self::CREATIVE_CUSTOM_FIELD_2_VALUE => 'CREATIVE_CUSTOM_FIELD_2_VALUE', + self::CREATIVE_CUSTOM_FIELD_3_VALUE => 'CREATIVE_CUSTOM_FIELD_3_VALUE', + self::CREATIVE_CUSTOM_FIELD_4_VALUE => 'CREATIVE_CUSTOM_FIELD_4_VALUE', + self::CREATIVE_CUSTOM_FIELD_5_VALUE => 'CREATIVE_CUSTOM_FIELD_5_VALUE', + self::CREATIVE_CUSTOM_FIELD_6_VALUE => 'CREATIVE_CUSTOM_FIELD_6_VALUE', + self::CREATIVE_CUSTOM_FIELD_7_VALUE => 'CREATIVE_CUSTOM_FIELD_7_VALUE', + self::CREATIVE_CUSTOM_FIELD_8_VALUE => 'CREATIVE_CUSTOM_FIELD_8_VALUE', + self::CREATIVE_CUSTOM_FIELD_9_VALUE => 'CREATIVE_CUSTOM_FIELD_9_VALUE', + self::CREATIVE_CUSTOM_FIELD_10_VALUE => 'CREATIVE_CUSTOM_FIELD_10_VALUE', + self::CREATIVE_CUSTOM_FIELD_11_VALUE => 'CREATIVE_CUSTOM_FIELD_11_VALUE', + self::CREATIVE_CUSTOM_FIELD_12_VALUE => 'CREATIVE_CUSTOM_FIELD_12_VALUE', + self::CREATIVE_CUSTOM_FIELD_13_VALUE => 'CREATIVE_CUSTOM_FIELD_13_VALUE', + self::CREATIVE_CUSTOM_FIELD_14_VALUE => 'CREATIVE_CUSTOM_FIELD_14_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE', + self::CUSTOM_DIMENSION_0_VALUE_ID => 'CUSTOM_DIMENSION_0_VALUE_ID', + self::CUSTOM_DIMENSION_1_VALUE_ID => 'CUSTOM_DIMENSION_1_VALUE_ID', + self::CUSTOM_DIMENSION_2_VALUE_ID => 'CUSTOM_DIMENSION_2_VALUE_ID', + self::CUSTOM_DIMENSION_3_VALUE_ID => 'CUSTOM_DIMENSION_3_VALUE_ID', + self::CUSTOM_DIMENSION_4_VALUE_ID => 'CUSTOM_DIMENSION_4_VALUE_ID', + self::CUSTOM_DIMENSION_5_VALUE_ID => 'CUSTOM_DIMENSION_5_VALUE_ID', + self::CUSTOM_DIMENSION_6_VALUE_ID => 'CUSTOM_DIMENSION_6_VALUE_ID', + self::CUSTOM_DIMENSION_7_VALUE_ID => 'CUSTOM_DIMENSION_7_VALUE_ID', + self::CUSTOM_DIMENSION_8_VALUE_ID => 'CUSTOM_DIMENSION_8_VALUE_ID', + self::CUSTOM_DIMENSION_9_VALUE_ID => 'CUSTOM_DIMENSION_9_VALUE_ID', + self::CUSTOM_DIMENSION_0_VALUE => 'CUSTOM_DIMENSION_0_VALUE', + self::CUSTOM_DIMENSION_1_VALUE => 'CUSTOM_DIMENSION_1_VALUE', + self::CUSTOM_DIMENSION_2_VALUE => 'CUSTOM_DIMENSION_2_VALUE', + self::CUSTOM_DIMENSION_3_VALUE => 'CUSTOM_DIMENSION_3_VALUE', + self::CUSTOM_DIMENSION_4_VALUE => 'CUSTOM_DIMENSION_4_VALUE', + self::CUSTOM_DIMENSION_5_VALUE => 'CUSTOM_DIMENSION_5_VALUE', + self::CUSTOM_DIMENSION_6_VALUE => 'CUSTOM_DIMENSION_6_VALUE', + self::CUSTOM_DIMENSION_7_VALUE => 'CUSTOM_DIMENSION_7_VALUE', + self::CUSTOM_DIMENSION_8_VALUE => 'CUSTOM_DIMENSION_8_VALUE', + self::CUSTOM_DIMENSION_9_VALUE => 'CUSTOM_DIMENSION_9_VALUE', + ]; + + 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/AdsAdManager/src/V1/Report/Field.php b/AdsAdManager/src/V1/Report/Field.php new file mode 100644 index 000000000000..18b4a58903b3 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Field.php @@ -0,0 +1,109 @@ +google.ads.admanager.v1.Report.Field + */ +class Field extends \Google\Protobuf\Internal\Message +{ + protected $field; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $dimension + * The dimension this field represents. + * @type int $metric + * The metric this field represents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * The dimension this field represents. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Dimension dimension = 1; + * @return int + */ + public function getDimension() + { + return $this->readOneof(1); + } + + public function hasDimension() + { + return $this->hasOneof(1); + } + + /** + * The dimension this field represents. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Dimension dimension = 1; + * @param int $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\Dimension::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The metric this field represents. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Metric metric = 2; + * @return int + */ + public function getMetric() + { + return $this->readOneof(2); + } + + public function hasMetric() + { + return $this->hasOneof(2); + } + + /** + * The metric this field represents. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Metric metric = 2; + * @param int $var + * @return $this + */ + public function setMetric($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\Metric::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getField() + { + return $this->whichOneof("field"); + } + +} + + diff --git a/AdsAdManager/src/V1/Report/Filter.php b/AdsAdManager/src/V1/Report/Filter.php new file mode 100644 index 000000000000..15586cbbd0e7 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Filter.php @@ -0,0 +1,175 @@ +google.ads.admanager.v1.Report.Filter + */ +class Filter extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Report\Filter\FieldFilter $field_filter + * A filter on a single field. + * @type \Google\Ads\AdManager\V1\Report\Filter $not_filter + * A filter whose result is negated. + * @type \Google\Ads\AdManager\V1\Report\Filter\FilterList $and_filter + * A list of filters whose results are AND-ed. + * @type \Google\Ads\AdManager\V1\Report\Filter\FilterList $or_filter + * A list of filters whose results are OR-ed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * A filter on a single field. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter.FieldFilter field_filter = 1; + * @return \Google\Ads\AdManager\V1\Report\Filter\FieldFilter|null + */ + public function getFieldFilter() + { + return $this->readOneof(1); + } + + public function hasFieldFilter() + { + return $this->hasOneof(1); + } + + /** + * A filter on a single field. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter.FieldFilter field_filter = 1; + * @param \Google\Ads\AdManager\V1\Report\Filter\FieldFilter $var + * @return $this + */ + public function setFieldFilter($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Filter\FieldFilter::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A filter whose result is negated. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter not_filter = 2; + * @return \Google\Ads\AdManager\V1\Report\Filter|null + */ + public function getNotFilter() + { + return $this->readOneof(2); + } + + public function hasNotFilter() + { + return $this->hasOneof(2); + } + + /** + * A filter whose result is negated. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter not_filter = 2; + * @param \Google\Ads\AdManager\V1\Report\Filter $var + * @return $this + */ + public function setNotFilter($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Filter::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A list of filters whose results are AND-ed. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter.FilterList and_filter = 3; + * @return \Google\Ads\AdManager\V1\Report\Filter\FilterList|null + */ + public function getAndFilter() + { + return $this->readOneof(3); + } + + public function hasAndFilter() + { + return $this->hasOneof(3); + } + + /** + * A list of filters whose results are AND-ed. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter.FilterList and_filter = 3; + * @param \Google\Ads\AdManager\V1\Report\Filter\FilterList $var + * @return $this + */ + public function setAndFilter($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Filter\FilterList::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A list of filters whose results are OR-ed. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter.FilterList or_filter = 4; + * @return \Google\Ads\AdManager\V1\Report\Filter\FilterList|null + */ + public function getOrFilter() + { + return $this->readOneof(4); + } + + public function hasOrFilter() + { + return $this->hasOneof(4); + } + + /** + * A list of filters whose results are OR-ed. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter.FilterList or_filter = 4; + * @param \Google\Ads\AdManager\V1\Report\Filter\FilterList $var + * @return $this + */ + public function setOrFilter($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Filter\FilterList::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + + diff --git a/AdsAdManager/src/V1/Report/Filter/FieldFilter.php b/AdsAdManager/src/V1/Report/Filter/FieldFilter.php new file mode 100644 index 000000000000..c4f05e8d1a11 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Filter/FieldFilter.php @@ -0,0 +1,286 @@ +google.ads.admanager.v1.Report.Filter.FieldFilter + */ +class FieldFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field to filter on. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field = null; + /** + * Required. The operation of this filter. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter.Operation operation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $operation = 0; + /** + * Required. Values to filter to. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value values = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $values; + /** + * Optional. Use to filter on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.Slice slice = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $slice = null; + /** + * Optional. When using time period columns, use this to filter on a + * specific column. + * + * Generated from protobuf field optional int32 time_period_index = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_period_index = null; + /** + * Optional. Use to specify which metric value type to filter on. Defaults + * to PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.MetricValueType metric_value_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_value_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Report\Field $field + * Required. The field to filter on. + * @type int $operation + * Required. The operation of this filter. + * @type array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $values + * Required. Values to filter to. + * @type \Google\Ads\AdManager\V1\Report\Slice $slice + * Optional. Use to filter on a specific slice of data. + * @type int $time_period_index + * Optional. When using time period columns, use this to filter on a + * specific column. + * @type int $metric_value_type + * Optional. Use to specify which metric value type to filter on. Defaults + * to PRIMARY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field to filter on. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Report\Field|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * Required. The field to filter on. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Report\Field $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Field::class); + $this->field = $var; + + return $this; + } + + /** + * Required. The operation of this filter. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter.Operation operation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Required. The operation of this filter. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Filter.Operation operation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\Filter\Operation::class); + $this->operation = $var; + + return $this; + } + + /** + * Required. Values to filter to. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value values = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Required. Values to filter to. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Value values = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\Report\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Value::class); + $this->values = $arr; + + return $this; + } + + /** + * Optional. Use to filter on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.Slice slice = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\Report\Slice|null + */ + public function getSlice() + { + return $this->slice; + } + + public function hasSlice() + { + return isset($this->slice); + } + + public function clearSlice() + { + unset($this->slice); + } + + /** + * Optional. Use to filter on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.Slice slice = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\Report\Slice $var + * @return $this + */ + public function setSlice($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Slice::class); + $this->slice = $var; + + return $this; + } + + /** + * Optional. When using time period columns, use this to filter on a + * specific column. + * + * Generated from protobuf field optional int32 time_period_index = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTimePeriodIndex() + { + return isset($this->time_period_index) ? $this->time_period_index : 0; + } + + public function hasTimePeriodIndex() + { + return isset($this->time_period_index); + } + + public function clearTimePeriodIndex() + { + unset($this->time_period_index); + } + + /** + * Optional. When using time period columns, use this to filter on a + * specific column. + * + * Generated from protobuf field optional int32 time_period_index = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTimePeriodIndex($var) + { + GPBUtil::checkInt32($var); + $this->time_period_index = $var; + + return $this; + } + + /** + * Optional. Use to specify which metric value type to filter on. Defaults + * to PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.MetricValueType metric_value_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMetricValueType() + { + return isset($this->metric_value_type) ? $this->metric_value_type : 0; + } + + public function hasMetricValueType() + { + return isset($this->metric_value_type); + } + + public function clearMetricValueType() + { + unset($this->metric_value_type); + } + + /** + * Optional. Use to specify which metric value type to filter on. Defaults + * to PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.MetricValueType metric_value_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMetricValueType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\MetricValueType::class); + $this->metric_value_type = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/Filter/FilterList.php b/AdsAdManager/src/V1/Report/Filter/FilterList.php new file mode 100644 index 000000000000..18b3bd6ef52f --- /dev/null +++ b/AdsAdManager/src/V1/Report/Filter/FilterList.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.Report.Filter.FilterList + */ +class FilterList extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of filters. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Report\Filter>|\Google\Protobuf\Internal\RepeatedField $filters + * Required. A list of filters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of filters. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Required. A list of filters. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\Report\Filter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Filter::class); + $this->filters = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/Filter/Operation.php b/AdsAdManager/src/V1/Report/Filter/Operation.php new file mode 100644 index 000000000000..460971cb6667 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Filter/Operation.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.Report.Filter.Operation + */ +class Operation +{ + /** + * For scalar operands, checks if the operand is in the set of provided + * filter values. + * For list operands, checks if any element in the operand is in the set + * of provided filter values. + * Default value. + * + * Generated from protobuf enum IN = 0; + */ + const IN = 0; + /** + * For scalar operands, checks that the operand is not in the set of + * provided filter values. + * For list operands, checks that none of the elements in the operand + * is in the set of provided filter values. + * + * Generated from protobuf enum NOT_IN = 1; + */ + const NOT_IN = 1; + /** + * For scalar string operands, checks if the operand contains any of the + * provided filter substrings. + * For string list operands, checks if any string in the operand contains + * any of the provided filter substrings. + * + * Generated from protobuf enum CONTAINS = 2; + */ + const CONTAINS = 2; + /** + * For scalar string operands, checks that the operand contains none of + * the provided filter substrings. + * For string list operands, checks that none of the strings in the + * operand contain none of the provided filter substrings. + * + * Generated from protobuf enum NOT_CONTAINS = 3; + */ + const NOT_CONTAINS = 3; + /** + * Operand is less than the provided filter value. + * + * Generated from protobuf enum LESS_THAN = 4; + */ + const LESS_THAN = 4; + /** + * Operand is less than or equal to provided filter value. + * + * Generated from protobuf enum LESS_THAN_EQUALS = 5; + */ + const LESS_THAN_EQUALS = 5; + /** + * Operand is greater than provided filter value. + * + * Generated from protobuf enum GREATER_THAN = 6; + */ + const GREATER_THAN = 6; + /** + * Operand is greater than or equal to provided filter value. + * + * Generated from protobuf enum GREATER_THAN_EQUALS = 7; + */ + const GREATER_THAN_EQUALS = 7; + /** + * Operand is between provided filter values. + * + * Generated from protobuf enum BETWEEN = 8; + */ + const BETWEEN = 8; + /** + * Operand matches against a regex or set of regexes (one must match) + * + * Generated from protobuf enum MATCHES = 9; + */ + const MATCHES = 9; + /** + * Operand negative matches against a regex or set of regexes (none must + * match) + * + * Generated from protobuf enum NOT_MATCHES = 10; + */ + const NOT_MATCHES = 10; + + private static $valueToName = [ + self::IN => 'IN', + self::NOT_IN => 'NOT_IN', + self::CONTAINS => 'CONTAINS', + self::NOT_CONTAINS => 'NOT_CONTAINS', + self::LESS_THAN => 'LESS_THAN', + self::LESS_THAN_EQUALS => 'LESS_THAN_EQUALS', + self::GREATER_THAN => 'GREATER_THAN', + self::GREATER_THAN_EQUALS => 'GREATER_THAN_EQUALS', + self::BETWEEN => 'BETWEEN', + self::MATCHES => 'MATCHES', + self::NOT_MATCHES => 'NOT_MATCHES', + ]; + + 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/AdsAdManager/src/V1/Report/Flag.php b/AdsAdManager/src/V1/Report/Flag.php new file mode 100644 index 000000000000..25920744cd5a --- /dev/null +++ b/AdsAdManager/src/V1/Report/Flag.php @@ -0,0 +1,118 @@ +google.ads.admanager.v1.Report.Flag + */ +class Flag extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Filters to apply for the flag. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $filters; + /** + * Optional. Name of the flag. + * The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + * the colored flags that appear in the UI. The UI will not display flags + * with other names, but they are available for use by API clients. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Report\Filter>|\Google\Protobuf\Internal\RepeatedField $filters + * Required. Filters to apply for the flag. + * @type string $name + * Optional. Name of the flag. + * The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + * the colored flags that appear in the UI. The UI will not display flags + * with other names, but they are available for use by API clients. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Filters to apply for the flag. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Required. Filters to apply for the flag. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\Report\Filter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Filter::class); + $this->filters = $arr; + + return $this; + } + + /** + * Optional. Name of the flag. + * The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + * the colored flags that appear in the UI. The UI will not display flags + * with other names, but they are available for use by API clients. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Name of the flag. + * The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + * the colored flags that appear in the UI. The UI will not display flags + * with other names, but they are available for use by API clients. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/Metric.php b/AdsAdManager/src/V1/Report/Metric.php new file mode 100644 index 000000000000..eced4d9adff3 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Metric.php @@ -0,0 +1,1306 @@ +google.ads.admanager.v1.Report.Metric + */ +class Metric +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum METRIC_UNSPECIFIED = 0; + */ + const METRIC_UNSPECIFIED = 0; + /** + * Active View total average time in seconds that specific impressions are + * reported as being viewable. + * + * Generated from protobuf enum ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61; + */ + const ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61; + /** + * Total number of impressions that were eligible to measure viewability. + * + * Generated from protobuf enum ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58; + */ + const ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58; + /** + * The total number of impressions that were sampled and measured by active + * view. + * + * Generated from protobuf enum ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57; + */ + const ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57; + /** + * The percentage of total impressions that were measurable by active view + * (out of all the total impressions sampled for active view). + * + * Generated from protobuf enum ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60; + */ + const ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60; + /** + * The total number of impressions viewed on the user's screen. + * + * Generated from protobuf enum ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56; + */ + const ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56; + /** + * The percentage of total impressions viewed on the user's screen (out of + * the total impressions measurable by active view). + * + * Generated from protobuf enum ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59; + */ + const ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59; + /** + * Active View AdSense average time in seconds that specific impressions are + * reported as being viewable. + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73; + */ + const ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73; + /** + * Total number of impressions delivered by AdSense that were eligible to + * measure viewability. + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70; + */ + const ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70; + /** + * The number of impressions delivered by AdSense that were sampled, and + * measurable by active view. + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69; + */ + const ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69; + /** + * The percentage of impressions delivered by AdSense that were measurable + * by active view (out of all AdSense impressions sampled for active view). + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72; + */ + const ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72; + /** + * The number of impressions delivered by AdSense viewed on the user's + * screen. + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68; + */ + const ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68; + /** + * The percentage of impressions delivered by AdSense viewed on the user's + * screen (out of AdSense impressions measurable by active view). + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71; + */ + const ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71; + /** + * The average effective cost-per-thousand-impressions earned from the ads + * delivered by AdSense through line item dynamic allocation. + * + * Generated from protobuf enum ADSENSE_AVERAGE_ECPM = 26; + */ + const ADSENSE_AVERAGE_ECPM = 26; + /** + * Number of clicks delivered by AdSense demand channel. + * + * Generated from protobuf enum ADSENSE_CLICKS = 23; + */ + const ADSENSE_CLICKS = 23; + /** + * The ratio of impressions served by AdSense that resulted in users + * clicking on an ad. The clickthrough rate (CTR) is updated nightly. The + * AdSense CTR is calculated as: (AdSense clicks / AdSense impressions). + * + * Generated from protobuf enum ADSENSE_CTR = 24; + */ + const ADSENSE_CTR = 24; + /** + * Total impressions delivered by AdSense. + * + * Generated from protobuf enum ADSENSE_IMPRESSIONS = 22; + */ + const ADSENSE_IMPRESSIONS = 22; + /** + * Ratio of clicks delivered by AdSense through line item dynamic allocation + * in relation to the total clicks delivered. + * + * Generated from protobuf enum ADSENSE_PERCENT_CLICKS = 28; + */ + const ADSENSE_PERCENT_CLICKS = 28; + /** + * Ratio of impressions delivered by AdSense through line item dynamic + * allocation in relation to the total impressions delivered. + * + * Generated from protobuf enum ADSENSE_PERCENT_IMPRESSIONS = 27; + */ + const ADSENSE_PERCENT_IMPRESSIONS = 27; + /** + * Ratio of revenue generated by AdSense through line item dynamic + * allocation in relation to the total revenue. + * + * Generated from protobuf enum ADSENSE_PERCENT_REVENUE = 29; + */ + const ADSENSE_PERCENT_REVENUE = 29; + /** + * Ratio of revenue generated by AdSense through line item dynamic + * allocation in relation to the total revenue (excluding CPD). + * + * Generated from protobuf enum ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30; + */ + const ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30; + /** + * The total number of times that an AdSense ad is delivered. + * + * Generated from protobuf enum ADSENSE_RESPONSES_SERVED = 41; + */ + const ADSENSE_RESPONSES_SERVED = 41; + /** + * Revenue generated from AdSense through line item dynamic allocation, + * calculated in the network's currency and time zone. + * + * Generated from protobuf enum ADSENSE_REVENUE = 25; + */ + const ADSENSE_REVENUE = 25; + /** + * Active View AdExchange average time in seconds that specific impressions + * are reported as being viewable. + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79; + */ + const AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79; + /** + * Total number of impressions delivered by Ad Exchange that were eligible + * to measure viewability. + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76; + */ + const AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76; + /** + * The number of impressions delivered by Ad Exchange that were sampled, and + * measurable by active view. + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75; + */ + const AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75; + /** + * The percentage of impressions delivered by Ad Exchange that were + * measurable by active view (out of all Ad Exchange impressions sampled for + * active view). + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78; + */ + const AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78; + /** + * The number of impressions delivered by Ad Exchange viewed on the user's + * screen. + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74; + */ + const AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74; + /** + * The percentage of impressions delivered by Ad Exchange viewed on the + * user's screen (out of Ad Exchange impressions measurable by active view). + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77; + */ + const AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77; + /** + * The average effective cost-per-thousand-impressions earned from the ads + * delivered by Ad Exchange through line item dynamic allocation. + * + * Generated from protobuf enum AD_EXCHANGE_AVERAGE_ECPM = 18; + */ + const AD_EXCHANGE_AVERAGE_ECPM = 18; + /** + * Number of clicks delivered by the Ad Exchange. + * + * Generated from protobuf enum AD_EXCHANGE_CLICKS = 15; + */ + const AD_EXCHANGE_CLICKS = 15; + /** + * The ratio of impressions served by the Ad Exchange that resulted in users + * clicking on an ad. The clickthrough rate (CTR) is updated nightly. Ad + * Exchange CTR is calculated as: (Ad Exchange clicks / Ad Exchange + * impressions). + * + * Generated from protobuf enum AD_EXCHANGE_CTR = 16; + */ + const AD_EXCHANGE_CTR = 16; + /** + * Total impressions delivered by the Ad Exchange. + * + * Generated from protobuf enum AD_EXCHANGE_IMPRESSIONS = 14; + */ + const AD_EXCHANGE_IMPRESSIONS = 14; + /** + * Ratio of clicks delivered by Ad Exchange through line item dynamic + * allocation in relation to the total clicks delivered. + * + * Generated from protobuf enum AD_EXCHANGE_PERCENT_CLICKS = 20; + */ + const AD_EXCHANGE_PERCENT_CLICKS = 20; + /** + * Ratio of impressions delivered by Ad Exchange through line item dynamic + * allocation in relation to the total impressions delivered. + * + * Generated from protobuf enum AD_EXCHANGE_PERCENT_IMPRESSIONS = 19; + */ + const AD_EXCHANGE_PERCENT_IMPRESSIONS = 19; + /** + * Ratio of revenue generated by Ad Exchange through line item dynamic + * allocation in relation to the total revenue. + * + * Generated from protobuf enum AD_EXCHANGE_PERCENT_REVENUE = 21; + */ + const AD_EXCHANGE_PERCENT_REVENUE = 21; + /** + * Ratio of revenue generated by Ad Exchange through line item dynamic + * allocation in relation to the total revenue (excluding CPD). + * + * Generated from protobuf enum AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31; + */ + const AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31; + /** + * The total number of times that an Ad Exchange ad is delivered. + * + * Generated from protobuf enum AD_EXCHANGE_RESPONSES_SERVED = 42; + */ + const AD_EXCHANGE_RESPONSES_SERVED = 42; + /** + * Revenue generated from the Ad Exchange through line item dynamic + * allocation, calculated in your network's currency and time zone. + * + * Generated from protobuf enum AD_EXCHANGE_REVENUE = 17; + */ + const AD_EXCHANGE_REVENUE = 17; + /** + * The total number of times that an ad request is sent to the ad server + * including dynamic allocation. + * + * Generated from protobuf enum AD_REQUESTS = 38; + */ + const AD_REQUESTS = 38; + /** + * Active View ad server average time in seconds that specific impressions + * are reported as being viewable. + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67; + */ + const AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67; + /** + * Total number of impressions delivered by the ad server that were eligible + * to measure viewability. + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64; + */ + const AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64; + /** + * The number of impressions delivered by the ad server that were sampled, + * and measurable by active view. + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63; + */ + const AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63; + /** + * The percentage of impressions delivered by the ad server that were + * measurable by active view (out of all the ad server impressions sampled + * for active view). + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66; + */ + const AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66; + /** + * The number of impressions delivered by the ad server viewed on the user's + * screen. + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62; + */ + const AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62; + /** + * The percentage of impressions delivered by the ad server viewed on the + * user's screen (out of the ad server impressions measurable by active + * view). + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65; + */ + const AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65; + /** + * Average effective cost-per-thousand-impressions earned from the ads + * delivered by the Google Ad Manager server. + * + * Generated from protobuf enum AD_SERVER_AVERAGE_ECPM = 34; + */ + const AD_SERVER_AVERAGE_ECPM = 34; + /** + * Average effective cost-per-thousand-impressions earned from the ads + * delivered by the Google Ad Manager server, excluding CPD value. + * + * Generated from protobuf enum AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10; + */ + const AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10; + /** + * Total clicks served by the Google Ad Manager server. It usually takes + * about 30 minutes for new clicks to be recorded and added to the total + * displayed in reporting. + * + * Generated from protobuf enum AD_SERVER_CLICKS = 7; + */ + const AD_SERVER_CLICKS = 7; + /** + * CPD revenue earned, calculated in your network's currency, for + * the ads delivered by the Google Ad Manager server. Sum of all booked + * revenue. + * + * Generated from protobuf enum AD_SERVER_CPD_REVENUE = 32; + */ + const AD_SERVER_CPD_REVENUE = 32; + /** + * Ratio of impressions served by the Google Ad Manager server that resulted + * in users clicking on an ad. The clickthrough rate (CTR) is updated + * nightly. The ad server CTR is calculated as: (Ad server clicks / Ad + * server impressions). + * + * Generated from protobuf enum AD_SERVER_CTR = 8; + */ + const AD_SERVER_CTR = 8; + /** + * Total impressions delivered by the Ad Server. + * + * Generated from protobuf enum AD_SERVER_IMPRESSIONS = 6; + */ + const AD_SERVER_IMPRESSIONS = 6; + /** + * Ratio of clicks delivered by the Google Ad Manager server in relation to + * the total clicks delivered. + * + * Generated from protobuf enum AD_SERVER_PERCENT_CLICKS = 12; + */ + const AD_SERVER_PERCENT_CLICKS = 12; + /** + * Ratio of impressions delivered by the Google Ad Manager server in + * relation to the total impressions delivered. + * + * Generated from protobuf enum AD_SERVER_PERCENT_IMPRESSIONS = 11; + */ + const AD_SERVER_PERCENT_IMPRESSIONS = 11; + /** + * Ratio of revenue generated by the Google Ad Manager server in relation + * to the total revenue. + * + * Generated from protobuf enum AD_SERVER_PERCENT_REVENUE = 35; + */ + const AD_SERVER_PERCENT_REVENUE = 35; + /** + * Ratio of revenue generated by the Google Ad Manager server (excluding + * CPD) in relation to the total revenue. + * + * Generated from protobuf enum AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13; + */ + const AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13; + /** + * The total number of times that an ad is served by the ad server. + * + * Generated from protobuf enum AD_SERVER_RESPONSES_SERVED = 40; + */ + const AD_SERVER_RESPONSES_SERVED = 40; + /** + * All CPM, CPC, and CPD revenue earned, calculated in your network's + * currency, for the ads delivered by the Google Ad Manager server. + * Sum of all booked revenue. + * + * Generated from protobuf enum AD_SERVER_REVENUE = 33; + */ + const AD_SERVER_REVENUE = 33; + /** + * Revenue (excluding CPD) earned, calculated in your network's currency, + * for the ads delivered by the Google Ad Manager server. Sum of all booked + * revenue. + * + * Generated from protobuf enum AD_SERVER_REVENUE_WITHOUT_CPD = 9; + */ + const AD_SERVER_REVENUE_WITHOUT_CPD = 9; + /** + * Number of winning bids received from Open Bidding buyers, even when the + * winning bid is placed at the end of a mediation for mobile apps chain. + * + * Generated from protobuf enum AUCTIONS_WON = 80; + */ + const AUCTIONS_WON = 80; + /** + * eCPM averaged across the Google Ad Manager server, AdSense, + * and Ad Exchange. + * + * Generated from protobuf enum AVERAGE_ECPM = 37; + */ + const AVERAGE_ECPM = 37; + /** + * eCPM averaged across the Google Ad Manager server (excluding CPD), + * AdSense, and Ad Exchange. + * + * Generated from protobuf enum AVERAGE_ECPM_WITHOUT_CPD = 5; + */ + const AVERAGE_ECPM_WITHOUT_CPD = 5; + /** + * Number of bids received from Open Bidding buyers, regardless of whether + * the returned bid competes in an auction. + * + * Generated from protobuf enum BIDS = 81; + */ + const BIDS = 81; + /** + * Number of bids received from Open Bidding buyers that competed in + * the auction. + * + * Generated from protobuf enum BIDS_IN_AUCTION = 82; + */ + const BIDS_IN_AUCTION = 82; + /** + * Number of times a yield partner is asked to return bid to fill + * a yield group request. + * + * Generated from protobuf enum CALLOUTS = 83; + */ + const CALLOUTS = 83; + /** + * The number of times a user clicked on an ad. + * + * Generated from protobuf enum CLICKS = 2; + */ + const CLICKS = 2; + /** + * The total number of times that the code for an ad is served by the ad + * server including dynamic allocation. + * + * Generated from protobuf enum CODE_SERVED_COUNT = 44; + */ + const CODE_SERVED_COUNT = 44; + /** + * For standard ads, your ad clickthrough rate (CTR) is the number of ad + * clicks divided by the number of individual ad impressions expressed as a + * fraction. Ad CTR = Clicks / Ad impressions. + * + * Generated from protobuf enum CTR = 3; + */ + const CTR = 3; + /** + * The number of coviewed impressions sold by Google in partner sales. + * + * Generated from protobuf enum GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129; + */ + const GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129; + /** + * The number of auction impressions sold by Google in partner sales. + * + * Generated from protobuf enum GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128; + */ + const GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128; + /** + * The number of coviewed impressions sold by Google in partner sales. + * + * Generated from protobuf enum GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131; + */ + const GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131; + /** + * The number of impressions sold by Google in partner sales. + * + * Generated from protobuf enum GOOGLE_SOLD_IMPRESSIONS = 130; + */ + const GOOGLE_SOLD_IMPRESSIONS = 130; + /** + * The number of coviewed impressions sold by Google in partner sales. + * + * Generated from protobuf enum GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127; + */ + const GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127; + /** + * The number of reservation impressions sold by Google in partner sales. + * + * Generated from protobuf enum GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126; + */ + const GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126; + /** + * Total impressions from the Google Ad Manager server, AdSense, + * Ad Exchange, and yield group partners. + * + * Generated from protobuf enum IMPRESSIONS = 1; + */ + const IMPRESSIONS = 1; + /** + * The number of filled pod requests (filled by partner or Google) in + * partner sales. + * + * Generated from protobuf enum PARTNER_SALES_FILLED_POD_REQUESTS = 135; + */ + const PARTNER_SALES_FILLED_POD_REQUESTS = 135; + /** + * The percent of filled requests to total ad requests in + * partner sales. + * + * Generated from protobuf enum PARTNER_SALES_FILL_RATE = 136; + */ + const PARTNER_SALES_FILL_RATE = 136; + /** + * The percent of partner filled requests to total ad requests + * in partner sales. + * + * Generated from protobuf enum PARTNER_SALES_PARTNER_MATCH_RATE = 137; + */ + const PARTNER_SALES_PARTNER_MATCH_RATE = 137; + /** + * The number of queries eligible for partner sales. + * + * Generated from protobuf enum PARTNER_SALES_QUERIES = 132; + */ + const PARTNER_SALES_QUERIES = 132; + /** + * The number of partner unfilled impressions in partner sales. + * If a pod request is not filled by partner but filled by Google, this + * metric will still count 1. + * + * Generated from protobuf enum PARTNER_SALES_UNFILLED_IMPRESSIONS = 133; + */ + const PARTNER_SALES_UNFILLED_IMPRESSIONS = 133; + /** + * The number of partner unmatched queries in partner sales. + * If an ad request is not filled by partner but filled by Google, this + * metric will still count 1. + * + * Generated from protobuf enum PARTNER_SALES_UNMATCHED_QUERIES = 134; + */ + const PARTNER_SALES_UNMATCHED_QUERIES = 134; + /** + * The number of code served sold by partner in partner sales. + * + * Generated from protobuf enum PARTNER_SOLD_CODE_SERVED = 125; + */ + const PARTNER_SOLD_CODE_SERVED = 125; + /** + * The number of coviewed impressions sold by partner in partner sales. + * + * Generated from protobuf enum PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124; + */ + const PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124; + /** + * The number of impressions sold by partner in partner sales. + * + * Generated from protobuf enum PARTNER_SOLD_IMPRESSIONS = 123; + */ + const PARTNER_SOLD_IMPRESSIONS = 123; + /** + * The total number of ad requests eligible for programmatic inventory, + * including Programmatic Guaranteed, Preferred Deals, backfill, and open + * auction. + * + * Generated from protobuf enum PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177; + */ + const PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177; + /** + * The number of programmatic responses served divided by the number of + * programmatic eligible ad requests. Includes Ad Exchange, Open Bidding, + * and Preferred Deals. + * + * Generated from protobuf enum PROGRAMMATIC_MATCH_RATE = 178; + */ + const PROGRAMMATIC_MATCH_RATE = 178; + /** + * Total number of ad responses served from programmatic demand sources. + * Includes Ad Exchange, Open Bidding, and Preferred Deals. + * Differs from AD_EXCHANGE_RESPONSES_SERVED, which doesn't include Open + * Bidding ad requests. + * + * Generated from protobuf enum PROGRAMMATIC_RESPONSES_SERVED = 176; + */ + const PROGRAMMATIC_RESPONSES_SERVED = 176; + /** + * The total number of times that an ad is served by the ad server including + * dynamic allocation. + * + * Generated from protobuf enum RESPONSES_SERVED = 39; + */ + const RESPONSES_SERVED = 39; + /** + * Total amount of CPM, CPC, and CPD revenue based on the number of units + * served by the Google Ad Manager server, AdSense, Ad Exchange, and + * third-party Mediation networks. + * + * Generated from protobuf enum REVENUE = 36; + */ + const REVENUE = 36; + /** + * Total amount of revenue (excluding CPD) based on the number of units + * served by the Google Ad Manager server, AdSense, Ad Exchange, and + * third-party Mediation networks. + * + * Generated from protobuf enum REVENUE_WITHOUT_CPD = 4; + */ + const REVENUE_WITHOUT_CPD = 4; + /** + * Number of times a yield group buyer successfully returned a bid in + * response to a yield group callout. + * + * Generated from protobuf enum SUCCESSFUL_RESPONSES = 84; + */ + const SUCCESSFUL_RESPONSES = 84; + /** + * The total number of missed impressions due to the ad servers' inability + * to find ads to serve including dynamic allocation. + * + * Generated from protobuf enum UNFILLED_IMPRESSIONS = 45; + */ + const UNFILLED_IMPRESSIONS = 45; + /** + * The total number of times that an ad is not returned by the ad server. + * + * Generated from protobuf enum UNMATCHED_AD_REQUESTS = 43; + */ + const UNMATCHED_AD_REQUESTS = 43; + /** + * Number of times an Offerwall message was shown to users. + * + * Generated from protobuf enum USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121; + */ + const USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121; + /** + * The number of messages where the user gained an entitlement. + * + * Generated from protobuf enum USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122; + */ + const USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122; + /** + * The number of user interactions with a video, on average, such as pause, + * full screen, mute, etc. + * + * Generated from protobuf enum VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92; + */ + const VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92; + /** + * The number of times a user collapses a video, either to its original size + * or to a different size. + * + * Generated from protobuf enum VIDEO_INTERACTION_COLLAPSES = 93; + */ + const VIDEO_INTERACTION_COLLAPSES = 93; + /** + * The number of times a user expands a video. + * + * Generated from protobuf enum VIDEO_INTERACTION_EXPANDS = 95; + */ + const VIDEO_INTERACTION_EXPANDS = 95; + /** + * The number of times ad clip played in full screen mode. + * + * Generated from protobuf enum VIDEO_INTERACTION_FULL_SCREENS = 96; + */ + const VIDEO_INTERACTION_FULL_SCREENS = 96; + /** + * The number of times video player was in mute state during play of ad + * clip. + * + * Generated from protobuf enum VIDEO_INTERACTION_MUTES = 97; + */ + const VIDEO_INTERACTION_MUTES = 97; + /** + * The number of times user paused ad clip. + * + * Generated from protobuf enum VIDEO_INTERACTION_PAUSES = 98; + */ + const VIDEO_INTERACTION_PAUSES = 98; + /** + * The number of times the user unpaused the video. + * + * Generated from protobuf enum VIDEO_INTERACTION_RESUMES = 99; + */ + const VIDEO_INTERACTION_RESUMES = 99; + /** + * The number of times a user rewinds the video. + * + * Generated from protobuf enum VIDEO_INTERACTION_REWINDS = 100; + */ + const VIDEO_INTERACTION_REWINDS = 100; + /** + * The number of times a user unmutes the video. + * + * Generated from protobuf enum VIDEO_INTERACTION_UNMUTES = 101; + */ + const VIDEO_INTERACTION_UNMUTES = 101; + /** + * The number of times a skippable video is skipped. + * + * Generated from protobuf enum VIDEO_INTERACTION_VIDEO_SKIPS = 102; + */ + const VIDEO_INTERACTION_VIDEO_SKIPS = 102; + /** + * The number of total creative serves in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_CREATIVE_SERVES = 139; + */ + const VIDEO_REAL_TIME_CREATIVE_SERVES = 139; + /** + * The number of errors of type 100 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_100_COUNT = 143; + */ + const VIDEO_REAL_TIME_ERROR_100_COUNT = 143; + /** + * The number of errors of type 101 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_101_COUNT = 144; + */ + const VIDEO_REAL_TIME_ERROR_101_COUNT = 144; + /** + * The number of errors of type 102 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_102_COUNT = 145; + */ + const VIDEO_REAL_TIME_ERROR_102_COUNT = 145; + /** + * The number of errors of type 200 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_200_COUNT = 146; + */ + const VIDEO_REAL_TIME_ERROR_200_COUNT = 146; + /** + * The number of errors of type 201 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_201_COUNT = 147; + */ + const VIDEO_REAL_TIME_ERROR_201_COUNT = 147; + /** + * The number of errors of type 202 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_202_COUNT = 148; + */ + const VIDEO_REAL_TIME_ERROR_202_COUNT = 148; + /** + * The number of errors of type 203 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_203_COUNT = 149; + */ + const VIDEO_REAL_TIME_ERROR_203_COUNT = 149; + /** + * The number of errors of type 300 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_300_COUNT = 150; + */ + const VIDEO_REAL_TIME_ERROR_300_COUNT = 150; + /** + * The number of errors of type 301 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_301_COUNT = 151; + */ + const VIDEO_REAL_TIME_ERROR_301_COUNT = 151; + /** + * The number of errors of type 302 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_302_COUNT = 152; + */ + const VIDEO_REAL_TIME_ERROR_302_COUNT = 152; + /** + * The number of errors of type 303 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_303_COUNT = 153; + */ + const VIDEO_REAL_TIME_ERROR_303_COUNT = 153; + /** + * The number of errors of type 400 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_400_COUNT = 154; + */ + const VIDEO_REAL_TIME_ERROR_400_COUNT = 154; + /** + * The number of errors of type 401 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_401_COUNT = 155; + */ + const VIDEO_REAL_TIME_ERROR_401_COUNT = 155; + /** + * The number of errors of type 402 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_402_COUNT = 156; + */ + const VIDEO_REAL_TIME_ERROR_402_COUNT = 156; + /** + * The number of errors of type 403 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_403_COUNT = 157; + */ + const VIDEO_REAL_TIME_ERROR_403_COUNT = 157; + /** + * The number of errors of type 405 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_405_COUNT = 158; + */ + const VIDEO_REAL_TIME_ERROR_405_COUNT = 158; + /** + * The number of errors of type 406 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_406_COUNT = 159; + */ + const VIDEO_REAL_TIME_ERROR_406_COUNT = 159; + /** + * The number of errors of type 407 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_407_COUNT = 160; + */ + const VIDEO_REAL_TIME_ERROR_407_COUNT = 160; + /** + * The number of errors of type 408 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_408_COUNT = 161; + */ + const VIDEO_REAL_TIME_ERROR_408_COUNT = 161; + /** + * The number of errors of type 409 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_409_COUNT = 162; + */ + const VIDEO_REAL_TIME_ERROR_409_COUNT = 162; + /** + * The number of errors of type 410 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_410_COUNT = 163; + */ + const VIDEO_REAL_TIME_ERROR_410_COUNT = 163; + /** + * The number of errors of type 500 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_500_COUNT = 164; + */ + const VIDEO_REAL_TIME_ERROR_500_COUNT = 164; + /** + * The number of errors of type 501 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_501_COUNT = 165; + */ + const VIDEO_REAL_TIME_ERROR_501_COUNT = 165; + /** + * The number of errors of type 502 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_502_COUNT = 166; + */ + const VIDEO_REAL_TIME_ERROR_502_COUNT = 166; + /** + * The number of errors of type 503 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_503_COUNT = 167; + */ + const VIDEO_REAL_TIME_ERROR_503_COUNT = 167; + /** + * The number of errors of type 600 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_600_COUNT = 168; + */ + const VIDEO_REAL_TIME_ERROR_600_COUNT = 168; + /** + * The number of errors of type 601 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_601_COUNT = 169; + */ + const VIDEO_REAL_TIME_ERROR_601_COUNT = 169; + /** + * The number of errors of type 602 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_602_COUNT = 170; + */ + const VIDEO_REAL_TIME_ERROR_602_COUNT = 170; + /** + * The number of errors of type 603 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_603_COUNT = 171; + */ + const VIDEO_REAL_TIME_ERROR_603_COUNT = 171; + /** + * The number of errors of type 604 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_604_COUNT = 172; + */ + const VIDEO_REAL_TIME_ERROR_604_COUNT = 172; + /** + * The number of errors of type 900 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_900_COUNT = 173; + */ + const VIDEO_REAL_TIME_ERROR_900_COUNT = 173; + /** + * The number of errors of type 901 in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_901_COUNT = 174; + */ + const VIDEO_REAL_TIME_ERROR_901_COUNT = 174; + /** + * The number of total impressions in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_IMPRESSIONS = 138; + */ + const VIDEO_REAL_TIME_IMPRESSIONS = 138; + /** + * The number of matched queries in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_MATCHED_QUERIES = 140; + */ + const VIDEO_REAL_TIME_MATCHED_QUERIES = 140; + /** + * The number of all errors in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175; + */ + const VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175; + /** + * The number of total queries in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_TOTAL_QUERIES = 142; + */ + const VIDEO_REAL_TIME_TOTAL_QUERIES = 142; + /** + * The number of unmatched queries in video realtime reporting. + * + * Generated from protobuf enum VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141; + */ + const VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141; + /** + * Number of times that the publisher specified a video ad played + * automatically. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_AUTO_PLAYS = 103; + */ + const VIDEO_VIEWERSHIP_AUTO_PLAYS = 103; + /** + * Average percentage of the video watched by users. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104; + */ + const VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104; + /** + * Average time(seconds) users watched the video. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105; + */ + const VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105; + /** + * Number of times that the publisher specified a video ad was clicked to + * play. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106; + */ + const VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106; + /** + * The number of times the video played to completion. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_COMPLETES = 107; + */ + const VIDEO_VIEWERSHIP_COMPLETES = 107; + /** + * Percentage of times the video played to the end. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_COMPLETION_RATE = 108; + */ + const VIDEO_VIEWERSHIP_COMPLETION_RATE = 108; + /** + * The number of engaged views: ad is viewed to completion or for 30s, + * whichever comes first. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109; + */ + const VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109; + /** + * The number of times the video played to 25% of its length. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110; + */ + const VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110; + /** + * The number of times the video reached its midpoint during play. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_MIDPOINTS = 111; + */ + const VIDEO_VIEWERSHIP_MIDPOINTS = 111; + /** + * The number of times a skip button is shown in video. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112; + */ + const VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112; + /** + * The number of impressions where the video was played. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_STARTS = 113; + */ + const VIDEO_VIEWERSHIP_STARTS = 113; + /** + * The number of times the video played to 75% of its length. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114; + */ + const VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114; + /** + * The number of times an error occurred, such as a VAST redirect error, a + * video playback error, or an invalid response error. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115; + */ + const VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115; + /** + * The percentage of video error count. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94; + */ + const VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94; + /** + * Duration of the video creative. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116; + */ + const VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116; + /** + * View-through rate represented as a percentage. + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117; + */ + const VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117; + /** + * The estimated net rate for yield groups or individual + * yield group partners. + * + * Generated from protobuf enum YIELD_GROUP_ESTIMATED_CPM = 88; + */ + const YIELD_GROUP_ESTIMATED_CPM = 88; + /** + * Total net revenue earned by a yield group, based upon the yield group + * estimated CPM and yield group impressions recorded. + * + * Generated from protobuf enum YIELD_GROUP_ESTIMATED_REVENUE = 87; + */ + const YIELD_GROUP_ESTIMATED_REVENUE = 87; + /** + * Number of matched yield group requests where a yield partner delivered + * their ad to publisher inventory. + * + * Generated from protobuf enum YIELD_GROUP_IMPRESSIONS = 85; + */ + const YIELD_GROUP_IMPRESSIONS = 85; + /** + * Yield group Mediation fill rate indicating how often a network + * fills an ad request. + * + * Generated from protobuf enum YIELD_GROUP_MEDIATION_FILL_RATE = 89; + */ + const YIELD_GROUP_MEDIATION_FILL_RATE = 89; + /** + * Total requests where a Mediation chain was served. + * + * Generated from protobuf enum YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86; + */ + const YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86; + /** + * The number of mediation chain passback across all channels. + * + * Generated from protobuf enum YIELD_GROUP_MEDIATION_PASSBACKS = 118; + */ + const YIELD_GROUP_MEDIATION_PASSBACKS = 118; + /** + * Revenue per thousand impressions based on data collected by Ad Manager + * from third-party ad network reports. + * + * Generated from protobuf enum YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90; + */ + const YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90; + + private static $valueToName = [ + self::METRIC_UNSPECIFIED => 'METRIC_UNSPECIFIED', + self::ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME => 'ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME', + self::ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS => 'ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS', + self::ACTIVE_VIEW_MEASURABLE_IMPRESSIONS => 'ACTIVE_VIEW_MEASURABLE_IMPRESSIONS', + self::ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE => 'ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE', + self::ACTIVE_VIEW_VIEWABLE_IMPRESSIONS => 'ACTIVE_VIEW_VIEWABLE_IMPRESSIONS', + self::ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE => 'ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE', + self::ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME => 'ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME', + self::ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS => 'ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS', + self::ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS => 'ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS', + self::ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE => 'ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE', + self::ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS => 'ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS', + self::ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE => 'ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE', + self::ADSENSE_AVERAGE_ECPM => 'ADSENSE_AVERAGE_ECPM', + self::ADSENSE_CLICKS => 'ADSENSE_CLICKS', + self::ADSENSE_CTR => 'ADSENSE_CTR', + self::ADSENSE_IMPRESSIONS => 'ADSENSE_IMPRESSIONS', + self::ADSENSE_PERCENT_CLICKS => 'ADSENSE_PERCENT_CLICKS', + self::ADSENSE_PERCENT_IMPRESSIONS => 'ADSENSE_PERCENT_IMPRESSIONS', + self::ADSENSE_PERCENT_REVENUE => 'ADSENSE_PERCENT_REVENUE', + self::ADSENSE_PERCENT_REVENUE_WITHOUT_CPD => 'ADSENSE_PERCENT_REVENUE_WITHOUT_CPD', + self::ADSENSE_RESPONSES_SERVED => 'ADSENSE_RESPONSES_SERVED', + self::ADSENSE_REVENUE => 'ADSENSE_REVENUE', + self::AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME => 'AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME', + self::AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS => 'AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS', + self::AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS => 'AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS', + self::AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE => 'AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE', + self::AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS => 'AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS', + self::AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE => 'AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE', + self::AD_EXCHANGE_AVERAGE_ECPM => 'AD_EXCHANGE_AVERAGE_ECPM', + self::AD_EXCHANGE_CLICKS => 'AD_EXCHANGE_CLICKS', + self::AD_EXCHANGE_CTR => 'AD_EXCHANGE_CTR', + self::AD_EXCHANGE_IMPRESSIONS => 'AD_EXCHANGE_IMPRESSIONS', + self::AD_EXCHANGE_PERCENT_CLICKS => 'AD_EXCHANGE_PERCENT_CLICKS', + self::AD_EXCHANGE_PERCENT_IMPRESSIONS => 'AD_EXCHANGE_PERCENT_IMPRESSIONS', + self::AD_EXCHANGE_PERCENT_REVENUE => 'AD_EXCHANGE_PERCENT_REVENUE', + self::AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD => 'AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD', + self::AD_EXCHANGE_RESPONSES_SERVED => 'AD_EXCHANGE_RESPONSES_SERVED', + self::AD_EXCHANGE_REVENUE => 'AD_EXCHANGE_REVENUE', + self::AD_REQUESTS => 'AD_REQUESTS', + self::AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME => 'AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME', + self::AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS => 'AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS', + self::AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS => 'AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS', + self::AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE => 'AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE', + self::AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS => 'AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS', + self::AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE => 'AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE', + self::AD_SERVER_AVERAGE_ECPM => 'AD_SERVER_AVERAGE_ECPM', + self::AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD => 'AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD', + self::AD_SERVER_CLICKS => 'AD_SERVER_CLICKS', + self::AD_SERVER_CPD_REVENUE => 'AD_SERVER_CPD_REVENUE', + self::AD_SERVER_CTR => 'AD_SERVER_CTR', + self::AD_SERVER_IMPRESSIONS => 'AD_SERVER_IMPRESSIONS', + self::AD_SERVER_PERCENT_CLICKS => 'AD_SERVER_PERCENT_CLICKS', + self::AD_SERVER_PERCENT_IMPRESSIONS => 'AD_SERVER_PERCENT_IMPRESSIONS', + self::AD_SERVER_PERCENT_REVENUE => 'AD_SERVER_PERCENT_REVENUE', + self::AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD => 'AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD', + self::AD_SERVER_RESPONSES_SERVED => 'AD_SERVER_RESPONSES_SERVED', + self::AD_SERVER_REVENUE => 'AD_SERVER_REVENUE', + self::AD_SERVER_REVENUE_WITHOUT_CPD => 'AD_SERVER_REVENUE_WITHOUT_CPD', + self::AUCTIONS_WON => 'AUCTIONS_WON', + self::AVERAGE_ECPM => 'AVERAGE_ECPM', + self::AVERAGE_ECPM_WITHOUT_CPD => 'AVERAGE_ECPM_WITHOUT_CPD', + self::BIDS => 'BIDS', + self::BIDS_IN_AUCTION => 'BIDS_IN_AUCTION', + self::CALLOUTS => 'CALLOUTS', + self::CLICKS => 'CLICKS', + self::CODE_SERVED_COUNT => 'CODE_SERVED_COUNT', + self::CTR => 'CTR', + self::GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS => 'GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS', + self::GOOGLE_SOLD_AUCTION_IMPRESSIONS => 'GOOGLE_SOLD_AUCTION_IMPRESSIONS', + self::GOOGLE_SOLD_COVIEWED_IMPRESSIONS => 'GOOGLE_SOLD_COVIEWED_IMPRESSIONS', + self::GOOGLE_SOLD_IMPRESSIONS => 'GOOGLE_SOLD_IMPRESSIONS', + self::GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS => 'GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS', + self::GOOGLE_SOLD_RESERVATION_IMPRESSIONS => 'GOOGLE_SOLD_RESERVATION_IMPRESSIONS', + self::IMPRESSIONS => 'IMPRESSIONS', + self::PARTNER_SALES_FILLED_POD_REQUESTS => 'PARTNER_SALES_FILLED_POD_REQUESTS', + self::PARTNER_SALES_FILL_RATE => 'PARTNER_SALES_FILL_RATE', + self::PARTNER_SALES_PARTNER_MATCH_RATE => 'PARTNER_SALES_PARTNER_MATCH_RATE', + self::PARTNER_SALES_QUERIES => 'PARTNER_SALES_QUERIES', + self::PARTNER_SALES_UNFILLED_IMPRESSIONS => 'PARTNER_SALES_UNFILLED_IMPRESSIONS', + self::PARTNER_SALES_UNMATCHED_QUERIES => 'PARTNER_SALES_UNMATCHED_QUERIES', + self::PARTNER_SOLD_CODE_SERVED => 'PARTNER_SOLD_CODE_SERVED', + self::PARTNER_SOLD_COVIEWED_IMPRESSIONS => 'PARTNER_SOLD_COVIEWED_IMPRESSIONS', + self::PARTNER_SOLD_IMPRESSIONS => 'PARTNER_SOLD_IMPRESSIONS', + self::PROGRAMMATIC_ELIGIBLE_AD_REQUESTS => 'PROGRAMMATIC_ELIGIBLE_AD_REQUESTS', + self::PROGRAMMATIC_MATCH_RATE => 'PROGRAMMATIC_MATCH_RATE', + self::PROGRAMMATIC_RESPONSES_SERVED => 'PROGRAMMATIC_RESPONSES_SERVED', + self::RESPONSES_SERVED => 'RESPONSES_SERVED', + self::REVENUE => 'REVENUE', + self::REVENUE_WITHOUT_CPD => 'REVENUE_WITHOUT_CPD', + self::SUCCESSFUL_RESPONSES => 'SUCCESSFUL_RESPONSES', + self::UNFILLED_IMPRESSIONS => 'UNFILLED_IMPRESSIONS', + self::UNMATCHED_AD_REQUESTS => 'UNMATCHED_AD_REQUESTS', + self::USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN => 'USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN', + self::USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS => 'USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS', + self::VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE => 'VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE', + self::VIDEO_INTERACTION_COLLAPSES => 'VIDEO_INTERACTION_COLLAPSES', + self::VIDEO_INTERACTION_EXPANDS => 'VIDEO_INTERACTION_EXPANDS', + self::VIDEO_INTERACTION_FULL_SCREENS => 'VIDEO_INTERACTION_FULL_SCREENS', + self::VIDEO_INTERACTION_MUTES => 'VIDEO_INTERACTION_MUTES', + self::VIDEO_INTERACTION_PAUSES => 'VIDEO_INTERACTION_PAUSES', + self::VIDEO_INTERACTION_RESUMES => 'VIDEO_INTERACTION_RESUMES', + self::VIDEO_INTERACTION_REWINDS => 'VIDEO_INTERACTION_REWINDS', + self::VIDEO_INTERACTION_UNMUTES => 'VIDEO_INTERACTION_UNMUTES', + self::VIDEO_INTERACTION_VIDEO_SKIPS => 'VIDEO_INTERACTION_VIDEO_SKIPS', + self::VIDEO_REAL_TIME_CREATIVE_SERVES => 'VIDEO_REAL_TIME_CREATIVE_SERVES', + self::VIDEO_REAL_TIME_ERROR_100_COUNT => 'VIDEO_REAL_TIME_ERROR_100_COUNT', + self::VIDEO_REAL_TIME_ERROR_101_COUNT => 'VIDEO_REAL_TIME_ERROR_101_COUNT', + self::VIDEO_REAL_TIME_ERROR_102_COUNT => 'VIDEO_REAL_TIME_ERROR_102_COUNT', + self::VIDEO_REAL_TIME_ERROR_200_COUNT => 'VIDEO_REAL_TIME_ERROR_200_COUNT', + self::VIDEO_REAL_TIME_ERROR_201_COUNT => 'VIDEO_REAL_TIME_ERROR_201_COUNT', + self::VIDEO_REAL_TIME_ERROR_202_COUNT => 'VIDEO_REAL_TIME_ERROR_202_COUNT', + self::VIDEO_REAL_TIME_ERROR_203_COUNT => 'VIDEO_REAL_TIME_ERROR_203_COUNT', + self::VIDEO_REAL_TIME_ERROR_300_COUNT => 'VIDEO_REAL_TIME_ERROR_300_COUNT', + self::VIDEO_REAL_TIME_ERROR_301_COUNT => 'VIDEO_REAL_TIME_ERROR_301_COUNT', + self::VIDEO_REAL_TIME_ERROR_302_COUNT => 'VIDEO_REAL_TIME_ERROR_302_COUNT', + self::VIDEO_REAL_TIME_ERROR_303_COUNT => 'VIDEO_REAL_TIME_ERROR_303_COUNT', + self::VIDEO_REAL_TIME_ERROR_400_COUNT => 'VIDEO_REAL_TIME_ERROR_400_COUNT', + self::VIDEO_REAL_TIME_ERROR_401_COUNT => 'VIDEO_REAL_TIME_ERROR_401_COUNT', + self::VIDEO_REAL_TIME_ERROR_402_COUNT => 'VIDEO_REAL_TIME_ERROR_402_COUNT', + self::VIDEO_REAL_TIME_ERROR_403_COUNT => 'VIDEO_REAL_TIME_ERROR_403_COUNT', + self::VIDEO_REAL_TIME_ERROR_405_COUNT => 'VIDEO_REAL_TIME_ERROR_405_COUNT', + self::VIDEO_REAL_TIME_ERROR_406_COUNT => 'VIDEO_REAL_TIME_ERROR_406_COUNT', + self::VIDEO_REAL_TIME_ERROR_407_COUNT => 'VIDEO_REAL_TIME_ERROR_407_COUNT', + self::VIDEO_REAL_TIME_ERROR_408_COUNT => 'VIDEO_REAL_TIME_ERROR_408_COUNT', + self::VIDEO_REAL_TIME_ERROR_409_COUNT => 'VIDEO_REAL_TIME_ERROR_409_COUNT', + self::VIDEO_REAL_TIME_ERROR_410_COUNT => 'VIDEO_REAL_TIME_ERROR_410_COUNT', + self::VIDEO_REAL_TIME_ERROR_500_COUNT => 'VIDEO_REAL_TIME_ERROR_500_COUNT', + self::VIDEO_REAL_TIME_ERROR_501_COUNT => 'VIDEO_REAL_TIME_ERROR_501_COUNT', + self::VIDEO_REAL_TIME_ERROR_502_COUNT => 'VIDEO_REAL_TIME_ERROR_502_COUNT', + self::VIDEO_REAL_TIME_ERROR_503_COUNT => 'VIDEO_REAL_TIME_ERROR_503_COUNT', + self::VIDEO_REAL_TIME_ERROR_600_COUNT => 'VIDEO_REAL_TIME_ERROR_600_COUNT', + self::VIDEO_REAL_TIME_ERROR_601_COUNT => 'VIDEO_REAL_TIME_ERROR_601_COUNT', + self::VIDEO_REAL_TIME_ERROR_602_COUNT => 'VIDEO_REAL_TIME_ERROR_602_COUNT', + self::VIDEO_REAL_TIME_ERROR_603_COUNT => 'VIDEO_REAL_TIME_ERROR_603_COUNT', + self::VIDEO_REAL_TIME_ERROR_604_COUNT => 'VIDEO_REAL_TIME_ERROR_604_COUNT', + self::VIDEO_REAL_TIME_ERROR_900_COUNT => 'VIDEO_REAL_TIME_ERROR_900_COUNT', + self::VIDEO_REAL_TIME_ERROR_901_COUNT => 'VIDEO_REAL_TIME_ERROR_901_COUNT', + self::VIDEO_REAL_TIME_IMPRESSIONS => 'VIDEO_REAL_TIME_IMPRESSIONS', + self::VIDEO_REAL_TIME_MATCHED_QUERIES => 'VIDEO_REAL_TIME_MATCHED_QUERIES', + self::VIDEO_REAL_TIME_TOTAL_ERROR_COUNT => 'VIDEO_REAL_TIME_TOTAL_ERROR_COUNT', + self::VIDEO_REAL_TIME_TOTAL_QUERIES => 'VIDEO_REAL_TIME_TOTAL_QUERIES', + self::VIDEO_REAL_TIME_UNMATCHED_QUERIES => 'VIDEO_REAL_TIME_UNMATCHED_QUERIES', + self::VIDEO_VIEWERSHIP_AUTO_PLAYS => 'VIDEO_VIEWERSHIP_AUTO_PLAYS', + self::VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE => 'VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE', + self::VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME => 'VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME', + self::VIDEO_VIEWERSHIP_CLICK_TO_PLAYS => 'VIDEO_VIEWERSHIP_CLICK_TO_PLAYS', + self::VIDEO_VIEWERSHIP_COMPLETES => 'VIDEO_VIEWERSHIP_COMPLETES', + self::VIDEO_VIEWERSHIP_COMPLETION_RATE => 'VIDEO_VIEWERSHIP_COMPLETION_RATE', + self::VIDEO_VIEWERSHIP_ENGAGED_VIEWS => 'VIDEO_VIEWERSHIP_ENGAGED_VIEWS', + self::VIDEO_VIEWERSHIP_FIRST_QUARTILES => 'VIDEO_VIEWERSHIP_FIRST_QUARTILES', + self::VIDEO_VIEWERSHIP_MIDPOINTS => 'VIDEO_VIEWERSHIP_MIDPOINTS', + self::VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN => 'VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN', + self::VIDEO_VIEWERSHIP_STARTS => 'VIDEO_VIEWERSHIP_STARTS', + self::VIDEO_VIEWERSHIP_THIRD_QUARTILES => 'VIDEO_VIEWERSHIP_THIRD_QUARTILES', + self::VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT => 'VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT', + self::VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE => 'VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE', + self::VIDEO_VIEWERSHIP_VIDEO_LENGTH => 'VIDEO_VIEWERSHIP_VIDEO_LENGTH', + self::VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE => 'VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE', + self::YIELD_GROUP_ESTIMATED_CPM => 'YIELD_GROUP_ESTIMATED_CPM', + self::YIELD_GROUP_ESTIMATED_REVENUE => 'YIELD_GROUP_ESTIMATED_REVENUE', + self::YIELD_GROUP_IMPRESSIONS => 'YIELD_GROUP_IMPRESSIONS', + self::YIELD_GROUP_MEDIATION_FILL_RATE => 'YIELD_GROUP_MEDIATION_FILL_RATE', + self::YIELD_GROUP_MEDIATION_MATCHED_QUERIES => 'YIELD_GROUP_MEDIATION_MATCHED_QUERIES', + self::YIELD_GROUP_MEDIATION_PASSBACKS => 'YIELD_GROUP_MEDIATION_PASSBACKS', + self::YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM => 'YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM', + ]; + + 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/AdsAdManager/src/V1/Report/MetricValueType.php b/AdsAdManager/src/V1/Report/MetricValueType.php new file mode 100644 index 000000000000..3a8557eab111 --- /dev/null +++ b/AdsAdManager/src/V1/Report/MetricValueType.php @@ -0,0 +1,83 @@ +google.ads.admanager.v1.Report.MetricValueType + */ +class MetricValueType +{ + /** + * The values for the primary date_range. + * + * Generated from protobuf enum PRIMARY = 0; + */ + const PRIMARY = 0; + /** + * Each metrics' percent of the total for the primary date_range. + * + * Generated from protobuf enum PRIMARY_PERCENT_OF_TOTAL = 1; + */ + const PRIMARY_PERCENT_OF_TOTAL = 1; + /** + * The values for the comparison_date_range. + * + * Generated from protobuf enum COMPARISON = 2; + */ + const COMPARISON = 2; + /** + * Each metrics' percent of the total for the comparison_date_range. + * + * Generated from protobuf enum COMPARISON_PERCENT_OF_TOTAL = 3; + */ + const COMPARISON_PERCENT_OF_TOTAL = 3; + /** + * The absolute change between the primary and comparison date ranges. + * + * Generated from protobuf enum ABSOLUTE_CHANGE = 4; + */ + const ABSOLUTE_CHANGE = 4; + /** + * The relative change between the primary and comparison date ranges. + * + * Generated from protobuf enum RELATIVE_CHANGE = 5; + */ + const RELATIVE_CHANGE = 5; + + private static $valueToName = [ + self::PRIMARY => 'PRIMARY', + self::PRIMARY_PERCENT_OF_TOTAL => 'PRIMARY_PERCENT_OF_TOTAL', + self::COMPARISON => 'COMPARISON', + self::COMPARISON_PERCENT_OF_TOTAL => 'COMPARISON_PERCENT_OF_TOTAL', + self::ABSOLUTE_CHANGE => 'ABSOLUTE_CHANGE', + self::RELATIVE_CHANGE => 'RELATIVE_CHANGE', + ]; + + 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/AdsAdManager/src/V1/Report/ReportType.php b/AdsAdManager/src/V1/Report/ReportType.php new file mode 100644 index 000000000000..f00508132276 --- /dev/null +++ b/AdsAdManager/src/V1/Report/ReportType.php @@ -0,0 +1,55 @@ +google.ads.admanager.v1.Report.ReportType + */ +class ReportType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum REPORT_TYPE_UNSPECIFIED = 0; + */ + const REPORT_TYPE_UNSPECIFIED = 0; + /** + * Historical. + * + * Generated from protobuf enum HISTORICAL = 1; + */ + const HISTORICAL = 1; + + private static $valueToName = [ + self::REPORT_TYPE_UNSPECIFIED => 'REPORT_TYPE_UNSPECIFIED', + self::HISTORICAL => 'HISTORICAL', + ]; + + 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/AdsAdManager/src/V1/Report/Slice.php b/AdsAdManager/src/V1/Report/Slice.php new file mode 100644 index 000000000000..b0af001ed513 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Slice.php @@ -0,0 +1,114 @@ +google.ads.admanager.v1.Report.Slice + */ +class Slice extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dimension to slice on. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Dimension dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dimension = 0; + /** + * Required. The value of the dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $dimension + * Required. The dimension to slice on. + * @type \Google\Ads\AdManager\V1\Report\Value $value + * Required. The value of the dimension. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dimension to slice on. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Dimension dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDimension() + { + return $this->dimension; + } + + /** + * Required. The dimension to slice on. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Dimension dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\Dimension::class); + $this->dimension = $var; + + return $this; + } + + /** + * Required. The value of the dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Report\Value|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Required. The value of the dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Report\Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Value::class); + $this->value = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/Sort.php b/AdsAdManager/src/V1/Report/Sort.php new file mode 100644 index 000000000000..721e80f89774 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Sort.php @@ -0,0 +1,252 @@ +google.ads.admanager.v1.Report.Sort + */ +class Sort extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A field (dimension or metric) to sort by. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field = null; + /** + * Optional. The sort order. If true the sort will be descending. + * + * Generated from protobuf field bool descending = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $descending = false; + /** + * Optional. Use to sort on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.Slice slice = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $slice = null; + /** + * Optional. When using time period columns, use this to sort on a specific + * column. + * + * Generated from protobuf field optional int32 time_period_index = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_period_index = null; + /** + * Optional. Use to specify which metric value type to sort on. Defaults to + * PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.MetricValueType metric_value_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_value_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Report\Field $field + * Required. A field (dimension or metric) to sort by. + * @type bool $descending + * Optional. The sort order. If true the sort will be descending. + * @type \Google\Ads\AdManager\V1\Report\Slice $slice + * Optional. Use to sort on a specific slice of data. + * @type int $time_period_index + * Optional. When using time period columns, use this to sort on a specific + * column. + * @type int $metric_value_type + * Optional. Use to specify which metric value type to sort on. Defaults to + * PRIMARY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. A field (dimension or metric) to sort by. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Report\Field|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * Required. A field (dimension or metric) to sort by. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Report\Field $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Field::class); + $this->field = $var; + + return $this; + } + + /** + * Optional. The sort order. If true the sort will be descending. + * + * Generated from protobuf field bool descending = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDescending() + { + return $this->descending; + } + + /** + * Optional. The sort order. If true the sort will be descending. + * + * Generated from protobuf field bool descending = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDescending($var) + { + GPBUtil::checkBool($var); + $this->descending = $var; + + return $this; + } + + /** + * Optional. Use to sort on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.Slice slice = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\Report\Slice|null + */ + public function getSlice() + { + return $this->slice; + } + + public function hasSlice() + { + return isset($this->slice); + } + + public function clearSlice() + { + unset($this->slice); + } + + /** + * Optional. Use to sort on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.Slice slice = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\Report\Slice $var + * @return $this + */ + public function setSlice($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Slice::class); + $this->slice = $var; + + return $this; + } + + /** + * Optional. When using time period columns, use this to sort on a specific + * column. + * + * Generated from protobuf field optional int32 time_period_index = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTimePeriodIndex() + { + return isset($this->time_period_index) ? $this->time_period_index : 0; + } + + public function hasTimePeriodIndex() + { + return isset($this->time_period_index); + } + + public function clearTimePeriodIndex() + { + unset($this->time_period_index); + } + + /** + * Optional. When using time period columns, use this to sort on a specific + * column. + * + * Generated from protobuf field optional int32 time_period_index = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTimePeriodIndex($var) + { + GPBUtil::checkInt32($var); + $this->time_period_index = $var; + + return $this; + } + + /** + * Optional. Use to specify which metric value type to sort on. Defaults to + * PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.MetricValueType metric_value_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMetricValueType() + { + return isset($this->metric_value_type) ? $this->metric_value_type : 0; + } + + public function hasMetricValueType() + { + return isset($this->metric_value_type); + } + + public function clearMetricValueType() + { + unset($this->metric_value_type); + } + + /** + * Optional. Use to specify which metric value type to sort on. Defaults to + * PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.MetricValueType metric_value_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMetricValueType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\MetricValueType::class); + $this->metric_value_type = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/TimePeriodColumn.php b/AdsAdManager/src/V1/Report/TimePeriodColumn.php new file mode 100644 index 000000000000..d882d06e6049 --- /dev/null +++ b/AdsAdManager/src/V1/Report/TimePeriodColumn.php @@ -0,0 +1,76 @@ +google.ads.admanager.v1.Report.TimePeriodColumn + */ +class TimePeriodColumn +{ + /** + * Default value. Report will have no time period column. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_UNSPECIFIED = 0; + */ + const TIME_PERIOD_COLUMN_UNSPECIFIED = 0; + /** + * A column for each date in the report. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_DATE = 1; + */ + const TIME_PERIOD_COLUMN_DATE = 1; + /** + * A column for each week in the report. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_WEEK = 2; + */ + const TIME_PERIOD_COLUMN_WEEK = 2; + /** + * A column for each month in the report. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_MONTH = 3; + */ + const TIME_PERIOD_COLUMN_MONTH = 3; + /** + * A column for each quarter in the report. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_QUARTER = 4; + */ + const TIME_PERIOD_COLUMN_QUARTER = 4; + + private static $valueToName = [ + self::TIME_PERIOD_COLUMN_UNSPECIFIED => 'TIME_PERIOD_COLUMN_UNSPECIFIED', + self::TIME_PERIOD_COLUMN_DATE => 'TIME_PERIOD_COLUMN_DATE', + self::TIME_PERIOD_COLUMN_WEEK => 'TIME_PERIOD_COLUMN_WEEK', + self::TIME_PERIOD_COLUMN_MONTH => 'TIME_PERIOD_COLUMN_MONTH', + self::TIME_PERIOD_COLUMN_QUARTER => 'TIME_PERIOD_COLUMN_QUARTER', + ]; + + 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/AdsAdManager/src/V1/Report/Value.php b/AdsAdManager/src/V1/Report/Value.php new file mode 100644 index 000000000000..e0f3dfefc0d2 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Value.php @@ -0,0 +1,274 @@ +google.ads.admanager.v1.Report.Value + */ +class Value extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $int_value + * For integer values. + * @type float $double_value + * For double values. + * @type string $string_value + * For string values. + * @type bool $bool_value + * For boolean values. + * @type \Google\Ads\AdManager\V1\Report\Value\IntList $int_list_value + * For lists of integer values. + * @type \Google\Ads\AdManager\V1\Report\Value\StringList $string_list_value + * For lists of string values. + * @type string $bytes_value + * For bytes values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * For integer values. + * + * Generated from protobuf field int64 int_value = 1; + * @return int|string + */ + public function getIntValue() + { + return $this->readOneof(1); + } + + public function hasIntValue() + { + return $this->hasOneof(1); + } + + /** + * For integer values. + * + * Generated from protobuf field int64 int_value = 1; + * @param int|string $var + * @return $this + */ + public function setIntValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * For double values. + * + * Generated from protobuf field double double_value = 2; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(2); + } + + public function hasDoubleValue() + { + return $this->hasOneof(2); + } + + /** + * For double values. + * + * Generated from protobuf field double double_value = 2; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * For string values. + * + * Generated from protobuf field string string_value = 3; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(3); + } + + public function hasStringValue() + { + return $this->hasOneof(3); + } + + /** + * For string values. + * + * Generated from protobuf field string string_value = 3; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * For boolean values. + * + * Generated from protobuf field bool bool_value = 4; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(4); + } + + public function hasBoolValue() + { + return $this->hasOneof(4); + } + + /** + * For boolean values. + * + * Generated from protobuf field bool bool_value = 4; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * For lists of integer values. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Value.IntList int_list_value = 6; + * @return \Google\Ads\AdManager\V1\Report\Value\IntList|null + */ + public function getIntListValue() + { + return $this->readOneof(6); + } + + public function hasIntListValue() + { + return $this->hasOneof(6); + } + + /** + * For lists of integer values. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Value.IntList int_list_value = 6; + * @param \Google\Ads\AdManager\V1\Report\Value\IntList $var + * @return $this + */ + public function setIntListValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Value\IntList::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * For lists of string values. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Value.StringList string_list_value = 7; + * @return \Google\Ads\AdManager\V1\Report\Value\StringList|null + */ + public function getStringListValue() + { + return $this->readOneof(7); + } + + public function hasStringListValue() + { + return $this->hasOneof(7); + } + + /** + * For lists of string values. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.Value.StringList string_list_value = 7; + * @param \Google\Ads\AdManager\V1\Report\Value\StringList $var + * @return $this + */ + public function setStringListValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\Value\StringList::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * For bytes values. + * + * Generated from protobuf field bytes bytes_value = 8; + * @return string + */ + public function getBytesValue() + { + return $this->readOneof(8); + } + + public function hasBytesValue() + { + return $this->hasOneof(8); + } + + /** + * For bytes values. + * + * Generated from protobuf field bytes bytes_value = 8; + * @param string $var + * @return $this + */ + public function setBytesValue($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + + diff --git a/AdsAdManager/src/V1/Report/Value/IntList.php b/AdsAdManager/src/V1/Report/Value/IntList.php new file mode 100644 index 000000000000..f8973692cc7e --- /dev/null +++ b/AdsAdManager/src/V1/Report/Value/IntList.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.Report.Value.IntList + */ +class IntList extends \Google\Protobuf\Internal\Message +{ + /** + * The values + * + * Generated from protobuf field repeated int64 values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|array|\Google\Protobuf\Internal\RepeatedField $values + * The values + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * The values + * + * Generated from protobuf field repeated int64 values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The values + * + * Generated from protobuf field repeated int64 values = 1; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->values = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/Value/StringList.php b/AdsAdManager/src/V1/Report/Value/StringList.php new file mode 100644 index 000000000000..f8c9042f5214 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Value/StringList.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.Report.Value.StringList + */ +class StringList extends \Google\Protobuf\Internal\Message +{ + /** + * The values + * + * Generated from protobuf field repeated string values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * The values + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * The values + * + * Generated from protobuf field repeated string values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The values + * + * Generated from protobuf field repeated string values = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Report/Visibility.php b/AdsAdManager/src/V1/Report/Visibility.php new file mode 100644 index 000000000000..990e89aa5e71 --- /dev/null +++ b/AdsAdManager/src/V1/Report/Visibility.php @@ -0,0 +1,65 @@ +google.ads.admanager.v1.Report.Visibility + */ +class Visibility +{ + /** + * Default value. Reports with hidden visibility will not appear in the Ad + * Manager UI. + * + * Generated from protobuf enum HIDDEN = 0; + */ + const HIDDEN = 0; + /** + * Reports with draft visibility will appear in the Ad Manager UI only if + * the user has configured the UI to show them. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * Reports with saved visibility will appear in the Ad Manager UI by + * default. + * + * Generated from protobuf enum SAVED = 2; + */ + const SAVED = 2; + + private static $valueToName = [ + self::HIDDEN => 'HIDDEN', + self::DRAFT => 'DRAFT', + self::SAVED => 'SAVED', + ]; + + 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/AdsAdManager/src/V1/ReportDefinition.php b/AdsAdManager/src/V1/ReportDefinition.php new file mode 100644 index 000000000000..148e84f9f03e --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition.php @@ -0,0 +1,667 @@ +google.ads.admanager.v1.ReportDefinition + */ +class ReportDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The list of dimensions to report on. If empty, the report will + * have no dimensions, and any metrics will be totals. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Dimension dimensions = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $dimensions; + /** + * Required. The list of metrics to report on. If empty, the report will have + * no metrics. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Metric metrics = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $metrics; + /** + * Optional. The filters for this report. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $filters; + /** + * Optional. The time zone the date range is defined in for this report. + * Defaults to publisher's time zone if not specified. Time zone in IANA + * format. Acceptable values depend on the report type. Publisher time zone is + * always accepted. Use "America/Los_Angeles" for pacific time, or "Etc/UTC" + * for UTC. + * + * Generated from protobuf field string time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_zone = ''; + /** + * Optional. The ISO 4217 currency code for this report. Defaults to publisher + * currency code if not specified. + * + * Generated from protobuf field string currency_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $currency_code = ''; + /** + * Required. The primary date range of this report. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange date_range = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $date_range = null; + /** + * Optional. The comparison date range of this report. If unspecified, the + * report will not have any comparison metrics. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.DateRange comparison_date_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $comparison_date_range = null; + /** + * Optional. Custom Dimension keys that represent CUSTOM_DIMENSION_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, custom_dimension_key_ids[0] describes + * CUSTOM_DIMENSION_0_VALUE_ID and CUSTOM_DIMENSION_0_VALUE. + * + * Generated from protobuf field repeated int64 custom_dimension_key_ids = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $custom_dimension_key_ids; + /** + * Optional. Custom field IDs that represent LINE_ITEM_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, line_item_custom_field_ids[0] describes + * LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID and LINE_ITEM_CUSTOM_FIELD_0_VALUE. + * + * Generated from protobuf field repeated int64 line_item_custom_field_ids = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $line_item_custom_field_ids; + /** + * Optional. Custom field IDs that represent ORDER_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, order_custom_field_ids[0] describes + * ORDER_CUSTOM_FIELD_0_OPTION_ID and ORDER_CUSTOM_FIELD_0_VALUE. + * + * Generated from protobuf field repeated int64 order_custom_field_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $order_custom_field_ids; + /** + * Optional. Custom field IDs that represent CREATIVE_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, creative_custom_field_ids[0] describes + * CREATIVE_CUSTOM_FIELD_0_OPTION_ID and CREATIVE_CUSTOM_FIELD_0_VALUE. + * + * Generated from protobuf field repeated int64 creative_custom_field_ids = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $creative_custom_field_ids; + /** + * Required. The type of this report. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.ReportType report_type = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_type = 0; + /** + * Optional. Include a time period column to introduce comparison columns in + * the report for each generated period. For example, set to "QUARTERS" here + * to have a column for each quarter present in the primary date range. If + * "PREVIOUS PERIOD" is specified in comparison_date_range, then each quarter + * column will also include comparison values for its relative previous + * quarter. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.TimePeriodColumn time_period_column = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_period_column = 0; + /** + * Optional. List of flags for this report. Used to flag rows in a result set + * based on a set of defined filters. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $flags; + /** + * Optional. Default sorts to apply to this report. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Sort sorts = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sorts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $dimensions + * Required. The list of dimensions to report on. If empty, the report will + * have no dimensions, and any metrics will be totals. + * @type array|\Google\Protobuf\Internal\RepeatedField $metrics + * Required. The list of metrics to report on. If empty, the report will have + * no metrics. + * @type array<\Google\Ads\AdManager\V1\Report\Filter>|\Google\Protobuf\Internal\RepeatedField $filters + * Optional. The filters for this report. + * @type string $time_zone + * Optional. The time zone the date range is defined in for this report. + * Defaults to publisher's time zone if not specified. Time zone in IANA + * format. Acceptable values depend on the report type. Publisher time zone is + * always accepted. Use "America/Los_Angeles" for pacific time, or "Etc/UTC" + * for UTC. + * @type string $currency_code + * Optional. The ISO 4217 currency code for this report. Defaults to publisher + * currency code if not specified. + * @type \Google\Ads\AdManager\V1\Report\DateRange $date_range + * Required. The primary date range of this report. + * @type \Google\Ads\AdManager\V1\Report\DateRange $comparison_date_range + * Optional. The comparison date range of this report. If unspecified, the + * report will not have any comparison metrics. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $custom_dimension_key_ids + * Optional. Custom Dimension keys that represent CUSTOM_DIMENSION_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, custom_dimension_key_ids[0] describes + * CUSTOM_DIMENSION_0_VALUE_ID and CUSTOM_DIMENSION_0_VALUE. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $line_item_custom_field_ids + * Optional. Custom field IDs that represent LINE_ITEM_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, line_item_custom_field_ids[0] describes + * LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID and LINE_ITEM_CUSTOM_FIELD_0_VALUE. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $order_custom_field_ids + * Optional. Custom field IDs that represent ORDER_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, order_custom_field_ids[0] describes + * ORDER_CUSTOM_FIELD_0_OPTION_ID and ORDER_CUSTOM_FIELD_0_VALUE. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $creative_custom_field_ids + * Optional. Custom field IDs that represent CREATIVE_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, creative_custom_field_ids[0] describes + * CREATIVE_CUSTOM_FIELD_0_OPTION_ID and CREATIVE_CUSTOM_FIELD_0_VALUE. + * @type int $report_type + * Required. The type of this report. + * @type int $time_period_column + * Optional. Include a time period column to introduce comparison columns in + * the report for each generated period. For example, set to "QUARTERS" here + * to have a column for each quarter present in the primary date range. If + * "PREVIOUS PERIOD" is specified in comparison_date_range, then each quarter + * column will also include comparison values for its relative previous + * quarter. + * @type array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $flags + * Optional. List of flags for this report. Used to flag rows in a result set + * based on a set of defined filters. + * @type array<\Google\Ads\AdManager\V1\Report\Sort>|\Google\Protobuf\Internal\RepeatedField $sorts + * Optional. Default sorts to apply to this report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The list of dimensions to report on. If empty, the report will + * have no dimensions, and any metrics will be totals. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Dimension dimensions = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDimensions() + { + return $this->dimensions; + } + + /** + * Required. The list of dimensions to report on. If empty, the report will + * have no dimensions, and any metrics will be totals. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Dimension dimensions = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDimensions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\AdManager\V1\Report\Dimension::class); + $this->dimensions = $arr; + + return $this; + } + + /** + * Required. The list of metrics to report on. If empty, the report will have + * no metrics. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Metric metrics = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * Required. The list of metrics to report on. If empty, the report will have + * no metrics. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Metric metrics = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\AdManager\V1\Report\Metric::class); + $this->metrics = $arr; + + return $this; + } + + /** + * Optional. The filters for this report. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Optional. The filters for this report. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\Report\Filter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Filter::class); + $this->filters = $arr; + + return $this; + } + + /** + * Optional. The time zone the date range is defined in for this report. + * Defaults to publisher's time zone if not specified. Time zone in IANA + * format. Acceptable values depend on the report type. Publisher time zone is + * always accepted. Use "America/Los_Angeles" for pacific time, or "Etc/UTC" + * for UTC. + * + * Generated from protobuf field string time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Optional. The time zone the date range is defined in for this report. + * Defaults to publisher's time zone if not specified. Time zone in IANA + * format. Acceptable values depend on the report type. Publisher time zone is + * always accepted. Use "America/Los_Angeles" for pacific time, or "Etc/UTC" + * for UTC. + * + * Generated from protobuf field string time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Optional. The ISO 4217 currency code for this report. Defaults to publisher + * currency code if not specified. + * + * Generated from protobuf field string currency_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCurrencyCode() + { + return $this->currency_code; + } + + /** + * Optional. The ISO 4217 currency code for this report. Defaults to publisher + * currency code if not specified. + * + * Generated from protobuf field string currency_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCurrencyCode($var) + { + GPBUtil::checkString($var, True); + $this->currency_code = $var; + + return $this; + } + + /** + * Required. The primary date range of this report. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange date_range = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Report\DateRange|null + */ + public function getDateRange() + { + return $this->date_range; + } + + public function hasDateRange() + { + return isset($this->date_range); + } + + public function clearDateRange() + { + unset($this->date_range); + } + + /** + * Required. The primary date range of this report. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange date_range = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Report\DateRange $var + * @return $this + */ + public function setDateRange($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\DateRange::class); + $this->date_range = $var; + + return $this; + } + + /** + * Optional. The comparison date range of this report. If unspecified, the + * report will not have any comparison metrics. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.DateRange comparison_date_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\Report\DateRange|null + */ + public function getComparisonDateRange() + { + return $this->comparison_date_range; + } + + public function hasComparisonDateRange() + { + return isset($this->comparison_date_range); + } + + public function clearComparisonDateRange() + { + unset($this->comparison_date_range); + } + + /** + * Optional. The comparison date range of this report. If unspecified, the + * report will not have any comparison metrics. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Report.DateRange comparison_date_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\Report\DateRange $var + * @return $this + */ + public function setComparisonDateRange($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\DateRange::class); + $this->comparison_date_range = $var; + + return $this; + } + + /** + * Optional. Custom Dimension keys that represent CUSTOM_DIMENSION_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, custom_dimension_key_ids[0] describes + * CUSTOM_DIMENSION_0_VALUE_ID and CUSTOM_DIMENSION_0_VALUE. + * + * Generated from protobuf field repeated int64 custom_dimension_key_ids = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomDimensionKeyIds() + { + return $this->custom_dimension_key_ids; + } + + /** + * Optional. Custom Dimension keys that represent CUSTOM_DIMENSION_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, custom_dimension_key_ids[0] describes + * CUSTOM_DIMENSION_0_VALUE_ID and CUSTOM_DIMENSION_0_VALUE. + * + * Generated from protobuf field repeated int64 custom_dimension_key_ids = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomDimensionKeyIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->custom_dimension_key_ids = $arr; + + return $this; + } + + /** + * Optional. Custom field IDs that represent LINE_ITEM_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, line_item_custom_field_ids[0] describes + * LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID and LINE_ITEM_CUSTOM_FIELD_0_VALUE. + * + * Generated from protobuf field repeated int64 line_item_custom_field_ids = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLineItemCustomFieldIds() + { + return $this->line_item_custom_field_ids; + } + + /** + * Optional. Custom field IDs that represent LINE_ITEM_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, line_item_custom_field_ids[0] describes + * LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID and LINE_ITEM_CUSTOM_FIELD_0_VALUE. + * + * Generated from protobuf field repeated int64 line_item_custom_field_ids = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLineItemCustomFieldIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->line_item_custom_field_ids = $arr; + + return $this; + } + + /** + * Optional. Custom field IDs that represent ORDER_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, order_custom_field_ids[0] describes + * ORDER_CUSTOM_FIELD_0_OPTION_ID and ORDER_CUSTOM_FIELD_0_VALUE. + * + * Generated from protobuf field repeated int64 order_custom_field_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOrderCustomFieldIds() + { + return $this->order_custom_field_ids; + } + + /** + * Optional. Custom field IDs that represent ORDER_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, order_custom_field_ids[0] describes + * ORDER_CUSTOM_FIELD_0_OPTION_ID and ORDER_CUSTOM_FIELD_0_VALUE. + * + * Generated from protobuf field repeated int64 order_custom_field_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOrderCustomFieldIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->order_custom_field_ids = $arr; + + return $this; + } + + /** + * Optional. Custom field IDs that represent CREATIVE_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, creative_custom_field_ids[0] describes + * CREATIVE_CUSTOM_FIELD_0_OPTION_ID and CREATIVE_CUSTOM_FIELD_0_VALUE. + * + * Generated from protobuf field repeated int64 creative_custom_field_ids = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCreativeCustomFieldIds() + { + return $this->creative_custom_field_ids; + } + + /** + * Optional. Custom field IDs that represent CREATIVE_CUSTOM_FIELD_* + * dimensions. The index of this repeated field corresponds to the index on + * each dimension. For example, creative_custom_field_ids[0] describes + * CREATIVE_CUSTOM_FIELD_0_OPTION_ID and CREATIVE_CUSTOM_FIELD_0_VALUE. + * + * Generated from protobuf field repeated int64 creative_custom_field_ids = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCreativeCustomFieldIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->creative_custom_field_ids = $arr; + + return $this; + } + + /** + * Required. The type of this report. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.ReportType report_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReportType() + { + return $this->report_type; + } + + /** + * Required. The type of this report. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.ReportType report_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReportType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\ReportType::class); + $this->report_type = $var; + + return $this; + } + + /** + * Optional. Include a time period column to introduce comparison columns in + * the report for each generated period. For example, set to "QUARTERS" here + * to have a column for each quarter present in the primary date range. If + * "PREVIOUS PERIOD" is specified in comparison_date_range, then each quarter + * column will also include comparison values for its relative previous + * quarter. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.TimePeriodColumn time_period_column = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTimePeriodColumn() + { + return $this->time_period_column; + } + + /** + * Optional. Include a time period column to introduce comparison columns in + * the report for each generated period. For example, set to "QUARTERS" here + * to have a column for each quarter present in the primary date range. If + * "PREVIOUS PERIOD" is specified in comparison_date_range, then each quarter + * column will also include comparison values for its relative previous + * quarter. + * + * Generated from protobuf field .google.ads.admanager.v1.Report.TimePeriodColumn time_period_column = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTimePeriodColumn($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\TimePeriodColumn::class); + $this->time_period_column = $var; + + return $this; + } + + /** + * Optional. List of flags for this report. Used to flag rows in a result set + * based on a set of defined filters. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFlags() + { + return $this->flags; + } + + /** + * Optional. List of flags for this report. Used to flag rows in a result set + * based on a set of defined filters. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Flag::class); + $this->flags = $arr; + + return $this; + } + + /** + * Optional. Default sorts to apply to this report. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Sort sorts = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSorts() + { + return $this->sorts; + } + + /** + * Optional. Default sorts to apply to this report. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Sort sorts = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\Report\Sort>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSorts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Sort::class); + $this->sorts = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Role.php b/AdsAdManager/src/V1/Role.php new file mode 100644 index 000000000000..dada96c1f725 --- /dev/null +++ b/AdsAdManager/src/V1/Role.php @@ -0,0 +1,241 @@ +google.ads.admanager.v1.Role + */ +class Role extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Role`. + * Format: `networks/{network_code}/roles/{role_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. `Role` ID. + * + * Generated from protobuf field int64 role_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $role_id = 0; + /** + * Required. The display name of the `Role`. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. The description of the `Role`. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Whether the `Role` is a built-in or custom user role. + * + * Generated from protobuf field bool built_in = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $built_in = false; + /** + * Output only. The status of the `Role`. + * + * Generated from protobuf field .google.ads.admanager.v1.RoleStatusEnum.RoleStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Role`. + * Format: `networks/{network_code}/roles/{role_id}` + * @type int|string $role_id + * Output only. `Role` ID. + * @type string $display_name + * Required. The display name of the `Role`. + * @type string $description + * Optional. The description of the `Role`. + * @type bool $built_in + * Output only. Whether the `Role` is a built-in or custom user role. + * @type int $status + * Output only. The status of the `Role`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\RoleMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Role`. + * Format: `networks/{network_code}/roles/{role_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 `Role`. + * Format: `networks/{network_code}/roles/{role_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; + } + + /** + * Output only. `Role` ID. + * + * Generated from protobuf field int64 role_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getRoleId() + { + return $this->role_id; + } + + /** + * Output only. `Role` ID. + * + * Generated from protobuf field int64 role_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setRoleId($var) + { + GPBUtil::checkInt64($var); + $this->role_id = $var; + + return $this; + } + + /** + * Required. The display name of the `Role`. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the `Role`. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. The description of the `Role`. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the `Role`. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Whether the `Role` is a built-in or custom user role. + * + * Generated from protobuf field bool built_in = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getBuiltIn() + { + return $this->built_in; + } + + /** + * Output only. Whether the `Role` is a built-in or custom user role. + * + * Generated from protobuf field bool built_in = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setBuiltIn($var) + { + GPBUtil::checkBool($var); + $this->built_in = $var; + + return $this; + } + + /** + * Output only. The status of the `Role`. + * + * Generated from protobuf field .google.ads.admanager.v1.RoleStatusEnum.RoleStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. The status of the `Role`. + * + * Generated from protobuf field .google.ads.admanager.v1.RoleStatusEnum.RoleStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\RoleStatusEnum\RoleStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/RoleStatusEnum.php b/AdsAdManager/src/V1/RoleStatusEnum.php new file mode 100644 index 000000000000..f503830b55c8 --- /dev/null +++ b/AdsAdManager/src/V1/RoleStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.RoleStatusEnum + */ +class RoleStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\RoleEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/RoleStatusEnum/RoleStatus.php b/AdsAdManager/src/V1/RoleStatusEnum/RoleStatus.php new file mode 100644 index 000000000000..d217869ae173 --- /dev/null +++ b/AdsAdManager/src/V1/RoleStatusEnum/RoleStatus.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.RoleStatusEnum.RoleStatus + */ +class RoleStatus +{ + /** + * No value specified. + * + * Generated from protobuf enum ROLE_STATUS_UNSPECIFIED = 0; + */ + const ROLE_STATUS_UNSPECIFIED = 0; + /** + * Role is active. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Role is inactive. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + + private static $valueToName = [ + self::ROLE_STATUS_UNSPECIFIED => 'ROLE_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + 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/AdsAdManager/src/V1/RunReportMetadata.php b/AdsAdManager/src/V1/RunReportMetadata.php new file mode 100644 index 000000000000..8ef7b7307ec0 --- /dev/null +++ b/AdsAdManager/src/V1/RunReportMetadata.php @@ -0,0 +1,105 @@ +google.ads.admanager.v1.RunReportMetadata + */ +class RunReportMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * An estimate of how close this report is to being completed. Will always be + * 100 for failed and completed reports. + * + * Generated from protobuf field int32 percent_complete = 2; + */ + protected $percent_complete = 0; + /** + * The result's parent report. + * + * Generated from protobuf field string report = 4 [(.google.api.resource_reference) = { + */ + protected $report = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $percent_complete + * An estimate of how close this report is to being completed. Will always be + * 100 for failed and completed reports. + * @type string $report + * The result's parent report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * An estimate of how close this report is to being completed. Will always be + * 100 for failed and completed reports. + * + * Generated from protobuf field int32 percent_complete = 2; + * @return int + */ + public function getPercentComplete() + { + return $this->percent_complete; + } + + /** + * An estimate of how close this report is to being completed. Will always be + * 100 for failed and completed reports. + * + * Generated from protobuf field int32 percent_complete = 2; + * @param int $var + * @return $this + */ + public function setPercentComplete($var) + { + GPBUtil::checkInt32($var); + $this->percent_complete = $var; + + return $this; + } + + /** + * The result's parent report. + * + * Generated from protobuf field string report = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getReport() + { + return $this->report; + } + + /** + * The result's parent report. + * + * Generated from protobuf field string report = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setReport($var) + { + GPBUtil::checkString($var, True); + $this->report = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/RunReportRequest.php b/AdsAdManager/src/V1/RunReportRequest.php new file mode 100644 index 000000000000..45effb973cb7 --- /dev/null +++ b/AdsAdManager/src/V1/RunReportRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.RunReportRequest + */ +class RunReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The report to run. + * Format: `networks/{network_code}/reports/{report_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The report to run. + * Format: `networks/{network_code}/reports/{report_id}` + * Please see {@see ReportServiceClient::reportName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\RunReportRequest + * + * @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 report to run. + * Format: `networks/{network_code}/reports/{report_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The report to run. + * Format: `networks/{network_code}/reports/{report_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 report to run. + * Format: `networks/{network_code}/reports/{report_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/AdsAdManager/src/V1/RunReportResponse.php b/AdsAdManager/src/V1/RunReportResponse.php new file mode 100644 index 000000000000..c19b155b00c9 --- /dev/null +++ b/AdsAdManager/src/V1/RunReportResponse.php @@ -0,0 +1,71 @@ +google.ads.admanager.v1.RunReportResponse + */ +class RunReportResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique name of the generated result. Use with `FetchReportResultRows` + * to retrieve data. + * + * Generated from protobuf field string report_result = 1; + */ + protected $report_result = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $report_result + * The unique name of the generated result. Use with `FetchReportResultRows` + * to retrieve data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * The unique name of the generated result. Use with `FetchReportResultRows` + * to retrieve data. + * + * Generated from protobuf field string report_result = 1; + * @return string + */ + public function getReportResult() + { + return $this->report_result; + } + + /** + * The unique name of the generated result. Use with `FetchReportResultRows` + * to retrieve data. + * + * Generated from protobuf field string report_result = 1; + * @param string $var + * @return $this + */ + public function setReportResult($var) + { + GPBUtil::checkString($var, True); + $this->report_result = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Schedule.php b/AdsAdManager/src/V1/Schedule.php new file mode 100644 index 000000000000..cb71b1409633 --- /dev/null +++ b/AdsAdManager/src/V1/Schedule.php @@ -0,0 +1,306 @@ +google.ads.admanager.v1.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * Date for the first run of the report. + * + * Generated from protobuf field .google.type.Date start_date = 1; + */ + protected $start_date = null; + /** + * Date for the final run of the report. + * + * Generated from protobuf field .google.type.Date end_date = 2; + */ + protected $end_date = null; + /** + * Frequency to run report. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule.Frequency frequency = 3; + */ + protected $frequency = 0; + /** + * Indicates start time for schedule to run + * Will use the time_zone from `ReportDefinition`. Defaults + * to the publisher's time zone if not specified. + * For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + * will be the time of day that the first report will run on the first day. + * For example, if the start time is 2:00 PM, and the frequency is + * THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + * 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + * 2:00 PM, 10:00 PM. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 4; + */ + protected $start_time = null; + protected $frequency_schedule; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Schedule\WeeklySchedule $weekly_schedule + * Days of week to schedule report run. + * @type \Google\Ads\AdManager\V1\Schedule\MonthlySchedule $monthly_schedule + * Days of month to schedule report run. + * @type \Google\Type\Date $start_date + * Date for the first run of the report. + * @type \Google\Type\Date $end_date + * Date for the final run of the report. + * @type int $frequency + * Frequency to run report. + * @type \Google\Type\TimeOfDay $start_time + * Indicates start time for schedule to run + * Will use the time_zone from `ReportDefinition`. Defaults + * to the publisher's time zone if not specified. + * For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + * will be the time of day that the first report will run on the first day. + * For example, if the start time is 2:00 PM, and the frequency is + * THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + * 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + * 2:00 PM, 10:00 PM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Days of week to schedule report run. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule.WeeklySchedule weekly_schedule = 6; + * @return \Google\Ads\AdManager\V1\Schedule\WeeklySchedule|null + */ + public function getWeeklySchedule() + { + return $this->readOneof(6); + } + + public function hasWeeklySchedule() + { + return $this->hasOneof(6); + } + + /** + * Days of week to schedule report run. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule.WeeklySchedule weekly_schedule = 6; + * @param \Google\Ads\AdManager\V1\Schedule\WeeklySchedule $var + * @return $this + */ + public function setWeeklySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Schedule\WeeklySchedule::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Days of month to schedule report run. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule.MonthlySchedule monthly_schedule = 7; + * @return \Google\Ads\AdManager\V1\Schedule\MonthlySchedule|null + */ + public function getMonthlySchedule() + { + return $this->readOneof(7); + } + + public function hasMonthlySchedule() + { + return $this->hasOneof(7); + } + + /** + * Days of month to schedule report run. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule.MonthlySchedule monthly_schedule = 7; + * @param \Google\Ads\AdManager\V1\Schedule\MonthlySchedule $var + * @return $this + */ + public function setMonthlySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Schedule\MonthlySchedule::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Date for the first run of the report. + * + * Generated from protobuf field .google.type.Date start_date = 1; + * @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); + } + + /** + * Date for the first run of the report. + * + * Generated from protobuf field .google.type.Date start_date = 1; + * @param \Google\Type\Date $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->start_date = $var; + + return $this; + } + + /** + * Date for the final run of the report. + * + * Generated from protobuf field .google.type.Date end_date = 2; + * @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); + } + + /** + * Date for the final run of the report. + * + * Generated from protobuf field .google.type.Date end_date = 2; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_date = $var; + + return $this; + } + + /** + * Frequency to run report. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule.Frequency frequency = 3; + * @return int + */ + public function getFrequency() + { + return $this->frequency; + } + + /** + * Frequency to run report. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule.Frequency frequency = 3; + * @param int $var + * @return $this + */ + public function setFrequency($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Schedule\Frequency::class); + $this->frequency = $var; + + return $this; + } + + /** + * Indicates start time for schedule to run + * Will use the time_zone from `ReportDefinition`. Defaults + * to the publisher's time zone if not specified. + * For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + * will be the time of day that the first report will run on the first day. + * For example, if the start time is 2:00 PM, and the frequency is + * THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + * 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + * 2:00 PM, 10:00 PM. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 4; + * @return \Google\Type\TimeOfDay|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Indicates start time for schedule to run + * Will use the time_zone from `ReportDefinition`. Defaults + * to the publisher's time zone if not specified. + * For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + * will be the time of day that the first report will run on the first day. + * For example, if the start time is 2:00 PM, and the frequency is + * THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + * 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + * 2:00 PM, 10:00 PM. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 4; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->start_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getFrequencySchedule() + { + return $this->whichOneof("frequency_schedule"); + } + +} + diff --git a/AdsAdManager/src/V1/Schedule/Frequency.php b/AdsAdManager/src/V1/Schedule/Frequency.php new file mode 100644 index 000000000000..079f0f2f6944 --- /dev/null +++ b/AdsAdManager/src/V1/Schedule/Frequency.php @@ -0,0 +1,97 @@ +google.ads.admanager.v1.Schedule.Frequency + */ +class Frequency +{ + /** + * No Frequency specified. + * + * Generated from protobuf enum FREQUENCY_UNSPECIFIED = 0; + */ + const FREQUENCY_UNSPECIFIED = 0; + /** + * Schedule report to run every hour. + * + * Generated from protobuf enum HOURLY = 1; + */ + const HOURLY = 1; + /** + * Schedule report to run twice a day (every 12 hours). + * + * Generated from protobuf enum TWO_TIMES_DAILY = 2; + */ + const TWO_TIMES_DAILY = 2; + /** + * Schedule report to run three times a day (every 8 hours). + * + * Generated from protobuf enum THREE_TIMES_DAILY = 3; + */ + const THREE_TIMES_DAILY = 3; + /** + * Schedule report to run four times a day (every 6 hours). + * + * Generated from protobuf enum FOUR_TIMES_DAILY = 4; + */ + const FOUR_TIMES_DAILY = 4; + /** + * Schedule report to run on a daily basis. + * + * Generated from protobuf enum DAILY = 5; + */ + const DAILY = 5; + /** + * Schedule report to run on a weekly basis. + * + * Generated from protobuf enum WEEKLY = 6; + */ + const WEEKLY = 6; + /** + * Schedule report to run on a monthly basis. + * + * Generated from protobuf enum MONTHLY = 7; + */ + const MONTHLY = 7; + + private static $valueToName = [ + self::FREQUENCY_UNSPECIFIED => 'FREQUENCY_UNSPECIFIED', + self::HOURLY => 'HOURLY', + self::TWO_TIMES_DAILY => 'TWO_TIMES_DAILY', + self::THREE_TIMES_DAILY => 'THREE_TIMES_DAILY', + self::FOUR_TIMES_DAILY => 'FOUR_TIMES_DAILY', + self::DAILY => 'DAILY', + self::WEEKLY => 'WEEKLY', + self::MONTHLY => 'MONTHLY', + ]; + + 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/AdsAdManager/src/V1/Schedule/MonthlySchedule.php b/AdsAdManager/src/V1/Schedule/MonthlySchedule.php new file mode 100644 index 000000000000..9997e91c800e --- /dev/null +++ b/AdsAdManager/src/V1/Schedule/MonthlySchedule.php @@ -0,0 +1,72 @@ +google.ads.admanager.v1.Schedule.MonthlySchedule + */ +class MonthlySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies days of the month to run report. Range is from 1-31. + * Will ignore days that are not valid for the given month. + * + * Generated from protobuf field repeated int32 monthly_scheduled_days = 1; + */ + private $monthly_scheduled_days; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $monthly_scheduled_days + * Specifies days of the month to run report. Range is from 1-31. + * Will ignore days that are not valid for the given month. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Specifies days of the month to run report. Range is from 1-31. + * Will ignore days that are not valid for the given month. + * + * Generated from protobuf field repeated int32 monthly_scheduled_days = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMonthlyScheduledDays() + { + return $this->monthly_scheduled_days; + } + + /** + * Specifies days of the month to run report. Range is from 1-31. + * Will ignore days that are not valid for the given month. + * + * Generated from protobuf field repeated int32 monthly_scheduled_days = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMonthlyScheduledDays($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->monthly_scheduled_days = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/Schedule/WeeklySchedule.php b/AdsAdManager/src/V1/Schedule/WeeklySchedule.php new file mode 100644 index 000000000000..c1b3d359a6f3 --- /dev/null +++ b/AdsAdManager/src/V1/Schedule/WeeklySchedule.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.Schedule.WeeklySchedule + */ +class WeeklySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies days of the week on which to run report. + * + * Generated from protobuf field repeated .google.type.DayOfWeek weekly_scheduled_days = 1; + */ + private $weekly_scheduled_days; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $weekly_scheduled_days + * Specifies days of the week on which to run report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Specifies days of the week on which to run report. + * + * Generated from protobuf field repeated .google.type.DayOfWeek weekly_scheduled_days = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWeeklyScheduledDays() + { + return $this->weekly_scheduled_days; + } + + /** + * Specifies days of the week on which to run report. + * + * Generated from protobuf field repeated .google.type.DayOfWeek weekly_scheduled_days = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWeeklyScheduledDays($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\DayOfWeek::class); + $this->weekly_scheduled_days = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ScheduleOptions.php b/AdsAdManager/src/V1/ScheduleOptions.php new file mode 100644 index 000000000000..fce3aa5c0d3c --- /dev/null +++ b/AdsAdManager/src/V1/ScheduleOptions.php @@ -0,0 +1,149 @@ +google.ads.admanager.v1.ScheduleOptions + */ +class ScheduleOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Information pertaining to schedule itself. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule schedule = 1; + */ + protected $schedule = null; + /** + * Option for when to deliver the scheduled report. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.DeliveryCondition delivery_condition = 2; + */ + protected $delivery_condition = 0; + /** + * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT + * is specified. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $flags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Schedule $schedule + * Information pertaining to schedule itself. + * @type int $delivery_condition + * Option for when to deliver the scheduled report. + * @type array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $flags + * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT + * is specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Information pertaining to schedule itself. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule schedule = 1; + * @return \Google\Ads\AdManager\V1\Schedule|null + */ + public function getSchedule() + { + return $this->schedule; + } + + public function hasSchedule() + { + return isset($this->schedule); + } + + public function clearSchedule() + { + unset($this->schedule); + } + + /** + * Information pertaining to schedule itself. + * + * Generated from protobuf field .google.ads.admanager.v1.Schedule schedule = 1; + * @param \Google\Ads\AdManager\V1\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Schedule::class); + $this->schedule = $var; + + return $this; + } + + /** + * Option for when to deliver the scheduled report. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.DeliveryCondition delivery_condition = 2; + * @return int + */ + public function getDeliveryCondition() + { + return $this->delivery_condition; + } + + /** + * Option for when to deliver the scheduled report. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.DeliveryCondition delivery_condition = 2; + * @param int $var + * @return $this + */ + public function setDeliveryCondition($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ScheduleOptions\DeliveryCondition::class); + $this->delivery_condition = $var; + + return $this; + } + + /** + * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT + * is specified. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFlags() + { + return $this->flags; + } + + /** + * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT + * is specified. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Flag::class); + $this->flags = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ScheduleOptions/DeliveryCondition.php b/AdsAdManager/src/V1/ScheduleOptions/DeliveryCondition.php new file mode 100644 index 000000000000..f6c9f5b1b827 --- /dev/null +++ b/AdsAdManager/src/V1/ScheduleOptions/DeliveryCondition.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.ScheduleOptions.DeliveryCondition + */ +class DeliveryCondition +{ + /** + * Never deliver report. + * + * Generated from protobuf enum NEVER = 0; + */ + const NEVER = 0; + /** + * Always deliver report. + * + * Generated from protobuf enum ALWAYS = 1; + */ + const ALWAYS = 1; + /** + * Deliver report when flag's conditions are met. + * + * Generated from protobuf enum WHEN_FLAG_CONDITIONS_MET = 2; + */ + const WHEN_FLAG_CONDITIONS_MET = 2; + + private static $valueToName = [ + self::NEVER => 'NEVER', + self::ALWAYS => 'ALWAYS', + self::WHEN_FLAG_CONDITIONS_MET => 'WHEN_FLAG_CONDITIONS_MET', + ]; + + 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/AdsAdManager/src/V1/Size.php b/AdsAdManager/src/V1/Size.php new file mode 100644 index 000000000000..927a409b1f5a --- /dev/null +++ b/AdsAdManager/src/V1/Size.php @@ -0,0 +1,163 @@ +google.ads.admanager.v1.Size + */ +class Size extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The width of the [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * + * Generated from protobuf field int32 width = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $width = 0; + /** + * Required. The height of the [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * + * Generated from protobuf field int32 height = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $height = 0; + /** + * Required. The SizeType of the + * [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * + * Generated from protobuf field .google.ads.admanager.v1.SizeTypeEnum.SizeType size_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $size_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $width + * Required. The width of the [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * @type int $height + * Required. The height of the [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * @type int $size_type + * Required. The SizeType of the + * [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Size::initOnce(); + parent::__construct($data); + } + + /** + * Required. The width of the [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * + * Generated from protobuf field int32 width = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getWidth() + { + return $this->width; + } + + /** + * Required. The width of the [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * + * Generated from protobuf field int32 width = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setWidth($var) + { + GPBUtil::checkInt32($var); + $this->width = $var; + + return $this; + } + + /** + * Required. The height of the [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * + * Generated from protobuf field int32 height = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * Required. The height of the [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * + * Generated from protobuf field int32 height = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setHeight($var) + { + GPBUtil::checkInt32($var); + $this->height = $var; + + return $this; + } + + /** + * Required. The SizeType of the + * [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * + * Generated from protobuf field .google.ads.admanager.v1.SizeTypeEnum.SizeType size_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSizeType() + { + return $this->size_type; + } + + /** + * Required. The SizeType of the + * [Creative](google.ads.admanager.v1.Creative), + * [AdUnit](google.ads.admanager.v1.AdUnit), or + * [LineItem](google.ads.admanager.v1.LineItem). + * + * Generated from protobuf field .google.ads.admanager.v1.SizeTypeEnum.SizeType size_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSizeType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\SizeTypeEnum\SizeType::class); + $this->size_type = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/SizeTypeEnum.php b/AdsAdManager/src/V1/SizeTypeEnum.php new file mode 100644 index 000000000000..245c82dc7304 --- /dev/null +++ b/AdsAdManager/src/V1/SizeTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.SizeTypeEnum + */ +class SizeTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SizeTypeEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/SizeTypeEnum/SizeType.php b/AdsAdManager/src/V1/SizeTypeEnum/SizeType.php new file mode 100644 index 000000000000..4b3cbd0385b9 --- /dev/null +++ b/AdsAdManager/src/V1/SizeTypeEnum/SizeType.php @@ -0,0 +1,103 @@ +google.ads.admanager.v1.SizeTypeEnum.SizeType + */ +class SizeType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum SIZE_TYPE_UNSPECIFIED = 0; + */ + const SIZE_TYPE_UNSPECIFIED = 0; + /** + * Dimension based size, an actual height and width in pixels. + * + * Generated from protobuf enum PIXEL = 1; + */ + const PIXEL = 1; + /** + * Size is expressed as a ratio. For example, 4:1 could be + * met by a 100 x 25 sized image. + * + * Generated from protobuf enum ASPECT_RATIO = 2; + */ + const ASPECT_RATIO = 2; + /** + * Out-of-page (Interstitial) size that is not related to the slot it is + * served. This must be used with 1x1 size. + * + * Generated from protobuf enum INTERSTITIAL = 3; + */ + const INTERSTITIAL = 3; + /** + * Size is ignored. This must be used with 1x1 + * size. + * + * Generated from protobuf enum IGNORED = 4; + */ + const IGNORED = 4; + /** + * Native size, which is a function of the how the client renders the + * creative. This must be used with 1x1 size. + * + * Generated from protobuf enum NATIVE = 5; + */ + const NATIVE = 5; + /** + * Fluid size. Automatically sizes the ad by filling the width of the + * enclosing column and adjusting the height as appropriate. This must be + * used with 1x1 size. + * + * Generated from protobuf enum FLUID = 6; + */ + const FLUID = 6; + /** + * Audio size. Used with audio ads. This must be used with 1x1 size. + * + * Generated from protobuf enum AUDIO = 7; + */ + const AUDIO = 7; + + private static $valueToName = [ + self::SIZE_TYPE_UNSPECIFIED => 'SIZE_TYPE_UNSPECIFIED', + self::PIXEL => 'PIXEL', + self::ASPECT_RATIO => 'ASPECT_RATIO', + self::INTERSTITIAL => 'INTERSTITIAL', + self::IGNORED => 'IGNORED', + self::NATIVE => 'NATIVE', + self::FLUID => 'FLUID', + self::AUDIO => 'AUDIO', + ]; + + 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/AdsAdManager/src/V1/SmartSizeModeEnum.php b/AdsAdManager/src/V1/SmartSizeModeEnum.php new file mode 100644 index 000000000000..40e9ca0edd29 --- /dev/null +++ b/AdsAdManager/src/V1/SmartSizeModeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.SmartSizeModeEnum + */ +class SmartSizeModeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/SmartSizeModeEnum/SmartSizeMode.php b/AdsAdManager/src/V1/SmartSizeModeEnum/SmartSizeMode.php new file mode 100644 index 000000000000..3b682e0be320 --- /dev/null +++ b/AdsAdManager/src/V1/SmartSizeModeEnum/SmartSizeMode.php @@ -0,0 +1,70 @@ +google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode + */ +class SmartSizeMode +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum SMART_SIZE_MODE_UNSPECIFIED = 0; + */ + const SMART_SIZE_MODE_UNSPECIFIED = 0; + /** + * Fixed size mode (default). + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * The height is fixed for the request, the width is a range. + * + * Generated from protobuf enum SMART_BANNER = 2; + */ + const SMART_BANNER = 2; + /** + * Height and width are ranges. + * + * Generated from protobuf enum DYNAMIC_SIZE = 3; + */ + const DYNAMIC_SIZE = 3; + + private static $valueToName = [ + self::SMART_SIZE_MODE_UNSPECIFIED => 'SMART_SIZE_MODE_UNSPECIFIED', + self::NONE => 'NONE', + self::SMART_BANNER => 'SMART_BANNER', + self::DYNAMIC_SIZE => 'DYNAMIC_SIZE', + ]; + + 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/AdsAdManager/src/V1/TargetWindowEnum.php b/AdsAdManager/src/V1/TargetWindowEnum.php new file mode 100644 index 000000000000..a8637484ab5b --- /dev/null +++ b/AdsAdManager/src/V1/TargetWindowEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.TargetWindowEnum + */ +class TargetWindowEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdUnitEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/TargetWindowEnum/TargetWindow.php b/AdsAdManager/src/V1/TargetWindowEnum/TargetWindow.php new file mode 100644 index 000000000000..8a8b36b99cf0 --- /dev/null +++ b/AdsAdManager/src/V1/TargetWindowEnum/TargetWindow.php @@ -0,0 +1,63 @@ +google.ads.admanager.v1.TargetWindowEnum.TargetWindow + */ +class TargetWindow +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TARGET_WINDOW_UNSPECIFIED = 0; + */ + const TARGET_WINDOW_UNSPECIFIED = 0; + /** + * Specifies that the link should open in the full body of the page. + * + * Generated from protobuf enum TOP = 1; + */ + const TOP = 1; + /** + * Specifies that the link should open in a new window. + * + * Generated from protobuf enum BLANK = 2; + */ + const BLANK = 2; + + private static $valueToName = [ + self::TARGET_WINDOW_UNSPECIFIED => 'TARGET_WINDOW_UNSPECIFIED', + self::TOP => 'TOP', + self::BLANK => 'BLANK', + ]; + + 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/AdsAdManager/src/V1/TaxonomyCategory.php b/AdsAdManager/src/V1/TaxonomyCategory.php new file mode 100644 index 000000000000..53d713a41b4d --- /dev/null +++ b/AdsAdManager/src/V1/TaxonomyCategory.php @@ -0,0 +1,317 @@ +google.ads.admanager.v1.TaxonomyCategory + */ +class TaxonomyCategory extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `TaxonomyCategory`. + * Format: `networks/{network_code}/taxonomyCategories/{taxonomy_category_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. `TaxonomyCategory` ID. + * + * Generated from protobuf field int64 taxonomy_category_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $taxonomy_category_id = 0; + /** + * Output only. Display name of the `TaxonomyCategory`. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. Whether this `TaxonomyCategory` only serves to group its + * children. + * + * Generated from protobuf field bool grouping_only = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $grouping_only = false; + /** + * Output only. The ID of the parent category this `TaxonomyCategory` descends + * from. + * + * Generated from protobuf field int64 parent_taxonomy_category_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $parent_taxonomy_category_id = 0; + /** + * Output only. The taxonomy that this `TaxonomyCategory` belongs to. + * + * Generated from protobuf field .google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType taxonomy_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $taxonomy_type = 0; + /** + * Output only. The list of names of the ancestors of this `TaxonomyCategory`. + * + * Generated from protobuf field repeated string ancestor_names = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $ancestor_names; + /** + * Output only. The list of IDs of the ancestors of this `TaxonomyCategory`. + * + * Generated from protobuf field repeated int64 ancestor_taxonomy_category_ids = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $ancestor_taxonomy_category_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `TaxonomyCategory`. + * Format: `networks/{network_code}/taxonomyCategories/{taxonomy_category_id}` + * @type int|string $taxonomy_category_id + * Output only. `TaxonomyCategory` ID. + * @type string $display_name + * Output only. Display name of the `TaxonomyCategory`. + * @type bool $grouping_only + * Output only. Whether this `TaxonomyCategory` only serves to group its + * children. + * @type int|string $parent_taxonomy_category_id + * Output only. The ID of the parent category this `TaxonomyCategory` descends + * from. + * @type int $taxonomy_type + * Output only. The taxonomy that this `TaxonomyCategory` belongs to. + * @type array|\Google\Protobuf\Internal\RepeatedField $ancestor_names + * Output only. The list of names of the ancestors of this `TaxonomyCategory`. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $ancestor_taxonomy_category_ids + * Output only. The list of IDs of the ancestors of this `TaxonomyCategory`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TaxonomyCategoryMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `TaxonomyCategory`. + * Format: `networks/{network_code}/taxonomyCategories/{taxonomy_category_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 `TaxonomyCategory`. + * Format: `networks/{network_code}/taxonomyCategories/{taxonomy_category_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; + } + + /** + * Output only. `TaxonomyCategory` ID. + * + * Generated from protobuf field int64 taxonomy_category_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTaxonomyCategoryId() + { + return $this->taxonomy_category_id; + } + + /** + * Output only. `TaxonomyCategory` ID. + * + * Generated from protobuf field int64 taxonomy_category_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTaxonomyCategoryId($var) + { + GPBUtil::checkInt64($var); + $this->taxonomy_category_id = $var; + + return $this; + } + + /** + * Output only. Display name of the `TaxonomyCategory`. + * + * 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. Display name of the `TaxonomyCategory`. + * + * 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. Whether this `TaxonomyCategory` only serves to group its + * children. + * + * Generated from protobuf field bool grouping_only = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGroupingOnly() + { + return $this->grouping_only; + } + + /** + * Output only. Whether this `TaxonomyCategory` only serves to group its + * children. + * + * Generated from protobuf field bool grouping_only = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGroupingOnly($var) + { + GPBUtil::checkBool($var); + $this->grouping_only = $var; + + return $this; + } + + /** + * Output only. The ID of the parent category this `TaxonomyCategory` descends + * from. + * + * Generated from protobuf field int64 parent_taxonomy_category_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getParentTaxonomyCategoryId() + { + return $this->parent_taxonomy_category_id; + } + + /** + * Output only. The ID of the parent category this `TaxonomyCategory` descends + * from. + * + * Generated from protobuf field int64 parent_taxonomy_category_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setParentTaxonomyCategoryId($var) + { + GPBUtil::checkInt64($var); + $this->parent_taxonomy_category_id = $var; + + return $this; + } + + /** + * Output only. The taxonomy that this `TaxonomyCategory` belongs to. + * + * Generated from protobuf field .google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType taxonomy_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTaxonomyType() + { + return $this->taxonomy_type; + } + + /** + * Output only. The taxonomy that this `TaxonomyCategory` belongs to. + * + * Generated from protobuf field .google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType taxonomy_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTaxonomyType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\TaxonomyTypeEnum\TaxonomyType::class); + $this->taxonomy_type = $var; + + return $this; + } + + /** + * Output only. The list of names of the ancestors of this `TaxonomyCategory`. + * + * Generated from protobuf field repeated string ancestor_names = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAncestorNames() + { + return $this->ancestor_names; + } + + /** + * Output only. The list of names of the ancestors of this `TaxonomyCategory`. + * + * Generated from protobuf field repeated string ancestor_names = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAncestorNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ancestor_names = $arr; + + return $this; + } + + /** + * Output only. The list of IDs of the ancestors of this `TaxonomyCategory`. + * + * Generated from protobuf field repeated int64 ancestor_taxonomy_category_ids = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAncestorTaxonomyCategoryIds() + { + return $this->ancestor_taxonomy_category_ids; + } + + /** + * Output only. The list of IDs of the ancestors of this `TaxonomyCategory`. + * + * Generated from protobuf field repeated int64 ancestor_taxonomy_category_ids = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAncestorTaxonomyCategoryIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->ancestor_taxonomy_category_ids = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/TaxonomyTypeEnum.php b/AdsAdManager/src/V1/TaxonomyTypeEnum.php new file mode 100644 index 000000000000..0eb538bca072 --- /dev/null +++ b/AdsAdManager/src/V1/TaxonomyTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.TaxonomyTypeEnum + */ +class TaxonomyTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TaxonomyTypeEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/TaxonomyTypeEnum/TaxonomyType.php b/AdsAdManager/src/V1/TaxonomyTypeEnum/TaxonomyType.php new file mode 100644 index 000000000000..e3dcd4043d54 --- /dev/null +++ b/AdsAdManager/src/V1/TaxonomyTypeEnum/TaxonomyType.php @@ -0,0 +1,84 @@ +google.ads.admanager.v1.TaxonomyTypeEnum.TaxonomyType + */ +class TaxonomyType +{ + /** + * Unspecified/not present + * + * Generated from protobuf enum TAXONOMY_TYPE_UNSPECIFIED = 0; + */ + const TAXONOMY_TYPE_UNSPECIFIED = 0; + /** + * The IAB Audience Taxonomy v1.1. + * + * Generated from protobuf enum TAXONOMY_IAB_AUDIENCE_1_1 = 3; + */ + const TAXONOMY_IAB_AUDIENCE_1_1 = 3; + /** + * The IAB Content Taxonomy v2.1. + * + * Generated from protobuf enum TAXONOMY_IAB_CONTENT_2_1 = 4; + */ + const TAXONOMY_IAB_CONTENT_2_1 = 4; + /** + * The IAB Content Taxonomy v2.2. + * + * Generated from protobuf enum TAXONOMY_IAB_CONTENT_2_2 = 6; + */ + const TAXONOMY_IAB_CONTENT_2_2 = 6; + /** + * The IAB Content Taxonomy v3.0. + * + * Generated from protobuf enum TAXONOMY_IAB_CONTENT_3_0 = 5; + */ + const TAXONOMY_IAB_CONTENT_3_0 = 5; + /** + * The PPS structured video signals taxonomy. + * + * Generated from protobuf enum TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0 = 7; + */ + const TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0 = 7; + + private static $valueToName = [ + self::TAXONOMY_TYPE_UNSPECIFIED => 'TAXONOMY_TYPE_UNSPECIFIED', + self::TAXONOMY_IAB_AUDIENCE_1_1 => 'TAXONOMY_IAB_AUDIENCE_1_1', + self::TAXONOMY_IAB_CONTENT_2_1 => 'TAXONOMY_IAB_CONTENT_2_1', + self::TAXONOMY_IAB_CONTENT_2_2 => 'TAXONOMY_IAB_CONTENT_2_2', + self::TAXONOMY_IAB_CONTENT_3_0 => 'TAXONOMY_IAB_CONTENT_3_0', + self::TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0 => 'TAXONOMY_GOOGLE_STRUCTURED_VIDEO_1_0', + ]; + + 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/AdsAdManager/src/V1/Team.php b/AdsAdManager/src/V1/Team.php new file mode 100644 index 000000000000..d48d2bf8bc0a --- /dev/null +++ b/AdsAdManager/src/V1/Team.php @@ -0,0 +1,109 @@ +google.ads.admanager.v1.Team + */ +class Team extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Team`. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The unique ID of the Team. This value is assigned by Google. + * Teams that are created by Google will have negative IDs. + * + * Generated from protobuf field int64 team_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $team_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Team`. + * Format: `networks/{network_code}/teams/{team_id}` + * @type int|string $team_id + * Output only. The unique ID of the Team. This value is assigned by Google. + * Teams that are created by Google will have negative IDs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Team`. + * Format: `networks/{network_code}/teams/{team_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 `Team`. + * Format: `networks/{network_code}/teams/{team_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; + } + + /** + * Output only. The unique ID of the Team. This value is assigned by Google. + * Teams that are created by Google will have negative IDs. + * + * Generated from protobuf field int64 team_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTeamId() + { + return $this->team_id; + } + + /** + * Output only. The unique ID of the Team. This value is assigned by Google. + * Teams that are created by Google will have negative IDs. + * + * Generated from protobuf field int64 team_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTeamId($var) + { + GPBUtil::checkInt64($var); + $this->team_id = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/TimeUnitEnum.php b/AdsAdManager/src/V1/TimeUnitEnum.php new file mode 100644 index 000000000000..22d5fc47f884 --- /dev/null +++ b/AdsAdManager/src/V1/TimeUnitEnum.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.TimeUnitEnum + */ +class TimeUnitEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TimeUnitEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/TimeUnitEnum/TimeUnit.php b/AdsAdManager/src/V1/TimeUnitEnum/TimeUnit.php new file mode 100644 index 000000000000..52a1e81c3c1b --- /dev/null +++ b/AdsAdManager/src/V1/TimeUnitEnum/TimeUnit.php @@ -0,0 +1,105 @@ +google.ads.admanager.v1.TimeUnitEnum.TimeUnit + */ +class TimeUnit +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TIME_UNIT_UNSPECIFIED = 0; + */ + const TIME_UNIT_UNSPECIFIED = 0; + /** + * Minute + * + * Generated from protobuf enum MINUTE = 1; + */ + const MINUTE = 1; + /** + * Hour + * + * Generated from protobuf enum HOUR = 2; + */ + const HOUR = 2; + /** + * Day + * + * Generated from protobuf enum DAY = 3; + */ + const DAY = 3; + /** + * Week + * + * Generated from protobuf enum WEEK = 4; + */ + const WEEK = 4; + /** + * Month + * + * Generated from protobuf enum MONTH = 5; + */ + const MONTH = 5; + /** + * Lifetime + * + * Generated from protobuf enum LIFETIME = 6; + */ + const LIFETIME = 6; + /** + * Per pod of ads in a video stream. Only valid for entities in a + * VIDEO_PLAYER environment. + * + * Generated from protobuf enum POD = 7; + */ + const POD = 7; + /** + * Per video stream. Only valid for entities in a VIDEO_PLAYER environment. + * + * Generated from protobuf enum STREAM = 8; + */ + const STREAM = 8; + + private static $valueToName = [ + self::TIME_UNIT_UNSPECIFIED => 'TIME_UNIT_UNSPECIFIED', + self::MINUTE => 'MINUTE', + self::HOUR => 'HOUR', + self::DAY => 'DAY', + self::WEEK => 'WEEK', + self::MONTH => 'MONTH', + self::LIFETIME => 'LIFETIME', + self::POD => 'POD', + self::STREAM => 'STREAM', + ]; + + 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/AdsAdManager/src/V1/UpdateEntitySignalsMappingRequest.php b/AdsAdManager/src/V1/UpdateEntitySignalsMappingRequest.php new file mode 100644 index 000000000000..0a9d17a8a645 --- /dev/null +++ b/AdsAdManager/src/V1/UpdateEntitySignalsMappingRequest.php @@ -0,0 +1,157 @@ +google.ads.admanager.v1.UpdateEntitySignalsMappingRequest + */ +class UpdateEntitySignalsMappingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `EntitySignalsMapping` to update. + * The EntitySignalsMapping's name is used to identify the + * EntitySignalsMapping to update. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}` + * + * Generated from protobuf field .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_signals_mapping = null; + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\EntitySignalsMapping $entitySignalsMapping Required. The `EntitySignalsMapping` to update. + * + * The EntitySignalsMapping's name is used to identify the + * EntitySignalsMapping to update. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}` + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdateEntitySignalsMappingRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\EntitySignalsMapping $entitySignalsMapping, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEntitySignalsMapping($entitySignalsMapping) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\EntitySignalsMapping $entity_signals_mapping + * Required. The `EntitySignalsMapping` to update. + * The EntitySignalsMapping's name is used to identify the + * EntitySignalsMapping to update. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}` + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\EntitySignalsMappingService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `EntitySignalsMapping` to update. + * The EntitySignalsMapping's name is used to identify the + * EntitySignalsMapping to update. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}` + * + * Generated from protobuf field .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\EntitySignalsMapping|null + */ + public function getEntitySignalsMapping() + { + return $this->entity_signals_mapping; + } + + public function hasEntitySignalsMapping() + { + return isset($this->entity_signals_mapping); + } + + public function clearEntitySignalsMapping() + { + unset($this->entity_signals_mapping); + } + + /** + * Required. The `EntitySignalsMapping` to update. + * The EntitySignalsMapping's name is used to identify the + * EntitySignalsMapping to update. + * Format: + * `networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}` + * + * Generated from protobuf field .google.ads.admanager.v1.EntitySignalsMapping entity_signals_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\EntitySignalsMapping $var + * @return $this + */ + public function setEntitySignalsMapping($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\EntitySignalsMapping::class); + $this->entity_signals_mapping = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/UpdateReportRequest.php b/AdsAdManager/src/V1/UpdateReportRequest.php new file mode 100644 index 000000000000..e34757d484ce --- /dev/null +++ b/AdsAdManager/src/V1/UpdateReportRequest.php @@ -0,0 +1,136 @@ +google.ads.admanager.v1.UpdateReportRequest + */ +class UpdateReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Report` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Report report = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report = null; + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\Report $report Required. The `Report` to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdateReportRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\Report $report, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setReport($report) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Report $report + * Required. The `Report` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Report` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Report report = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Report|null + */ + public function getReport() + { + return $this->report; + } + + public function hasReport() + { + return isset($this->report); + } + + public function clearReport() + { + unset($this->report); + } + + /** + * Required. The `Report` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Report report = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Report $var + * @return $this + */ + public function setReport($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report::class); + $this->report = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/User.php b/AdsAdManager/src/V1/User.php new file mode 100644 index 000000000000..a09c0c1997a9 --- /dev/null +++ b/AdsAdManager/src/V1/User.php @@ -0,0 +1,379 @@ +google.ads.admanager.v1.User + */ +class User extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the User. + * Format: `networks/{network_code}/users/{user_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. `User` ID. + * + * Generated from protobuf field int64 user_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $user_id = 0; + /** + * Required. The name of the User. It has a maximum length of 128 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. The email or login of the User. In order to create a new user, + * you must already have a Google Account. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $email = ''; + /** + * Required. The unique Role ID of the User. Roles that are created by Google + * will have negative IDs. + * + * Generated from protobuf field string role = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $role = ''; + /** + * Output only. Specifies whether or not the User is active. An inactive user + * cannot log in to the system or perform any operations. + * + * Generated from protobuf field bool active = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $active = false; + /** + * Optional. An identifier for the User that is meaningful to the publisher. + * This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $external_id = ''; + /** + * Output only. Whether the user is an OAuth2 service account user. + * Service account users can only be added through the UI. + * + * Generated from protobuf field bool service_account = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account = false; + /** + * Optional. The IANA Time Zone Database time zone, e.g. "America/New_York", + * used in the orders and line items UI for this User. If not provided, the UI + * then defaults to using the Network's timezone. This setting only affects + * the UI for this user and does not affect the timezone of any dates and + * times returned in API responses. + * + * Generated from protobuf field string orders_ui_local_time_zone = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $orders_ui_local_time_zone = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the User. + * Format: `networks/{network_code}/users/{user_id}` + * @type int|string $user_id + * Output only. `User` ID. + * @type string $display_name + * Required. The name of the User. It has a maximum length of 128 characters. + * @type string $email + * Required. The email or login of the User. In order to create a new user, + * you must already have a Google Account. + * @type string $role + * Required. The unique Role ID of the User. Roles that are created by Google + * will have negative IDs. + * @type bool $active + * Output only. Specifies whether or not the User is active. An inactive user + * cannot log in to the system or perform any operations. + * @type string $external_id + * Optional. An identifier for the User that is meaningful to the publisher. + * This attribute has a maximum length of 255 characters. + * @type bool $service_account + * Output only. Whether the user is an OAuth2 service account user. + * Service account users can only be added through the UI. + * @type string $orders_ui_local_time_zone + * Optional. The IANA Time Zone Database time zone, e.g. "America/New_York", + * used in the orders and line items UI for this User. If not provided, the UI + * then defaults to using the Network's timezone. This setting only affects + * the UI for this user and does not affect the timezone of any dates and + * times returned in API responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\UserMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the User. + * Format: `networks/{network_code}/users/{user_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 User. + * Format: `networks/{network_code}/users/{user_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; + } + + /** + * Output only. `User` ID. + * + * Generated from protobuf field int64 user_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getUserId() + { + return $this->user_id; + } + + /** + * Output only. `User` ID. + * + * Generated from protobuf field int64 user_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->user_id = $var; + + return $this; + } + + /** + * Required. The name of the User. It has a maximum length of 128 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The name of the User. It has a maximum length of 128 characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The email or login of the User. In order to create a new user, + * you must already have a Google Account. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Required. The email or login of the User. In order to create a new user, + * you must already have a Google Account. + * + * Generated from protobuf field string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Required. The unique Role ID of the User. Roles that are created by Google + * will have negative IDs. + * + * Generated from protobuf field string role = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRole() + { + return $this->role; + } + + /** + * Required. The unique Role ID of the User. Roles that are created by Google + * will have negative IDs. + * + * Generated from protobuf field string role = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkString($var, True); + $this->role = $var; + + return $this; + } + + /** + * Output only. Specifies whether or not the User is active. An inactive user + * cannot log in to the system or perform any operations. + * + * Generated from protobuf field bool active = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getActive() + { + return $this->active; + } + + /** + * Output only. Specifies whether or not the User is active. An inactive user + * cannot log in to the system or perform any operations. + * + * Generated from protobuf field bool active = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setActive($var) + { + GPBUtil::checkBool($var); + $this->active = $var; + + return $this; + } + + /** + * Optional. An identifier for the User that is meaningful to the publisher. + * This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getExternalId() + { + return $this->external_id; + } + + /** + * Optional. An identifier for the User that is meaningful to the publisher. + * This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setExternalId($var) + { + GPBUtil::checkString($var, True); + $this->external_id = $var; + + return $this; + } + + /** + * Output only. Whether the user is an OAuth2 service account user. + * Service account users can only be added through the UI. + * + * Generated from protobuf field bool service_account = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Output only. Whether the user is an OAuth2 service account user. + * Service account users can only be added through the UI. + * + * Generated from protobuf field bool service_account = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkBool($var); + $this->service_account = $var; + + return $this; + } + + /** + * Optional. The IANA Time Zone Database time zone, e.g. "America/New_York", + * used in the orders and line items UI for this User. If not provided, the UI + * then defaults to using the Network's timezone. This setting only affects + * the UI for this user and does not affect the timezone of any dates and + * times returned in API responses. + * + * Generated from protobuf field string orders_ui_local_time_zone = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrdersUiLocalTimeZone() + { + return $this->orders_ui_local_time_zone; + } + + /** + * Optional. The IANA Time Zone Database time zone, e.g. "America/New_York", + * used in the orders and line items UI for this User. If not provided, the UI + * then defaults to using the Network's timezone. This setting only affects + * the UI for this user and does not affect the timezone of any dates and + * times returned in API responses. + * + * Generated from protobuf field string orders_ui_local_time_zone = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrdersUiLocalTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->orders_ui_local_time_zone = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/gapic_metadata.json b/AdsAdManager/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..b61b94818b7a --- /dev/null +++ b/AdsAdManager/src/V1/gapic_metadata.json @@ -0,0 +1,296 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.ads.admanager.v1", + "libraryPackage": "Google\\Ads\\AdManager\\V1", + "services": { + "AdUnitService": { + "clients": { + "grpc": { + "libraryClient": "AdUnitServiceGapicClient", + "rpcs": { + "GetAdUnit": { + "methods": [ + "getAdUnit" + ] + }, + "ListAdUnitSizes": { + "methods": [ + "listAdUnitSizes" + ] + }, + "ListAdUnits": { + "methods": [ + "listAdUnits" + ] + } + } + } + } + }, + "CompanyService": { + "clients": { + "grpc": { + "libraryClient": "CompanyServiceGapicClient", + "rpcs": { + "GetCompany": { + "methods": [ + "getCompany" + ] + }, + "ListCompanies": { + "methods": [ + "listCompanies" + ] + } + } + } + } + }, + "CustomFieldService": { + "clients": { + "grpc": { + "libraryClient": "CustomFieldServiceGapicClient", + "rpcs": { + "GetCustomField": { + "methods": [ + "getCustomField" + ] + }, + "ListCustomFields": { + "methods": [ + "listCustomFields" + ] + } + } + } + } + }, + "CustomTargetingKeyService": { + "clients": { + "grpc": { + "libraryClient": "CustomTargetingKeyServiceGapicClient", + "rpcs": { + "GetCustomTargetingKey": { + "methods": [ + "getCustomTargetingKey" + ] + }, + "ListCustomTargetingKeys": { + "methods": [ + "listCustomTargetingKeys" + ] + } + } + } + } + }, + "CustomTargetingValueService": { + "clients": { + "grpc": { + "libraryClient": "CustomTargetingValueServiceGapicClient", + "rpcs": { + "GetCustomTargetingValue": { + "methods": [ + "getCustomTargetingValue" + ] + }, + "ListCustomTargetingValues": { + "methods": [ + "listCustomTargetingValues" + ] + } + } + } + } + }, + "EntitySignalsMappingService": { + "clients": { + "grpc": { + "libraryClient": "EntitySignalsMappingServiceGapicClient", + "rpcs": { + "BatchCreateEntitySignalsMappings": { + "methods": [ + "batchCreateEntitySignalsMappings" + ] + }, + "BatchUpdateEntitySignalsMappings": { + "methods": [ + "batchUpdateEntitySignalsMappings" + ] + }, + "CreateEntitySignalsMapping": { + "methods": [ + "createEntitySignalsMapping" + ] + }, + "GetEntitySignalsMapping": { + "methods": [ + "getEntitySignalsMapping" + ] + }, + "ListEntitySignalsMappings": { + "methods": [ + "listEntitySignalsMappings" + ] + }, + "UpdateEntitySignalsMapping": { + "methods": [ + "updateEntitySignalsMapping" + ] + } + } + } + } + }, + "NetworkService": { + "clients": { + "grpc": { + "libraryClient": "NetworkServiceGapicClient", + "rpcs": { + "GetNetwork": { + "methods": [ + "getNetwork" + ] + }, + "ListNetworks": { + "methods": [ + "listNetworks" + ] + } + } + } + } + }, + "OrderService": { + "clients": { + "grpc": { + "libraryClient": "OrderServiceGapicClient", + "rpcs": { + "GetOrder": { + "methods": [ + "getOrder" + ] + }, + "ListOrders": { + "methods": [ + "listOrders" + ] + } + } + } + } + }, + "PlacementService": { + "clients": { + "grpc": { + "libraryClient": "PlacementServiceGapicClient", + "rpcs": { + "GetPlacement": { + "methods": [ + "getPlacement" + ] + }, + "ListPlacements": { + "methods": [ + "listPlacements" + ] + } + } + } + } + }, + "ReportService": { + "clients": { + "grpc": { + "libraryClient": "ReportServiceGapicClient", + "rpcs": { + "CreateReport": { + "methods": [ + "createReport" + ] + }, + "FetchReportResultRows": { + "methods": [ + "fetchReportResultRows" + ] + }, + "GetReport": { + "methods": [ + "getReport" + ] + }, + "ListReports": { + "methods": [ + "listReports" + ] + }, + "RunReport": { + "methods": [ + "runReport" + ] + }, + "UpdateReport": { + "methods": [ + "updateReport" + ] + } + } + } + } + }, + "RoleService": { + "clients": { + "grpc": { + "libraryClient": "RoleServiceGapicClient", + "rpcs": { + "GetRole": { + "methods": [ + "getRole" + ] + }, + "ListRoles": { + "methods": [ + "listRoles" + ] + } + } + } + } + }, + "TaxonomyCategoryService": { + "clients": { + "grpc": { + "libraryClient": "TaxonomyCategoryServiceGapicClient", + "rpcs": { + "GetTaxonomyCategory": { + "methods": [ + "getTaxonomyCategory" + ] + }, + "ListTaxonomyCategories": { + "methods": [ + "listTaxonomyCategories" + ] + } + } + } + } + }, + "UserService": { + "clients": { + "grpc": { + "libraryClient": "UserServiceGapicClient", + "rpcs": { + "GetUser": { + "methods": [ + "getUser" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AdsAdManager/src/V1/resources/ad_unit_service_client_config.json b/AdsAdManager/src/V1/resources/ad_unit_service_client_config.json new file mode 100644 index 000000000000..5fdf2cea857b --- /dev/null +++ b/AdsAdManager/src/V1/resources/ad_unit_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.ads.admanager.v1.AdUnitService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetAdUnit": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAdUnitSizes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAdUnits": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/ad_unit_service_descriptor_config.php b/AdsAdManager/src/V1/resources/ad_unit_service_descriptor_config.php new file mode 100644 index 000000000000..50f3f17baaff --- /dev/null +++ b/AdsAdManager/src/V1/resources/ad_unit_service_descriptor_config.php @@ -0,0 +1,84 @@ + [ + 'google.ads.admanager.v1.AdUnitService' => [ + 'GetAdUnit' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\AdUnit', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAdUnitSizes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAdUnitSizes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListAdUnitSizesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAdUnits' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAdUnits', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListAdUnitsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'adUnit' => 'networks/{network_code}/adUnits/{ad_unit}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/ad_unit_service_rest_client_config.php b/AdsAdManager/src/V1/resources/ad_unit_service_rest_client_config.php new file mode 100644 index 000000000000..2357e7bb5118 --- /dev/null +++ b/AdsAdManager/src/V1/resources/ad_unit_service_rest_client_config.php @@ -0,0 +1,81 @@ + [ + 'google.ads.admanager.v1.AdUnitService' => [ + 'GetAdUnit' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/adUnits/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAdUnitSizes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/adUnitSizes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAdUnits' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/adUnits', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/company_service_client_config.json b/AdsAdManager/src/V1/resources/company_service_client_config.json new file mode 100644 index 000000000000..00bdee6fd628 --- /dev/null +++ b/AdsAdManager/src/V1/resources/company_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CompanyService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetCompany": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListCompanies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/company_service_descriptor_config.php b/AdsAdManager/src/V1/resources/company_service_descriptor_config.php new file mode 100644 index 000000000000..702b48d1cefb --- /dev/null +++ b/AdsAdManager/src/V1/resources/company_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CompanyService' => [ + 'GetCompany' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Company', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCompanies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCompanies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListCompaniesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'company' => 'networks/{network_code}/companies/{company}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/company_service_rest_client_config.php b/AdsAdManager/src/V1/resources/company_service_rest_client_config.php new file mode 100644 index 000000000000..337fb3ce0db9 --- /dev/null +++ b/AdsAdManager/src/V1/resources/company_service_rest_client_config.php @@ -0,0 +1,70 @@ + [ + 'google.ads.admanager.v1.CompanyService' => [ + 'GetCompany' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/companies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCompanies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/companies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/custom_field_service_client_config.json b/AdsAdManager/src/V1/resources/custom_field_service_client_config.json new file mode 100644 index 000000000000..8f8a5a8fc36e --- /dev/null +++ b/AdsAdManager/src/V1/resources/custom_field_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CustomFieldService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetCustomField": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListCustomFields": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/custom_field_service_descriptor_config.php b/AdsAdManager/src/V1/resources/custom_field_service_descriptor_config.php new file mode 100644 index 000000000000..a7ce127626b8 --- /dev/null +++ b/AdsAdManager/src/V1/resources/custom_field_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CustomFieldService' => [ + 'GetCustomField' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CustomField', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCustomFields' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCustomFields', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListCustomFieldsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'customField' => 'networks/{network_code}/customFields/{custom_field}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/custom_field_service_rest_client_config.php b/AdsAdManager/src/V1/resources/custom_field_service_rest_client_config.php new file mode 100644 index 000000000000..73fa8d1c16df --- /dev/null +++ b/AdsAdManager/src/V1/resources/custom_field_service_rest_client_config.php @@ -0,0 +1,70 @@ + [ + 'google.ads.admanager.v1.CustomFieldService' => [ + 'GetCustomField' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/customFields/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCustomFields' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/customFields', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/custom_targeting_key_service_client_config.json b/AdsAdManager/src/V1/resources/custom_targeting_key_service_client_config.json new file mode 100644 index 000000000000..031df8f440ba --- /dev/null +++ b/AdsAdManager/src/V1/resources/custom_targeting_key_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CustomTargetingKeyService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetCustomTargetingKey": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListCustomTargetingKeys": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/custom_targeting_key_service_descriptor_config.php b/AdsAdManager/src/V1/resources/custom_targeting_key_service_descriptor_config.php new file mode 100644 index 000000000000..107f89f40f0e --- /dev/null +++ b/AdsAdManager/src/V1/resources/custom_targeting_key_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CustomTargetingKeyService' => [ + 'GetCustomTargetingKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CustomTargetingKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCustomTargetingKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCustomTargetingKeys', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListCustomTargetingKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'customTargetingKey' => 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/custom_targeting_key_service_rest_client_config.php b/AdsAdManager/src/V1/resources/custom_targeting_key_service_rest_client_config.php new file mode 100644 index 000000000000..1a35718aa455 --- /dev/null +++ b/AdsAdManager/src/V1/resources/custom_targeting_key_service_rest_client_config.php @@ -0,0 +1,70 @@ + [ + 'google.ads.admanager.v1.CustomTargetingKeyService' => [ + 'GetCustomTargetingKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/customTargetingKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCustomTargetingKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/customTargetingKeys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/custom_targeting_value_service_client_config.json b/AdsAdManager/src/V1/resources/custom_targeting_value_service_client_config.json new file mode 100644 index 000000000000..e2444ae9ce7b --- /dev/null +++ b/AdsAdManager/src/V1/resources/custom_targeting_value_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CustomTargetingValueService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetCustomTargetingValue": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListCustomTargetingValues": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/custom_targeting_value_service_descriptor_config.php b/AdsAdManager/src/V1/resources/custom_targeting_value_service_descriptor_config.php new file mode 100644 index 000000000000..2d1752e01380 --- /dev/null +++ b/AdsAdManager/src/V1/resources/custom_targeting_value_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CustomTargetingValueService' => [ + 'GetCustomTargetingValue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CustomTargetingValue', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCustomTargetingValues' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCustomTargetingValues', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListCustomTargetingValuesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'customTargetingKey' => 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}', + 'customTargetingValue' => 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/custom_targeting_value_service_rest_client_config.php b/AdsAdManager/src/V1/resources/custom_targeting_value_service_rest_client_config.php new file mode 100644 index 000000000000..b6c9c7456c27 --- /dev/null +++ b/AdsAdManager/src/V1/resources/custom_targeting_value_service_rest_client_config.php @@ -0,0 +1,70 @@ + [ + 'google.ads.admanager.v1.CustomTargetingValueService' => [ + 'GetCustomTargetingValue' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/customTargetingKeys/*/customTargetingValues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCustomTargetingValues' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*/customTargetingKeys/*}/customTargetingValues', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/entity_signals_mapping_service_client_config.json b/AdsAdManager/src/V1/resources/entity_signals_mapping_service_client_config.json new file mode 100644 index 000000000000..22fd1b90d729 --- /dev/null +++ b/AdsAdManager/src/V1/resources/entity_signals_mapping_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.ads.admanager.v1.EntitySignalsMappingService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "BatchCreateEntitySignalsMappings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchUpdateEntitySignalsMappings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateEntitySignalsMapping": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetEntitySignalsMapping": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListEntitySignalsMappings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateEntitySignalsMapping": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/entity_signals_mapping_service_descriptor_config.php b/AdsAdManager/src/V1/resources/entity_signals_mapping_service_descriptor_config.php new file mode 100644 index 000000000000..ee92c845811d --- /dev/null +++ b/AdsAdManager/src/V1/resources/entity_signals_mapping_service_descriptor_config.php @@ -0,0 +1,113 @@ + [ + 'google.ads.admanager.v1.EntitySignalsMappingService' => [ + 'BatchCreateEntitySignalsMappings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchCreateEntitySignalsMappingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateEntitySignalsMappings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUpdateEntitySignalsMappingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEntitySignalsMapping' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\EntitySignalsMapping', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetEntitySignalsMapping' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\EntitySignalsMapping', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListEntitySignalsMappings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEntitySignalsMappings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListEntitySignalsMappingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEntitySignalsMapping' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\EntitySignalsMapping', + 'headerParams' => [ + [ + 'keyName' => 'entity_signals_mapping.name', + 'fieldAccessors' => [ + 'getEntitySignalsMapping', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'entitySignalsMapping' => 'networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/entity_signals_mapping_service_rest_client_config.php b/AdsAdManager/src/V1/resources/entity_signals_mapping_service_rest_client_config.php new file mode 100644 index 000000000000..9f9aae3f48ea --- /dev/null +++ b/AdsAdManager/src/V1/resources/entity_signals_mapping_service_rest_client_config.php @@ -0,0 +1,122 @@ + [ + 'google.ads.admanager.v1.EntitySignalsMappingService' => [ + 'BatchCreateEntitySignalsMappings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/entitySignalsMappings:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateEntitySignalsMappings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/entitySignalsMappings:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEntitySignalsMapping' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/entitySignalsMappings', + 'body' => 'entity_signals_mapping', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetEntitySignalsMapping' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/entitySignalsMappings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEntitySignalsMappings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/entitySignalsMappings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEntitySignalsMapping' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{entity_signals_mapping.name=networks/*/entitySignalsMappings/*}', + 'body' => 'entity_signals_mapping', + 'placeholders' => [ + 'entity_signals_mapping.name' => [ + 'getters' => [ + 'getEntitySignalsMapping', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/network_service_client_config.json b/AdsAdManager/src/V1/resources/network_service_client_config.json new file mode 100644 index 000000000000..aec7ab1f074c --- /dev/null +++ b/AdsAdManager/src/V1/resources/network_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.NetworkService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetNetwork": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListNetworks": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/network_service_descriptor_config.php b/AdsAdManager/src/V1/resources/network_service_descriptor_config.php new file mode 100644 index 000000000000..9c9e431d99fa --- /dev/null +++ b/AdsAdManager/src/V1/resources/network_service_descriptor_config.php @@ -0,0 +1,47 @@ + [ + 'google.ads.admanager.v1.NetworkService' => [ + 'GetNetwork' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Network', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListNetworks' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListNetworksResponse', + ], + 'templateMap' => [ + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/network_service_rest_client_config.php b/AdsAdManager/src/V1/resources/network_service_rest_client_config.php new file mode 100644 index 000000000000..8a718fdee222 --- /dev/null +++ b/AdsAdManager/src/V1/resources/network_service_rest_client_config.php @@ -0,0 +1,63 @@ + [ + 'google.ads.admanager.v1.NetworkService' => [ + 'GetNetwork' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListNetworks' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/networks', + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/order_service_client_config.json b/AdsAdManager/src/V1/resources/order_service_client_config.json new file mode 100644 index 000000000000..de7c27588915 --- /dev/null +++ b/AdsAdManager/src/V1/resources/order_service_client_config.json @@ -0,0 +1,44 @@ +{ + "interfaces": { + "google.ads.admanager.v1.OrderService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "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": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "GetOrder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/order_service_descriptor_config.php b/AdsAdManager/src/V1/resources/order_service_descriptor_config.php new file mode 100644 index 000000000000..9cf7e3962ede --- /dev/null +++ b/AdsAdManager/src/V1/resources/order_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.OrderService' => [ + 'GetOrder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Order', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListOrders' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOrders', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'network' => 'networks/{network_code}', + 'order' => 'networks/{network_code}/orders/{order}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/order_service_rest_client_config.php b/AdsAdManager/src/V1/resources/order_service_rest_client_config.php new file mode 100644 index 000000000000..67c80d2ce1ed --- /dev/null +++ b/AdsAdManager/src/V1/resources/order_service_rest_client_config.php @@ -0,0 +1,70 @@ + [ + 'google.ads.admanager.v1.OrderService' => [ + 'GetOrder' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/orders/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOrders' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/orders', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/placement_service_client_config.json b/AdsAdManager/src/V1/resources/placement_service_client_config.json new file mode 100644 index 000000000000..8d039baaad41 --- /dev/null +++ b/AdsAdManager/src/V1/resources/placement_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.PlacementService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetPlacement": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListPlacements": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/placement_service_descriptor_config.php b/AdsAdManager/src/V1/resources/placement_service_descriptor_config.php new file mode 100644 index 000000000000..f7949ce84422 --- /dev/null +++ b/AdsAdManager/src/V1/resources/placement_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.PlacementService' => [ + 'GetPlacement' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Placement', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListPlacements' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPlacements', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListPlacementsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'network' => 'networks/{network_code}', + 'placement' => 'networks/{network_code}/placements/{placement}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/placement_service_rest_client_config.php b/AdsAdManager/src/V1/resources/placement_service_rest_client_config.php new file mode 100644 index 000000000000..385d27a9a508 --- /dev/null +++ b/AdsAdManager/src/V1/resources/placement_service_rest_client_config.php @@ -0,0 +1,70 @@ + [ + 'google.ads.admanager.v1.PlacementService' => [ + 'GetPlacement' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/placements/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListPlacements' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/placements', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/report_service_client_config.json b/AdsAdManager/src/V1/resources/report_service_client_config.json new file mode 100644 index 000000000000..30eac575d3c6 --- /dev/null +++ b/AdsAdManager/src/V1/resources/report_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ReportService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "CreateReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "FetchReportResultRows": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListReports": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RunReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/report_service_descriptor_config.php b/AdsAdManager/src/V1/resources/report_service_descriptor_config.php new file mode 100644 index 000000000000..6d3268234ca5 --- /dev/null +++ b/AdsAdManager/src/V1/resources/report_service_descriptor_config.php @@ -0,0 +1,120 @@ + [ + 'google.ads.admanager.v1.ReportService' => [ + 'RunReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Ads\AdManager\V1\RunReportResponse', + 'metadataReturnType' => '\Google\Ads\AdManager\V1\RunReportMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Report', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'FetchReportResultRows' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\FetchReportResultRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Report', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListReports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListReportsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Report', + 'headerParams' => [ + [ + 'keyName' => 'report.name', + 'fieldAccessors' => [ + 'getReport', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'network' => 'networks/{network_code}', + 'report' => 'networks/{network_code}/reports/{report}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/report_service_rest_client_config.php b/AdsAdManager/src/V1/resources/report_service_rest_client_config.php new file mode 100644 index 000000000000..3a942eabf667 --- /dev/null +++ b/AdsAdManager/src/V1/resources/report_service_rest_client_config.php @@ -0,0 +1,121 @@ + [ + 'google.ads.admanager.v1.ReportService' => [ + 'CreateReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/reports', + 'body' => 'report', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'FetchReportResultRows' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/reports/*/results/*}:fetchRows', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/reports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListReports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/reports', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=networks/*/reports/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateReport' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{report.name=networks/*/reports/*}', + 'body' => 'report', + 'placeholders' => [ + 'report.name' => [ + 'getters' => [ + 'getReport', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/role_service_client_config.json b/AdsAdManager/src/V1/resources/role_service_client_config.json new file mode 100644 index 000000000000..ac76997d5641 --- /dev/null +++ b/AdsAdManager/src/V1/resources/role_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.RoleService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetRole": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListRoles": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/role_service_descriptor_config.php b/AdsAdManager/src/V1/resources/role_service_descriptor_config.php new file mode 100644 index 000000000000..03c6d0883075 --- /dev/null +++ b/AdsAdManager/src/V1/resources/role_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.RoleService' => [ + 'GetRole' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Role', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListRoles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRoles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListRolesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'network' => 'networks/{network_code}', + 'role' => 'networks/{network_code}/roles/{role}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/role_service_rest_client_config.php b/AdsAdManager/src/V1/resources/role_service_rest_client_config.php new file mode 100644 index 000000000000..5d49f4fe70cb --- /dev/null +++ b/AdsAdManager/src/V1/resources/role_service_rest_client_config.php @@ -0,0 +1,70 @@ + [ + 'google.ads.admanager.v1.RoleService' => [ + 'GetRole' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/roles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListRoles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/roles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/taxonomy_category_service_client_config.json b/AdsAdManager/src/V1/resources/taxonomy_category_service_client_config.json new file mode 100644 index 000000000000..2de30370c2f5 --- /dev/null +++ b/AdsAdManager/src/V1/resources/taxonomy_category_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.TaxonomyCategoryService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetTaxonomyCategory": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListTaxonomyCategories": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/taxonomy_category_service_descriptor_config.php b/AdsAdManager/src/V1/resources/taxonomy_category_service_descriptor_config.php new file mode 100644 index 000000000000..6be3b9000cc7 --- /dev/null +++ b/AdsAdManager/src/V1/resources/taxonomy_category_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.TaxonomyCategoryService' => [ + 'GetTaxonomyCategory' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\TaxonomyCategory', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListTaxonomyCategories' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTaxonomyCategories', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListTaxonomyCategoriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'network' => 'networks/{network_code}', + 'taxonomyCategory' => 'networks/{network_code}/taxonomyCategories/{taxonomy_category}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/taxonomy_category_service_rest_client_config.php b/AdsAdManager/src/V1/resources/taxonomy_category_service_rest_client_config.php new file mode 100644 index 000000000000..5fc884225e03 --- /dev/null +++ b/AdsAdManager/src/V1/resources/taxonomy_category_service_rest_client_config.php @@ -0,0 +1,70 @@ + [ + 'google.ads.admanager.v1.TaxonomyCategoryService' => [ + 'GetTaxonomyCategory' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/taxonomyCategories/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListTaxonomyCategories' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/taxonomyCategories', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/user_service_client_config.json b/AdsAdManager/src/V1/resources/user_service_client_config.json new file mode 100644 index 000000000000..34a4b4903db2 --- /dev/null +++ b/AdsAdManager/src/V1/resources/user_service_client_config.json @@ -0,0 +1,27 @@ +{ + "interfaces": { + "google.ads.admanager.v1.UserService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "GetUser": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/user_service_descriptor_config.php b/AdsAdManager/src/V1/resources/user_service_descriptor_config.php new file mode 100644 index 000000000000..405ff289c084 --- /dev/null +++ b/AdsAdManager/src/V1/resources/user_service_descriptor_config.php @@ -0,0 +1,43 @@ + [ + 'google.ads.admanager.v1.UserService' => [ + 'GetUser' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\User', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'user' => 'networks/{network_code}/users/{user}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/user_service_rest_client_config.php b/AdsAdManager/src/V1/resources/user_service_rest_client_config.php new file mode 100644 index 000000000000..91979f52361a --- /dev/null +++ b/AdsAdManager/src/V1/resources/user_service_rest_client_config.php @@ -0,0 +1,59 @@ + [ + 'google.ads.admanager.v1.UserService' => [ + 'GetUser' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/users/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/exports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/tests/Unit/V1/Client/AdUnitServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/AdUnitServiceClientTest.php new file mode 100644 index 000000000000..1783a121f27f --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/AdUnitServiceClientTest.php @@ -0,0 +1,348 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return AdUnitServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AdUnitServiceClient($options); + } + + /** @test */ + public function getAdUnitTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $adUnitId = 167061094; + $parentAdUnit = 'parentAdUnit-898168437'; + $displayName = 'displayName1615086568'; + $adUnitCode = 'adUnitCode-1632086356'; + $description = 'description-1724546052'; + $explicitlyTargeted = true; + $hasChildren = true; + $externalSetTopBoxChannelId = 'externalSetTopBoxChannelId-1727346970'; + $appliedAdsenseEnabled = false; + $effectiveAdsenseEnabled = false; + $expectedResponse = new AdUnit(); + $expectedResponse->setName($name2); + $expectedResponse->setAdUnitId($adUnitId); + $expectedResponse->setParentAdUnit($parentAdUnit); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAdUnitCode($adUnitCode); + $expectedResponse->setDescription($description); + $expectedResponse->setExplicitlyTargeted($explicitlyTargeted); + $expectedResponse->setHasChildren($hasChildren); + $expectedResponse->setExternalSetTopBoxChannelId($externalSetTopBoxChannelId); + $expectedResponse->setAppliedAdsenseEnabled($appliedAdsenseEnabled); + $expectedResponse->setEffectiveAdsenseEnabled($effectiveAdsenseEnabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adUnitName('[NETWORK_CODE]', '[AD_UNIT]'); + $request = (new GetAdUnitRequest())->setName($formattedName); + $response = $gapicClient->getAdUnit($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.AdUnitService/GetAdUnit', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAdUnitExceptionTest() + { + $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->adUnitName('[NETWORK_CODE]', '[AD_UNIT]'); + $request = (new GetAdUnitRequest())->setName($formattedName); + try { + $gapicClient->getAdUnit($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 listAdUnitSizesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $adUnitSizesElement = new AdUnitSize(); + $adUnitSizes = [$adUnitSizesElement]; + $expectedResponse = new ListAdUnitSizesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setAdUnitSizes($adUnitSizes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListAdUnitSizesRequest())->setParent($formattedParent); + $response = $gapicClient->listAdUnitSizes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAdUnitSizes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.AdUnitService/ListAdUnitSizes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdUnitSizesExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListAdUnitSizesRequest())->setParent($formattedParent); + try { + $gapicClient->listAdUnitSizes($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 listAdUnitsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $adUnitsElement = new AdUnit(); + $adUnits = [$adUnitsElement]; + $expectedResponse = new ListAdUnitsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setAdUnits($adUnits); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListAdUnitsRequest())->setParent($formattedParent); + $response = $gapicClient->listAdUnits($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAdUnits()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.AdUnitService/ListAdUnits', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdUnitsExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListAdUnitsRequest())->setParent($formattedParent); + try { + $gapicClient->listAdUnits($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 getAdUnitAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $adUnitId = 167061094; + $parentAdUnit = 'parentAdUnit-898168437'; + $displayName = 'displayName1615086568'; + $adUnitCode = 'adUnitCode-1632086356'; + $description = 'description-1724546052'; + $explicitlyTargeted = true; + $hasChildren = true; + $externalSetTopBoxChannelId = 'externalSetTopBoxChannelId-1727346970'; + $appliedAdsenseEnabled = false; + $effectiveAdsenseEnabled = false; + $expectedResponse = new AdUnit(); + $expectedResponse->setName($name2); + $expectedResponse->setAdUnitId($adUnitId); + $expectedResponse->setParentAdUnit($parentAdUnit); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAdUnitCode($adUnitCode); + $expectedResponse->setDescription($description); + $expectedResponse->setExplicitlyTargeted($explicitlyTargeted); + $expectedResponse->setHasChildren($hasChildren); + $expectedResponse->setExternalSetTopBoxChannelId($externalSetTopBoxChannelId); + $expectedResponse->setAppliedAdsenseEnabled($appliedAdsenseEnabled); + $expectedResponse->setEffectiveAdsenseEnabled($effectiveAdsenseEnabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adUnitName('[NETWORK_CODE]', '[AD_UNIT]'); + $request = (new GetAdUnitRequest())->setName($formattedName); + $response = $gapicClient->getAdUnitAsync($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.ads.admanager.v1.AdUnitService/GetAdUnit', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/CompanyServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/CompanyServiceClientTest.php new file mode 100644 index 000000000000..4e512619f2c3 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/CompanyServiceClientTest.php @@ -0,0 +1,272 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return CompanyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CompanyServiceClient($options); + } + + /** @test */ + public function getCompanyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $companyId = 847673315; + $displayName = 'displayName1615086568'; + $address = 'address-1147692044'; + $email = 'email96619420'; + $fax = 'fax101149'; + $phone = 'phone106642798'; + $externalId = 'externalId-1153075697'; + $comment = 'comment950398559'; + $primaryContact = 'primaryContact203339491'; + $thirdPartyCompanyId = 2003341038; + $expectedResponse = new Company(); + $expectedResponse->setName($name2); + $expectedResponse->setCompanyId($companyId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAddress($address); + $expectedResponse->setEmail($email); + $expectedResponse->setFax($fax); + $expectedResponse->setPhone($phone); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setComment($comment); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setThirdPartyCompanyId($thirdPartyCompanyId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->companyName('[NETWORK_CODE]', '[COMPANY]'); + $request = (new GetCompanyRequest())->setName($formattedName); + $response = $gapicClient->getCompany($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CompanyService/GetCompany', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCompanyExceptionTest() + { + $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->companyName('[NETWORK_CODE]', '[COMPANY]'); + $request = (new GetCompanyRequest())->setName($formattedName); + try { + $gapicClient->getCompany($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 listCompaniesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $companiesElement = new Company(); + $companies = [$companiesElement]; + $expectedResponse = new ListCompaniesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCompanies($companies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCompaniesRequest())->setParent($formattedParent); + $response = $gapicClient->listCompanies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCompanies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CompanyService/ListCompanies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCompaniesExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListCompaniesRequest())->setParent($formattedParent); + try { + $gapicClient->listCompanies($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 getCompanyAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $companyId = 847673315; + $displayName = 'displayName1615086568'; + $address = 'address-1147692044'; + $email = 'email96619420'; + $fax = 'fax101149'; + $phone = 'phone106642798'; + $externalId = 'externalId-1153075697'; + $comment = 'comment950398559'; + $primaryContact = 'primaryContact203339491'; + $thirdPartyCompanyId = 2003341038; + $expectedResponse = new Company(); + $expectedResponse->setName($name2); + $expectedResponse->setCompanyId($companyId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAddress($address); + $expectedResponse->setEmail($email); + $expectedResponse->setFax($fax); + $expectedResponse->setPhone($phone); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setComment($comment); + $expectedResponse->setPrimaryContact($primaryContact); + $expectedResponse->setThirdPartyCompanyId($thirdPartyCompanyId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->companyName('[NETWORK_CODE]', '[COMPANY]'); + $request = (new GetCompanyRequest())->setName($formattedName); + $response = $gapicClient->getCompanyAsync($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.ads.admanager.v1.CompanyService/GetCompany', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/CustomFieldServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/CustomFieldServiceClientTest.php new file mode 100644 index 000000000000..b5cf6fa12850 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/CustomFieldServiceClientTest.php @@ -0,0 +1,244 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return CustomFieldServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CustomFieldServiceClient($options); + } + + /** @test */ + public function getCustomFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $customFieldId = 66688114; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new CustomField(); + $expectedResponse->setName($name2); + $expectedResponse->setCustomFieldId($customFieldId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]'); + $request = (new GetCustomFieldRequest())->setName($formattedName); + $response = $gapicClient->getCustomField($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CustomFieldService/GetCustomField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCustomFieldExceptionTest() + { + $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->customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]'); + $request = (new GetCustomFieldRequest())->setName($formattedName); + try { + $gapicClient->getCustomField($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 listCustomFieldsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $customFieldsElement = new CustomField(); + $customFields = [$customFieldsElement]; + $expectedResponse = new ListCustomFieldsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCustomFields($customFields); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCustomFieldsRequest())->setParent($formattedParent); + $response = $gapicClient->listCustomFields($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCustomFields()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CustomFieldService/ListCustomFields', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCustomFieldsExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListCustomFieldsRequest())->setParent($formattedParent); + try { + $gapicClient->listCustomFields($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 getCustomFieldAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $customFieldId = 66688114; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new CustomField(); + $expectedResponse->setName($name2); + $expectedResponse->setCustomFieldId($customFieldId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]'); + $request = (new GetCustomFieldRequest())->setName($formattedName); + $response = $gapicClient->getCustomFieldAsync($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.ads.admanager.v1.CustomFieldService/GetCustomField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/CustomTargetingKeyServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/CustomTargetingKeyServiceClientTest.php new file mode 100644 index 000000000000..819dd2351187 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/CustomTargetingKeyServiceClientTest.php @@ -0,0 +1,247 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return CustomTargetingKeyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CustomTargetingKeyServiceClient($options); + } + + /** @test */ + public function getCustomTargetingKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $customTargetingKeyId = 138683049; + $adTagName = 'adTagName-1355595604'; + $displayName = 'displayName1615086568'; + $expectedResponse = new CustomTargetingKey(); + $expectedResponse->setName($name2); + $expectedResponse->setCustomTargetingKeyId($customTargetingKeyId); + $expectedResponse->setAdTagName($adTagName); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->customTargetingKeyName('[NETWORK_CODE]', '[CUSTOM_TARGETING_KEY]'); + $request = (new GetCustomTargetingKeyRequest())->setName($formattedName); + $response = $gapicClient->getCustomTargetingKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CustomTargetingKeyService/GetCustomTargetingKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCustomTargetingKeyExceptionTest() + { + $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->customTargetingKeyName('[NETWORK_CODE]', '[CUSTOM_TARGETING_KEY]'); + $request = (new GetCustomTargetingKeyRequest())->setName($formattedName); + try { + $gapicClient->getCustomTargetingKey($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 listCustomTargetingKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $customTargetingKeysElement = new CustomTargetingKey(); + $customTargetingKeys = [$customTargetingKeysElement]; + $expectedResponse = new ListCustomTargetingKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCustomTargetingKeys($customTargetingKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCustomTargetingKeysRequest())->setParent($formattedParent); + $response = $gapicClient->listCustomTargetingKeys($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCustomTargetingKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.CustomTargetingKeyService/ListCustomTargetingKeys', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCustomTargetingKeysExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListCustomTargetingKeysRequest())->setParent($formattedParent); + try { + $gapicClient->listCustomTargetingKeys($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 getCustomTargetingKeyAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $customTargetingKeyId = 138683049; + $adTagName = 'adTagName-1355595604'; + $displayName = 'displayName1615086568'; + $expectedResponse = new CustomTargetingKey(); + $expectedResponse->setName($name2); + $expectedResponse->setCustomTargetingKeyId($customTargetingKeyId); + $expectedResponse->setAdTagName($adTagName); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->customTargetingKeyName('[NETWORK_CODE]', '[CUSTOM_TARGETING_KEY]'); + $request = (new GetCustomTargetingKeyRequest())->setName($formattedName); + $response = $gapicClient->getCustomTargetingKeyAsync($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.ads.admanager.v1.CustomTargetingKeyService/GetCustomTargetingKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/CustomTargetingValueServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/CustomTargetingValueServiceClientTest.php new file mode 100644 index 000000000000..7ca476c1512b --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/CustomTargetingValueServiceClientTest.php @@ -0,0 +1,261 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return CustomTargetingValueServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CustomTargetingValueServiceClient($options); + } + + /** @test */ + public function getCustomTargetingValueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $adTagName = 'adTagName-1355595604'; + $displayName = 'displayName1615086568'; + $expectedResponse = new CustomTargetingValue(); + $expectedResponse->setName($name2); + $expectedResponse->setAdTagName($adTagName); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->customTargetingValueName( + '[NETWORK_CODE]', + '[CUSTOM_TARGETING_KEY]', + '[CUSTOM_TARGETING_VALUE]' + ); + $request = (new GetCustomTargetingValueRequest())->setName($formattedName); + $response = $gapicClient->getCustomTargetingValue($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.CustomTargetingValueService/GetCustomTargetingValue', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCustomTargetingValueExceptionTest() + { + $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->customTargetingValueName( + '[NETWORK_CODE]', + '[CUSTOM_TARGETING_KEY]', + '[CUSTOM_TARGETING_VALUE]' + ); + $request = (new GetCustomTargetingValueRequest())->setName($formattedName); + try { + $gapicClient->getCustomTargetingValue($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 listCustomTargetingValuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $customTargetingValuesElement = new CustomTargetingValue(); + $customTargetingValues = [$customTargetingValuesElement]; + $expectedResponse = new ListCustomTargetingValuesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCustomTargetingValues($customTargetingValues); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->customTargetingKeyName('[NETWORK_CODE]', '[CUSTOM_TARGETING_KEY]'); + $request = (new ListCustomTargetingValuesRequest())->setParent($formattedParent); + $response = $gapicClient->listCustomTargetingValues($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCustomTargetingValues()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.CustomTargetingValueService/ListCustomTargetingValues', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCustomTargetingValuesExceptionTest() + { + $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->customTargetingKeyName('[NETWORK_CODE]', '[CUSTOM_TARGETING_KEY]'); + $request = (new ListCustomTargetingValuesRequest())->setParent($formattedParent); + try { + $gapicClient->listCustomTargetingValues($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 getCustomTargetingValueAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $adTagName = 'adTagName-1355595604'; + $displayName = 'displayName1615086568'; + $expectedResponse = new CustomTargetingValue(); + $expectedResponse->setName($name2); + $expectedResponse->setAdTagName($adTagName); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->customTargetingValueName( + '[NETWORK_CODE]', + '[CUSTOM_TARGETING_KEY]', + '[CUSTOM_TARGETING_VALUE]' + ); + $request = (new GetCustomTargetingValueRequest())->setName($formattedName); + $response = $gapicClient->getCustomTargetingValueAsync($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.ads.admanager.v1.CustomTargetingValueService/GetCustomTargetingValue', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/EntitySignalsMappingServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/EntitySignalsMappingServiceClientTest.php new file mode 100644 index 000000000000..0323897f6558 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/EntitySignalsMappingServiceClientTest.php @@ -0,0 +1,561 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return EntitySignalsMappingServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EntitySignalsMappingServiceClient($options); + } + + /** @test */ + public function batchCreateEntitySignalsMappingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateEntitySignalsMappingsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateEntitySignalsMappingsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateEntitySignalsMappings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.EntitySignalsMappingService/BatchCreateEntitySignalsMappings', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateEntitySignalsMappingsExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateEntitySignalsMappingsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchCreateEntitySignalsMappings($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 batchUpdateEntitySignalsMappingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateEntitySignalsMappingsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateEntitySignalsMappingsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchUpdateEntitySignalsMappings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.EntitySignalsMappingService/BatchUpdateEntitySignalsMappings', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateEntitySignalsMappingsExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateEntitySignalsMappingsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchUpdateEntitySignalsMappings($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 createEntitySignalsMappingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $audienceSegmentId = 321086146; + $name = 'name3373707'; + $entitySignalsMappingId = 350688772; + $expectedResponse = new EntitySignalsMapping(); + $expectedResponse->setAudienceSegmentId($audienceSegmentId); + $expectedResponse->setName($name); + $expectedResponse->setEntitySignalsMappingId($entitySignalsMappingId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $entitySignalsMapping = new EntitySignalsMapping(); + $entitySignalsMappingTaxonomyCategoryIds = []; + $entitySignalsMapping->setTaxonomyCategoryIds($entitySignalsMappingTaxonomyCategoryIds); + $request = (new CreateEntitySignalsMappingRequest()) + ->setParent($formattedParent) + ->setEntitySignalsMapping($entitySignalsMapping); + $response = $gapicClient->createEntitySignalsMapping($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.EntitySignalsMappingService/CreateEntitySignalsMapping', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEntitySignalsMapping(); + $this->assertProtobufEquals($entitySignalsMapping, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEntitySignalsMappingExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $entitySignalsMapping = new EntitySignalsMapping(); + $entitySignalsMappingTaxonomyCategoryIds = []; + $entitySignalsMapping->setTaxonomyCategoryIds($entitySignalsMappingTaxonomyCategoryIds); + $request = (new CreateEntitySignalsMappingRequest()) + ->setParent($formattedParent) + ->setEntitySignalsMapping($entitySignalsMapping); + try { + $gapicClient->createEntitySignalsMapping($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 getEntitySignalsMappingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $audienceSegmentId = 321086146; + $name2 = 'name2-1052831874'; + $entitySignalsMappingId = 350688772; + $expectedResponse = new EntitySignalsMapping(); + $expectedResponse->setAudienceSegmentId($audienceSegmentId); + $expectedResponse->setName($name2); + $expectedResponse->setEntitySignalsMappingId($entitySignalsMappingId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->entitySignalsMappingName('[NETWORK_CODE]', '[ENTITY_SIGNALS_MAPPING]'); + $request = (new GetEntitySignalsMappingRequest())->setName($formattedName); + $response = $gapicClient->getEntitySignalsMapping($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.EntitySignalsMappingService/GetEntitySignalsMapping', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEntitySignalsMappingExceptionTest() + { + $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->entitySignalsMappingName('[NETWORK_CODE]', '[ENTITY_SIGNALS_MAPPING]'); + $request = (new GetEntitySignalsMappingRequest())->setName($formattedName); + try { + $gapicClient->getEntitySignalsMapping($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 listEntitySignalsMappingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $entitySignalsMappingsElement = new EntitySignalsMapping(); + $entitySignalsMappings = [$entitySignalsMappingsElement]; + $expectedResponse = new ListEntitySignalsMappingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setEntitySignalsMappings($entitySignalsMappings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListEntitySignalsMappingsRequest())->setParent($formattedParent); + $response = $gapicClient->listEntitySignalsMappings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntitySignalsMappings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.EntitySignalsMappingService/ListEntitySignalsMappings', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntitySignalsMappingsExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListEntitySignalsMappingsRequest())->setParent($formattedParent); + try { + $gapicClient->listEntitySignalsMappings($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 updateEntitySignalsMappingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $audienceSegmentId = 321086146; + $name = 'name3373707'; + $entitySignalsMappingId = 350688772; + $expectedResponse = new EntitySignalsMapping(); + $expectedResponse->setAudienceSegmentId($audienceSegmentId); + $expectedResponse->setName($name); + $expectedResponse->setEntitySignalsMappingId($entitySignalsMappingId); + $transport->addResponse($expectedResponse); + // Mock request + $entitySignalsMapping = new EntitySignalsMapping(); + $entitySignalsMappingTaxonomyCategoryIds = []; + $entitySignalsMapping->setTaxonomyCategoryIds($entitySignalsMappingTaxonomyCategoryIds); + $updateMask = new FieldMask(); + $request = (new UpdateEntitySignalsMappingRequest()) + ->setEntitySignalsMapping($entitySignalsMapping) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateEntitySignalsMapping($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.EntitySignalsMappingService/UpdateEntitySignalsMapping', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getEntitySignalsMapping(); + $this->assertProtobufEquals($entitySignalsMapping, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEntitySignalsMappingExceptionTest() + { + $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 + $entitySignalsMapping = new EntitySignalsMapping(); + $entitySignalsMappingTaxonomyCategoryIds = []; + $entitySignalsMapping->setTaxonomyCategoryIds($entitySignalsMappingTaxonomyCategoryIds); + $updateMask = new FieldMask(); + $request = (new UpdateEntitySignalsMappingRequest()) + ->setEntitySignalsMapping($entitySignalsMapping) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateEntitySignalsMapping($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 batchCreateEntitySignalsMappingsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateEntitySignalsMappingsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateEntitySignalsMappingsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateEntitySignalsMappingsAsync($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.ads.admanager.v1.EntitySignalsMappingService/BatchCreateEntitySignalsMappings', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/NetworkServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/NetworkServiceClientTest.php new file mode 100644 index 000000000000..011962ae5c7a --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/NetworkServiceClientTest.php @@ -0,0 +1,248 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return NetworkServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NetworkServiceClient($options); + } + + /** @test */ + public function getNetworkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $networkCode = 'networkCode-19973794'; + $propertyCode = 'propertyCode-1019877865'; + $timeZone = 'timeZone36848094'; + $currencyCode = 'currencyCode1108728155'; + $effectiveRootAdUnit = 'effectiveRootAdUnit98840923'; + $testNetwork = false; + $networkId = 478232372; + $expectedResponse = new Network(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetworkCode($networkCode); + $expectedResponse->setPropertyCode($propertyCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setCurrencyCode($currencyCode); + $expectedResponse->setEffectiveRootAdUnit($effectiveRootAdUnit); + $expectedResponse->setTestNetwork($testNetwork); + $expectedResponse->setNetworkId($networkId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new GetNetworkRequest())->setName($formattedName); + $response = $gapicClient->getNetwork($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.NetworkService/GetNetwork', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new GetNetworkRequest())->setName($formattedName); + try { + $gapicClient->getNetwork($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 listNetworksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListNetworksResponse(); + $transport->addResponse($expectedResponse); + $request = new ListNetworksRequest(); + $response = $gapicClient->listNetworks($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.NetworkService/ListNetworks', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworksExceptionTest() + { + $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 ListNetworksRequest(); + try { + $gapicClient->listNetworks($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 getNetworkAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $networkCode = 'networkCode-19973794'; + $propertyCode = 'propertyCode-1019877865'; + $timeZone = 'timeZone36848094'; + $currencyCode = 'currencyCode1108728155'; + $effectiveRootAdUnit = 'effectiveRootAdUnit98840923'; + $testNetwork = false; + $networkId = 478232372; + $expectedResponse = new Network(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetworkCode($networkCode); + $expectedResponse->setPropertyCode($propertyCode); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setCurrencyCode($currencyCode); + $expectedResponse->setEffectiveRootAdUnit($effectiveRootAdUnit); + $expectedResponse->setTestNetwork($testNetwork); + $expectedResponse->setNetworkId($networkId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new GetNetworkRequest())->setName($formattedName); + $response = $gapicClient->getNetworkAsync($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.ads.admanager.v1.NetworkService/GetNetwork', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/OrderServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/OrderServiceClientTest.php new file mode 100644 index 000000000000..e79b907632a0 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/OrderServiceClientTest.php @@ -0,0 +1,292 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return OrderServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new OrderServiceClient($options); + } + + /** @test */ + public function getOrderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $orderId = 1234304940; + $displayName = 'displayName1615086568'; + $programmatic = true; + $trafficker = 'trafficker-606937285'; + $advertiser = 'advertiser72080683'; + $agency = 'agency-1419699195'; + $creator = 'creator1028554796'; + $currencyCode = 'currencyCode1108728155'; + $unlimitedEndTime = false; + $externalOrderId = 1332092512; + $archived = true; + $lastModifiedByApp = 'lastModifiedByApp-1580292922'; + $notes = 'notes105008833'; + $poNumber = 'poNumber1281088905'; + $salesperson = 'salesperson-2087326879'; + $expectedResponse = new Order(); + $expectedResponse->setName($name2); + $expectedResponse->setOrderId($orderId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setProgrammatic($programmatic); + $expectedResponse->setTrafficker($trafficker); + $expectedResponse->setAdvertiser($advertiser); + $expectedResponse->setAgency($agency); + $expectedResponse->setCreator($creator); + $expectedResponse->setCurrencyCode($currencyCode); + $expectedResponse->setUnlimitedEndTime($unlimitedEndTime); + $expectedResponse->setExternalOrderId($externalOrderId); + $expectedResponse->setArchived($archived); + $expectedResponse->setLastModifiedByApp($lastModifiedByApp); + $expectedResponse->setNotes($notes); + $expectedResponse->setPoNumber($poNumber); + $expectedResponse->setSalesperson($salesperson); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->orderName('[NETWORK_CODE]', '[ORDER]'); + $request = (new GetOrderRequest())->setName($formattedName); + $response = $gapicClient->getOrder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.OrderService/GetOrder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrderExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]'); + $request = (new GetOrderRequest())->setName($formattedName); + try { + $gapicClient->getOrder($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 listOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $ordersElement = new Order(); + $orders = [$ordersElement]; + $expectedResponse = new ListOrdersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setOrders($orders); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListOrdersRequest())->setParent($formattedParent); + $response = $gapicClient->listOrders($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOrders()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.OrderService/ListOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrdersExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListOrdersRequest())->setParent($formattedParent); + try { + $gapicClient->listOrders($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 getOrderAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $orderId = 1234304940; + $displayName = 'displayName1615086568'; + $programmatic = true; + $trafficker = 'trafficker-606937285'; + $advertiser = 'advertiser72080683'; + $agency = 'agency-1419699195'; + $creator = 'creator1028554796'; + $currencyCode = 'currencyCode1108728155'; + $unlimitedEndTime = false; + $externalOrderId = 1332092512; + $archived = true; + $lastModifiedByApp = 'lastModifiedByApp-1580292922'; + $notes = 'notes105008833'; + $poNumber = 'poNumber1281088905'; + $salesperson = 'salesperson-2087326879'; + $expectedResponse = new Order(); + $expectedResponse->setName($name2); + $expectedResponse->setOrderId($orderId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setProgrammatic($programmatic); + $expectedResponse->setTrafficker($trafficker); + $expectedResponse->setAdvertiser($advertiser); + $expectedResponse->setAgency($agency); + $expectedResponse->setCreator($creator); + $expectedResponse->setCurrencyCode($currencyCode); + $expectedResponse->setUnlimitedEndTime($unlimitedEndTime); + $expectedResponse->setExternalOrderId($externalOrderId); + $expectedResponse->setArchived($archived); + $expectedResponse->setLastModifiedByApp($lastModifiedByApp); + $expectedResponse->setNotes($notes); + $expectedResponse->setPoNumber($poNumber); + $expectedResponse->setSalesperson($salesperson); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->orderName('[NETWORK_CODE]', '[ORDER]'); + $request = (new GetOrderRequest())->setName($formattedName); + $response = $gapicClient->getOrderAsync($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.ads.admanager.v1.OrderService/GetOrder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/PlacementServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/PlacementServiceClientTest.php new file mode 100644 index 000000000000..71dbca739c66 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/PlacementServiceClientTest.php @@ -0,0 +1,248 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return PlacementServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PlacementServiceClient($options); + } + + /** @test */ + public function getPlacementTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $placementId = 1224358069; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $placementCode = 'placementCode-213099769'; + $expectedResponse = new Placement(); + $expectedResponse->setName($name2); + $expectedResponse->setPlacementId($placementId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPlacementCode($placementCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]'); + $request = (new GetPlacementRequest())->setName($formattedName); + $response = $gapicClient->getPlacement($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.PlacementService/GetPlacement', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPlacementExceptionTest() + { + $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->placementName('[NETWORK_CODE]', '[PLACEMENT]'); + $request = (new GetPlacementRequest())->setName($formattedName); + try { + $gapicClient->getPlacement($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 listPlacementsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $placementsElement = new Placement(); + $placements = [$placementsElement]; + $expectedResponse = new ListPlacementsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setPlacements($placements); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListPlacementsRequest())->setParent($formattedParent); + $response = $gapicClient->listPlacements($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPlacements()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.PlacementService/ListPlacements', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPlacementsExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListPlacementsRequest())->setParent($formattedParent); + try { + $gapicClient->listPlacements($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 getPlacementAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $placementId = 1224358069; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $placementCode = 'placementCode-213099769'; + $expectedResponse = new Placement(); + $expectedResponse->setName($name2); + $expectedResponse->setPlacementId($placementId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPlacementCode($placementCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]'); + $request = (new GetPlacementRequest())->setName($formattedName); + $response = $gapicClient->getPlacementAsync($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.ads.admanager.v1.PlacementService/GetPlacement', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/ReportServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/ReportServiceClientTest.php new file mode 100644 index 000000000000..f9078d83360d --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/ReportServiceClientTest.php @@ -0,0 +1,646 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return ReportServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ReportServiceClient($options); + } + + /** @test */ + public function createReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $reportId = 353329146; + $displayName = 'displayName1615086568'; + $locale = 'locale-1097462182'; + $expectedResponse = new Report(); + $expectedResponse->setName($name); + $expectedResponse->setReportId($reportId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLocale($locale); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $report = new Report(); + $reportReportDefinition = new ReportDefinition(); + $reportDefinitionDimensions = []; + $reportReportDefinition->setDimensions($reportDefinitionDimensions); + $reportDefinitionMetrics = []; + $reportReportDefinition->setMetrics($reportDefinitionMetrics); + $reportDefinitionDateRange = new DateRange(); + $reportReportDefinition->setDateRange($reportDefinitionDateRange); + $reportDefinitionReportType = ReportType::REPORT_TYPE_UNSPECIFIED; + $reportReportDefinition->setReportType($reportDefinitionReportType); + $report->setReportDefinition($reportReportDefinition); + $request = (new CreateReportRequest())->setParent($formattedParent)->setReport($report); + $response = $gapicClient->createReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ReportService/CreateReport', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReport(); + $this->assertProtobufEquals($report, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReportExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $report = new Report(); + $reportReportDefinition = new ReportDefinition(); + $reportDefinitionDimensions = []; + $reportReportDefinition->setDimensions($reportDefinitionDimensions); + $reportDefinitionMetrics = []; + $reportReportDefinition->setMetrics($reportDefinitionMetrics); + $reportDefinitionDateRange = new DateRange(); + $reportReportDefinition->setDateRange($reportDefinitionDateRange); + $reportDefinitionReportType = ReportType::REPORT_TYPE_UNSPECIFIED; + $reportReportDefinition->setReportType($reportDefinitionReportType); + $report->setReportDefinition($reportReportDefinition); + $request = (new CreateReportRequest())->setParent($formattedParent)->setReport($report); + try { + $gapicClient->createReport($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 fetchReportResultRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $totalRowCount = 1810281263; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new FetchReportResultRowsResponse(); + $expectedResponse->setTotalRowCount($totalRowCount); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $request = new FetchReportResultRowsRequest(); + $response = $gapicClient->fetchReportResultRows($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ReportService/FetchReportResultRows', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchReportResultRowsExceptionTest() + { + $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 FetchReportResultRowsRequest(); + try { + $gapicClient->fetchReportResultRows($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 getReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $reportId = 353329146; + $displayName = 'displayName1615086568'; + $locale = 'locale-1097462182'; + $expectedResponse = new Report(); + $expectedResponse->setName($name2); + $expectedResponse->setReportId($reportId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLocale($locale); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reportName('[NETWORK_CODE]', '[REPORT]'); + $request = (new GetReportRequest())->setName($formattedName); + $response = $gapicClient->getReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ReportService/GetReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReportExceptionTest() + { + $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->reportName('[NETWORK_CODE]', '[REPORT]'); + $request = (new GetReportRequest())->setName($formattedName); + try { + $gapicClient->getReport($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 listReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $reportsElement = new Report(); + $reports = [$reportsElement]; + $expectedResponse = new ListReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setReports($reports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListReportsRequest())->setParent($formattedParent); + $response = $gapicClient->listReports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ReportService/ListReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReportsExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListReportsRequest())->setParent($formattedParent); + try { + $gapicClient->listReports($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 runReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $reportResult = 'reportResult-778769016'; + $expectedResponse = new RunReportResponse(); + $expectedResponse->setReportResult($reportResult); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->reportName('[NETWORK_CODE]', '[REPORT]'); + $request = (new RunReportRequest())->setName($formattedName); + $response = $gapicClient->runReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ReportService/RunReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function runReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->reportName('[NETWORK_CODE]', '[REPORT]'); + $request = (new RunReportRequest())->setName($formattedName); + $response = $gapicClient->runReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() 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 stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $reportId = 353329146; + $displayName = 'displayName1615086568'; + $locale = 'locale-1097462182'; + $expectedResponse = new Report(); + $expectedResponse->setName($name); + $expectedResponse->setReportId($reportId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLocale($locale); + $transport->addResponse($expectedResponse); + // Mock request + $report = new Report(); + $reportReportDefinition = new ReportDefinition(); + $reportDefinitionDimensions = []; + $reportReportDefinition->setDimensions($reportDefinitionDimensions); + $reportDefinitionMetrics = []; + $reportReportDefinition->setMetrics($reportDefinitionMetrics); + $reportDefinitionDateRange = new DateRange(); + $reportReportDefinition->setDateRange($reportDefinitionDateRange); + $reportDefinitionReportType = ReportType::REPORT_TYPE_UNSPECIFIED; + $reportReportDefinition->setReportType($reportDefinitionReportType); + $report->setReportDefinition($reportReportDefinition); + $updateMask = new FieldMask(); + $request = (new UpdateReportRequest())->setReport($report)->setUpdateMask($updateMask); + $response = $gapicClient->updateReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ReportService/UpdateReport', $actualFuncCall); + $actualValue = $actualRequestObject->getReport(); + $this->assertProtobufEquals($report, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateReportExceptionTest() + { + $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 + $report = new Report(); + $reportReportDefinition = new ReportDefinition(); + $reportDefinitionDimensions = []; + $reportReportDefinition->setDimensions($reportDefinitionDimensions); + $reportDefinitionMetrics = []; + $reportReportDefinition->setMetrics($reportDefinitionMetrics); + $reportDefinitionDateRange = new DateRange(); + $reportReportDefinition->setDateRange($reportDefinitionDateRange); + $reportDefinitionReportType = ReportType::REPORT_TYPE_UNSPECIFIED; + $reportReportDefinition->setReportType($reportDefinitionReportType); + $report->setReportDefinition($reportReportDefinition); + $updateMask = new FieldMask(); + $request = (new UpdateReportRequest())->setReport($report)->setUpdateMask($updateMask); + try { + $gapicClient->updateReport($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 createReportAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $reportId = 353329146; + $displayName = 'displayName1615086568'; + $locale = 'locale-1097462182'; + $expectedResponse = new Report(); + $expectedResponse->setName($name); + $expectedResponse->setReportId($reportId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setLocale($locale); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $report = new Report(); + $reportReportDefinition = new ReportDefinition(); + $reportDefinitionDimensions = []; + $reportReportDefinition->setDimensions($reportDefinitionDimensions); + $reportDefinitionMetrics = []; + $reportReportDefinition->setMetrics($reportDefinitionMetrics); + $reportDefinitionDateRange = new DateRange(); + $reportReportDefinition->setDateRange($reportDefinitionDateRange); + $reportDefinitionReportType = ReportType::REPORT_TYPE_UNSPECIFIED; + $reportReportDefinition->setReportType($reportDefinitionReportType); + $report->setReportDefinition($reportReportDefinition); + $request = (new CreateReportRequest())->setParent($formattedParent)->setReport($report); + $response = $gapicClient->createReportAsync($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.ads.admanager.v1.ReportService/CreateReport', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReport(); + $this->assertProtobufEquals($report, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/RoleServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/RoleServiceClientTest.php new file mode 100644 index 000000000000..d29d5ff785d0 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/RoleServiceClientTest.php @@ -0,0 +1,248 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return RoleServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RoleServiceClient($options); + } + + /** @test */ + public function getRoleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $roleId = 1376884100; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $builtIn = true; + $expectedResponse = new Role(); + $expectedResponse->setName($name2); + $expectedResponse->setRoleId($roleId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setBuiltIn($builtIn); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->roleName('[NETWORK_CODE]', '[ROLE]'); + $request = (new GetRoleRequest())->setName($formattedName); + $response = $gapicClient->getRole($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.RoleService/GetRole', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRoleExceptionTest() + { + $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->roleName('[NETWORK_CODE]', '[ROLE]'); + $request = (new GetRoleRequest())->setName($formattedName); + try { + $gapicClient->getRole($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 listRolesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $rolesElement = new Role(); + $roles = [$rolesElement]; + $expectedResponse = new ListRolesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setRoles($roles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListRolesRequest())->setParent($formattedParent); + $response = $gapicClient->listRoles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRoles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.RoleService/ListRoles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRolesExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListRolesRequest())->setParent($formattedParent); + try { + $gapicClient->listRoles($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 getRoleAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $roleId = 1376884100; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $builtIn = true; + $expectedResponse = new Role(); + $expectedResponse->setName($name2); + $expectedResponse->setRoleId($roleId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setBuiltIn($builtIn); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->roleName('[NETWORK_CODE]', '[ROLE]'); + $request = (new GetRoleRequest())->setName($formattedName); + $response = $gapicClient->getRoleAsync($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.ads.admanager.v1.RoleService/GetRole', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/TaxonomyCategoryServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/TaxonomyCategoryServiceClientTest.php new file mode 100644 index 000000000000..2ca5022cd603 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/TaxonomyCategoryServiceClientTest.php @@ -0,0 +1,248 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return TaxonomyCategoryServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TaxonomyCategoryServiceClient($options); + } + + /** @test */ + public function getTaxonomyCategoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $taxonomyCategoryId = 28298254; + $displayName = 'displayName1615086568'; + $groupingOnly = true; + $parentTaxonomyCategoryId = 1790260093; + $expectedResponse = new TaxonomyCategory(); + $expectedResponse->setName($name2); + $expectedResponse->setTaxonomyCategoryId($taxonomyCategoryId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGroupingOnly($groupingOnly); + $expectedResponse->setParentTaxonomyCategoryId($parentTaxonomyCategoryId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taxonomyCategoryName('[NETWORK_CODE]', '[TAXONOMY_CATEGORY]'); + $request = (new GetTaxonomyCategoryRequest())->setName($formattedName); + $response = $gapicClient->getTaxonomyCategory($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TaxonomyCategoryService/GetTaxonomyCategory', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaxonomyCategoryExceptionTest() + { + $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->taxonomyCategoryName('[NETWORK_CODE]', '[TAXONOMY_CATEGORY]'); + $request = (new GetTaxonomyCategoryRequest())->setName($formattedName); + try { + $gapicClient->getTaxonomyCategory($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 listTaxonomyCategoriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $taxonomyCategoriesElement = new TaxonomyCategory(); + $taxonomyCategories = [$taxonomyCategoriesElement]; + $expectedResponse = new ListTaxonomyCategoriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setTaxonomyCategories($taxonomyCategories); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListTaxonomyCategoriesRequest())->setParent($formattedParent); + $response = $gapicClient->listTaxonomyCategories($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTaxonomyCategories()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TaxonomyCategoryService/ListTaxonomyCategories', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTaxonomyCategoriesExceptionTest() + { + $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->networkName('[NETWORK_CODE]'); + $request = (new ListTaxonomyCategoriesRequest())->setParent($formattedParent); + try { + $gapicClient->listTaxonomyCategories($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 getTaxonomyCategoryAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $taxonomyCategoryId = 28298254; + $displayName = 'displayName1615086568'; + $groupingOnly = true; + $parentTaxonomyCategoryId = 1790260093; + $expectedResponse = new TaxonomyCategory(); + $expectedResponse->setName($name2); + $expectedResponse->setTaxonomyCategoryId($taxonomyCategoryId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGroupingOnly($groupingOnly); + $expectedResponse->setParentTaxonomyCategoryId($parentTaxonomyCategoryId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taxonomyCategoryName('[NETWORK_CODE]', '[TAXONOMY_CATEGORY]'); + $request = (new GetTaxonomyCategoryRequest())->setName($formattedName); + $response = $gapicClient->getTaxonomyCategoryAsync($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.ads.admanager.v1.TaxonomyCategoryService/GetTaxonomyCategory', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/UserServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/UserServiceClientTest.php new file mode 100644 index 000000000000..2410a72d21a7 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/UserServiceClientTest.php @@ -0,0 +1,189 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return UserServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new UserServiceClient($options); + } + + /** @test */ + public function getUserTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $userId = 147132913; + $displayName = 'displayName1615086568'; + $email = 'email96619420'; + $role = 'role3506294'; + $active = true; + $externalId = 'externalId-1153075697'; + $serviceAccount = false; + $ordersUiLocalTimeZone = 'ordersUiLocalTimeZone-1376832007'; + $expectedResponse = new User(); + $expectedResponse->setName($name2); + $expectedResponse->setUserId($userId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEmail($email); + $expectedResponse->setRole($role); + $expectedResponse->setActive($active); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setOrdersUiLocalTimeZone($ordersUiLocalTimeZone); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userName('[NETWORK_CODE]', '[USER]'); + $request = (new GetUserRequest())->setName($formattedName); + $response = $gapicClient->getUser($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.UserService/GetUser', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUserExceptionTest() + { + $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->userName('[NETWORK_CODE]', '[USER]'); + $request = (new GetUserRequest())->setName($formattedName); + try { + $gapicClient->getUser($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 getUserAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $userId = 147132913; + $displayName = 'displayName1615086568'; + $email = 'email96619420'; + $role = 'role3506294'; + $active = true; + $externalId = 'externalId-1153075697'; + $serviceAccount = false; + $ordersUiLocalTimeZone = 'ordersUiLocalTimeZone-1376832007'; + $expectedResponse = new User(); + $expectedResponse->setName($name2); + $expectedResponse->setUserId($userId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEmail($email); + $expectedResponse->setRole($role); + $expectedResponse->setActive($active); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setOrdersUiLocalTimeZone($ordersUiLocalTimeZone); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userName('[NETWORK_CODE]', '[USER]'); + $request = (new GetUserRequest())->setName($formattedName); + $response = $gapicClient->getUserAsync($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.ads.admanager.v1.UserService/GetUser', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/composer.json b/composer.json index 86d464ebec10..53681abbd817 100644 --- a/composer.json +++ b/composer.json @@ -261,7 +261,8 @@ "google/shopping-merchant-products": "0.1.0", "google/shopping-merchant-promotions": "0.1.0", "google/shopping-merchant-quota": "0.1.3", - "google/shopping-merchant-reports": "0.8.1" + "google/shopping-merchant-reports": "0.8.1", + "googleads/ad-manager": "0.0.0" }, "suggest": { "opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.", @@ -269,6 +270,7 @@ }, "autoload": { "psr-4": { + "GPBMetadata\\Google\\Ads\\Admanager\\": "AdsAdManager/metadata", "GPBMetadata\\Google\\Analytics\\Admin\\": "AnalyticsAdmin/metadata", "GPBMetadata\\Google\\Analytics\\Data\\": "AnalyticsData/metadata", "GPBMetadata\\Google\\Api\\": "CommonProtos/metadata/Api", @@ -482,6 +484,7 @@ "GPBMetadata\\Google\\Storagetransfer\\": "StorageTransfer/metadata", "GPBMetadata\\Google\\Type\\": "CommonProtos/metadata/Type", "GPBMetadata\\Grafeas\\": "Grafeas/metadata", + "Google\\Ads\\AdManager\\": "AdsAdManager/src", "Google\\Ads\\MarketingPlatform\\Admin\\": "AdsMarketingPlatformAdmin/src", "Google\\Analytics\\Admin\\": "AnalyticsAdmin/src", "Google\\Analytics\\Data\\": "AnalyticsData/src", From 1b682bdaf7e2d5b90c0bdbd4dd3ccc31428e4b08 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 28 Oct 2024 10:56:47 -0700 Subject: [PATCH 2/2] Update AdsAdManager/README.md --- AdsAdManager/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AdsAdManager/README.md b/AdsAdManager/README.md index db0957696102..1840ee564ef2 100644 --- a/AdsAdManager/README.md +++ b/AdsAdManager/README.md @@ -1,6 +1,6 @@ # Google Ads Ad Manager for PHP -> Idiomatic PHP client for [Google Ads Ad Manager](https://developers.google.com/ad-manager/api/beta). +> Idiomatic PHP client for [Google Ads Ad Manager](https://developers.google.com/ad-manager). [![Latest Stable Version](https://poser.pugx.org/googleads/ad-manager/v/stable)](https://packagist.org/packages/googleads/ad-manager) [![Packagist](https://img.shields.io/packagist/dm/googleads/ad-manager.svg)](https://packagist.org/packages/googleads/ad-manager)