From b710af5c346219d40d3410c73a4b90da5f928d10 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 21 Mar 2024 09:46:21 -0700 Subject: [PATCH] feat: Add Ad Manager REST API PiperOrigin-RevId: 617873969 --- google/ads/admanager/v1/BUILD.bazel | 420 ++++++++++++++++++ .../admanager/v1/ad_partner_declaration.proto | 57 +++ .../ads/admanager/v1/ad_partner_service.proto | 139 ++++++ google/ads/admanager/v1/ad_unit_enums.proto | 42 ++ google/ads/admanager/v1/ad_unit_service.proto | 352 +++++++++++++++ google/ads/admanager/v1/ad_unit_size.proto | 44 ++ google/ads/admanager/v1/admanager_error.proto | 52 +++ .../v1/admanager_grpc_service_config.json | 15 + google/ads/admanager/v1/admanager_v1.yaml | 61 +++ google/ads/admanager/v1/applied_label.proto | 41 ++ .../v1/company_credit_status_enum.proto | 97 ++++ google/ads/admanager/v1/company_service.proto | 210 +++++++++ .../ads/admanager/v1/company_type_enum.proto | 54 +++ .../admanager/v1/computed_status_enum.proto | 73 +++ google/ads/admanager/v1/contact_service.proto | 142 ++++++ .../admanager/v1/creative_placeholder.proto | 62 +++ .../ads/admanager/v1/creative_service.proto | 176 ++++++++ .../ads/admanager/v1/custom_field_enums.proto | 110 +++++ .../admanager/v1/custom_field_service.proto | 185 ++++++++ .../v1/custom_targeting_key_enums.proto | 76 ++++ .../v1/custom_targeting_key_service.proto | 169 +++++++ .../v1/custom_targeting_value_enums.proto | 90 ++++ .../v1/custom_targeting_value_service.proto | 166 +++++++ .../admanager/v1/environment_type_enum.proto | 41 ++ google/ads/admanager/v1/frequency_cap.proto | 71 +++ google/ads/admanager/v1/goal.proto | 162 +++++++ google/ads/admanager/v1/label_service.proto | 136 ++++++ google/ads/admanager/v1/line_item_enums.proto | 241 ++++++++++ .../ads/admanager/v1/line_item_service.proto | 338 ++++++++++++++ google/ads/admanager/v1/network_service.proto | 106 +++++ google/ads/admanager/v1/order_service.proto | 325 ++++++++++++++ google/ads/admanager/v1/placement_enums.proto | 44 ++ .../ads/admanager/v1/placement_service.proto | 174 ++++++++ google/ads/admanager/v1/report_service.proto | 135 ++++++ google/ads/admanager/v1/role_service.proto | 136 ++++++ google/ads/admanager/v1/size.proto | 83 ++++ google/ads/admanager/v1/team_service.proto | 136 ++++++ google/ads/admanager/v1/user_service.proto | 171 +++++++ 38 files changed, 5132 insertions(+) create mode 100644 google/ads/admanager/v1/BUILD.bazel create mode 100644 google/ads/admanager/v1/ad_partner_declaration.proto create mode 100644 google/ads/admanager/v1/ad_partner_service.proto create mode 100644 google/ads/admanager/v1/ad_unit_enums.proto create mode 100644 google/ads/admanager/v1/ad_unit_service.proto create mode 100644 google/ads/admanager/v1/ad_unit_size.proto create mode 100644 google/ads/admanager/v1/admanager_error.proto create mode 100644 google/ads/admanager/v1/admanager_grpc_service_config.json create mode 100644 google/ads/admanager/v1/admanager_v1.yaml create mode 100644 google/ads/admanager/v1/applied_label.proto create mode 100644 google/ads/admanager/v1/company_credit_status_enum.proto create mode 100644 google/ads/admanager/v1/company_service.proto create mode 100644 google/ads/admanager/v1/company_type_enum.proto create mode 100644 google/ads/admanager/v1/computed_status_enum.proto create mode 100644 google/ads/admanager/v1/contact_service.proto create mode 100644 google/ads/admanager/v1/creative_placeholder.proto create mode 100644 google/ads/admanager/v1/creative_service.proto create mode 100644 google/ads/admanager/v1/custom_field_enums.proto create mode 100644 google/ads/admanager/v1/custom_field_service.proto create mode 100644 google/ads/admanager/v1/custom_targeting_key_enums.proto create mode 100644 google/ads/admanager/v1/custom_targeting_key_service.proto create mode 100644 google/ads/admanager/v1/custom_targeting_value_enums.proto create mode 100644 google/ads/admanager/v1/custom_targeting_value_service.proto create mode 100644 google/ads/admanager/v1/environment_type_enum.proto create mode 100644 google/ads/admanager/v1/frequency_cap.proto create mode 100644 google/ads/admanager/v1/goal.proto create mode 100644 google/ads/admanager/v1/label_service.proto create mode 100644 google/ads/admanager/v1/line_item_enums.proto create mode 100644 google/ads/admanager/v1/line_item_service.proto create mode 100644 google/ads/admanager/v1/network_service.proto create mode 100644 google/ads/admanager/v1/order_service.proto create mode 100644 google/ads/admanager/v1/placement_enums.proto create mode 100644 google/ads/admanager/v1/placement_service.proto create mode 100644 google/ads/admanager/v1/report_service.proto create mode 100644 google/ads/admanager/v1/role_service.proto create mode 100644 google/ads/admanager/v1/size.proto create mode 100644 google/ads/admanager/v1/team_service.proto create mode 100644 google/ads/admanager/v1/user_service.proto diff --git a/google/ads/admanager/v1/BUILD.bazel b/google/ads/admanager/v1/BUILD.bazel new file mode 100644 index 0000000000000..6812be2e1b5e5 --- /dev/null +++ b/google/ads/admanager/v1/BUILD.bazel @@ -0,0 +1,420 @@ +# This file was automatically generated by BuildFileGenerator +# https://github.com/googleapis/rules_gapic/tree/master/bazel + +# Most of the manual changes to this file will be overwritten. +# It's **only** allowed to change the following rule attribute values: +# - names of *_gapic_assembly_* rules +# - certain parameters of *_gapic_library rules, including but not limited to: +# * extra_protoc_parameters +# * extra_protoc_file_parameters +# The complete list of preserved parameters can be found in the source code. + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "admanager_proto", + srcs = [ + "ad_partner_declaration.proto", + "ad_partner_service.proto", + "ad_unit_enums.proto", + "ad_unit_service.proto", + "ad_unit_size.proto", + "admanager_error.proto", + "applied_label.proto", + "company_credit_status_enum.proto", + "company_service.proto", + "company_type_enum.proto", + "computed_status_enum.proto", + "contact_service.proto", + "creative_placeholder.proto", + "creative_service.proto", + "custom_field_enums.proto", + "custom_field_service.proto", + "custom_targeting_key_enums.proto", + "custom_targeting_key_service.proto", + "custom_targeting_value_enums.proto", + "custom_targeting_value_service.proto", + "environment_type_enum.proto", + "frequency_cap.proto", + "goal.proto", + "label_service.proto", + "line_item_enums.proto", + "line_item_service.proto", + "network_service.proto", + "order_service.proto", + "placement_enums.proto", + "placement_service.proto", + "report_service.proto", + "role_service.proto", + "size.proto", + "team_service.proto", + "user_service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/type:money_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "admanager_proto_with_info", + deps = [ + ":admanager_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_proto_library", +) + +java_proto_library( + name = "admanager_java_proto", + deps = [":admanager_proto"], +) + +java_gapic_library( + name = "admanager_java_gapic", + srcs = [":admanager_proto_with_info"], + gapic_yaml = None, + grpc_service_config = "admanager_grpc_service_config.json", + rest_numeric_enums = True, + service_yaml = "admanager_v1.yaml", + test_deps = [ + ], + transport = "rest", + deps = [ + ":admanager_java_proto", + "//google/api:api_java_proto", + ], +) + +java_gapic_test( + name = "admanager_java_gapic_test_suite", + test_classes = [ + "com.google.ads.admanager.v1.AdPartnerServiceClientTest", + "com.google.ads.admanager.v1.AdUnitServiceClientTest", + "com.google.ads.admanager.v1.CompanyServiceClientTest", + "com.google.ads.admanager.v1.ContactServiceClientTest", + "com.google.ads.admanager.v1.CreativeServiceClientTest", + "com.google.ads.admanager.v1.CustomFieldServiceClientTest", + "com.google.ads.admanager.v1.CustomTargetingKeyServiceClientTest", + "com.google.ads.admanager.v1.CustomTargetingValueServiceClientTest", + "com.google.ads.admanager.v1.LabelServiceClientTest", + "com.google.ads.admanager.v1.LineItemServiceClientTest", + "com.google.ads.admanager.v1.NetworkServiceClientTest", + "com.google.ads.admanager.v1.OrderServiceClientTest", + "com.google.ads.admanager.v1.PlacementServiceClientTest", + "com.google.ads.admanager.v1.ReportServiceClientTest", + "com.google.ads.admanager.v1.RoleServiceClientTest", + "com.google.ads.admanager.v1.TeamServiceClientTest", + "com.google.ads.admanager.v1.UserServiceClientTest", + ], + runtime_deps = [":admanager_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-ads-admanager-v1-java", + include_samples = True, + transport = "rest", + deps = [ + ":admanager_java_gapic", + ":admanager_java_proto", + ":admanager_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", +) + +go_proto_library( + name = "admanager_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/ads/admanager/v1", + protos = [":admanager_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/type:money_go_proto", + ], +) + +go_gapic_library( + name = "admanager_go_gapic", + srcs = [":admanager_proto_with_info"], + grpc_service_config = "admanager_grpc_service_config.json", + importpath = "google.golang.org/google/ads/admanager/v1;admanager", + metadata = True, + release_level = "beta", + rest_numeric_enums = True, + service_yaml = "admanager_v1.yaml", + transport = "rest", + deps = [ + ":admanager_go_proto", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go_longrunning//:go_default_library", + "@com_google_cloud_go_longrunning//autogen:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + ], +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-ads-admanager-v1-go", + deps = [ + ":admanager_go_gapic", + ":admanager_go_gapic_srcjar-metadata.srcjar", + ":admanager_go_gapic_srcjar-snippets.srcjar", + ":admanager_go_gapic_srcjar-test.srcjar", + ":admanager_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_test", +) + +py_gapic_library( + name = "admanager_py_gapic", + srcs = [":admanager_proto"], + grpc_service_config = "admanager_grpc_service_config.json", + rest_numeric_enums = True, + service_yaml = "admanager_v1.yaml", + transport = "rest", + deps = [ + ], +) + +py_test( + name = "admanager_py_gapic_test", + srcs = [ + "admanager_py_gapic_pytest.py", + "admanager_py_gapic_test.py", + ], + legacy_create_init = False, + deps = [":admanager_py_gapic"], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "ads-admanager-v1-py", + deps = [ + ":admanager_py_gapic", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_proto_library", +) + +php_proto_library( + name = "admanager_php_proto", + deps = [":admanager_proto"], +) + +php_gapic_library( + name = "admanager_php_gapic", + srcs = [":admanager_proto_with_info"], + grpc_service_config = "admanager_grpc_service_config.json", + migration_mode = "NEW_SURFACE_ONLY", + rest_numeric_enums = True, + service_yaml = "admanager_v1.yaml", + transport = "rest", + deps = [ + ":admanager_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-ads-admanager-v1-php", + deps = [ + ":admanager_php_gapic", + ":admanager_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "admanager_nodejs_gapic", + package_name = "@google-ads/admanager", + src = ":admanager_proto_with_info", + extra_protoc_parameters = ["metadata"], + grpc_service_config = "admanager_grpc_service_config.json", + package = "google.ads.admanager.v1", + rest_numeric_enums = True, + service_yaml = "admanager_v1.yaml", + transport = "rest", + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "ads-admanager-v1-nodejs", + deps = [ + ":admanager_nodejs_gapic", + ":admanager_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_cloud_gapic_library", + "ruby_gapic_assembly_pkg", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "admanager_ruby_proto", + deps = [":admanager_proto"], +) + +ruby_grpc_library( + name = "admanager_ruby_grpc", + srcs = [":admanager_proto"], + deps = [":admanager_ruby_proto"], +) + +ruby_cloud_gapic_library( + name = "admanager_ruby_gapic", + srcs = [":admanager_proto_with_info"], + extra_protoc_parameters = ["ruby-cloud-gem-name=google-ads-admanager-v1"], + grpc_service_config = "admanager_grpc_service_config.json", + rest_numeric_enums = True, + service_yaml = "admanager_v1.yaml", + transport = "rest", + deps = [ + ":admanager_ruby_grpc", + ":admanager_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-ads-admanager-v1-ruby", + deps = [ + ":admanager_ruby_gapic", + ":admanager_ruby_grpc", + ":admanager_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "admanager_csharp_proto", + deps = [":admanager_proto"], +) + +csharp_grpc_library( + name = "admanager_csharp_grpc", + srcs = [":admanager_proto"], + deps = [":admanager_csharp_proto"], +) + +csharp_gapic_library( + name = "admanager_csharp_gapic", + srcs = [":admanager_proto_with_info"], + common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", + grpc_service_config = "admanager_grpc_service_config.json", + rest_numeric_enums = True, + service_yaml = "admanager_v1.yaml", + transport = "rest", + deps = [ + ":admanager_csharp_grpc", + ":admanager_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-ads-admanager-v1-csharp", + deps = [ + ":admanager_csharp_gapic", + ":admanager_csharp_grpc", + ":admanager_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "admanager_cc_proto", + deps = [":admanager_proto"], +) + +cc_grpc_library( + name = "admanager_cc_grpc", + srcs = [":admanager_proto"], + grpc_only = True, + deps = [":admanager_cc_proto"], +) diff --git a/google/ads/admanager/v1/ad_partner_declaration.proto b/google/ads/admanager/v1/ad_partner_declaration.proto new file mode 100644 index 0000000000000..e4d4de364d5db --- /dev/null +++ b/google/ads/admanager/v1/ad_partner_declaration.proto @@ -0,0 +1,57 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AdPartnerDeclarationProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Represents a set of declarations about what (if any) ad partners +// are associated with a given creative. This can be set at the network level, +// as a default for all creatives, or overridden for a particular creative. +message AdPartnerDeclaration { + // They type of declaration. + DeclarationTypeEnum.DeclarationType type = 1; + + // The resource names of AdPartners being declared. + // Format: "networks/{network_code}/adPartners/{ad_partner_id}" + repeated string ad_partners = 2 [(google.api.resource_reference) = { + type: "admanager.googleapis.com/AdPartner" + }]; +} + +// Wrapper message for +// [DeclarationTypeEnum][google.ads.admanager.v1.DeclarationTypeEnum]. +message DeclarationTypeEnum { + // The declaration about third party data usage on the associated entity. + enum DeclarationType { + // Default value. This value is unused. + DECLARATION_TYPE_UNSPECIFIED = 0; + + // No ad technology providers to declare. + NONE = 1; + + // There are are ad technology providers to declare on this entity. + DECLARED = 2; + } +} diff --git a/google/ads/admanager/v1/ad_partner_service.proto b/google/ads/admanager/v1/ad_partner_service.proto new file mode 100644 index 0000000000000..119d29b668e82 --- /dev/null +++ b/google/ads/admanager/v1/ad_partner_service.proto @@ -0,0 +1,139 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AdPartnerServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling AdPartner objects. +service AdPartnerService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a AdPartner object. + rpc GetAdPartner(GetAdPartnerRequest) returns (AdPartner) { + option (google.api.http) = { + get: "/v1/{name=networks/*/adPartners/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of AdPartner objects. + rpc ListAdPartners(ListAdPartnersRequest) returns (ListAdPartnersResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/adPartners" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The AdPartner resource. +message AdPartner { + option (google.api.resource) = { + type: "admanager.googleapis.com/AdPartner" + pattern: "networks/{network_code}/adPartners/{ad_partner}" + plural: "adPartners" + singular: "adPartner" + }; + + // Identifier. The resource name of the AdPartner. + // Format: `networks/{network_code}/adPartners/{ad_partner_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Request object for GetAdPartner method. +message GetAdPartnerRequest { + // Required. The resource name of the AdPartner. + // Format: `networks/{network_code}/adPartners/{ad_partner_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AdPartner" + } + ]; +} + +// Request object for ListAdPartners method. +message ListAdPartnersRequest { + // Required. The parent, which owns this collection of AdPartners. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of AdPartners to return. The service may + // return fewer than this value. If unspecified, at most 50 AdPartners will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListAdPartners` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAdPartners` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for ListAdPartnersRequest containing matching AdPartner +// resources. +message ListAdPartnersResponse { + // The AdPartner from the specified network. + repeated AdPartner ad_partners = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of AdPartners. + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/ad_unit_enums.proto b/google/ads/admanager/v1/ad_unit_enums.proto new file mode 100644 index 0000000000000..8435db2bdf2c8 --- /dev/null +++ b/google/ads/admanager/v1/ad_unit_enums.proto @@ -0,0 +1,42 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AdUnitEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [AppliedAdsenseEnabled][google.ads.admanager.v1.AppliedAdsenseEnabledEnum.AppliedAdsenseEnabled] +message AppliedAdsenseEnabledEnum { + // Specifies if serving ads from the AdSense content network is enabled. + enum AppliedAdsenseEnabled { + // No adsense enabled setting applied directly; value will be inherited from + // parent or system default. + APPLIED_ADSENSE_ENABLED_UNSPECIFIED = 0; + + // Serving ads from AdSense content network is enabled. + TRUE = 1; + + // Serving ads from AdSense content network is disabled. + FALSE = 2; + } +} diff --git a/google/ads/admanager/v1/ad_unit_service.proto b/google/ads/admanager/v1/ad_unit_service.proto new file mode 100644 index 0000000000000..0f98cca706410 --- /dev/null +++ b/google/ads/admanager/v1/ad_unit_service.proto @@ -0,0 +1,352 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/ad_unit_enums.proto"; +import "google/ads/admanager/v1/ad_unit_size.proto"; +import "google/ads/admanager/v1/applied_label.proto"; +import "google/ads/admanager/v1/frequency_cap.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AdUnitServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling AdUnit objects. +service AdUnitService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve an AdUnit object. + rpc GetAdUnit(GetAdUnitRequest) returns (AdUnit) { + option (google.api.http) = { + get: "/v1/{name=networks/*/adUnits/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of AdUnit objects. + rpc ListAdUnits(ListAdUnitsRequest) returns (ListAdUnitsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/adUnits" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The AdUnit resource. +message AdUnit { + option (google.api.resource) = { + type: "admanager.googleapis.com/AdUnit" + pattern: "networks/{network_code}/adUnits/{ad_unit}" + plural: "adUnits" + singular: "adUnit" + }; + + // The status of an AdUnit. + enum Status { + // Default value. This value is unused. + STATUS_UNSPECIFIED = 0; + + // The ad unit is active, available for targeting, and serving. + ACTIVE = 1; + + // The ad unit will be visible in the UI, but ignored by serving. + INACTIVE = 2; + + // The ad unit will be hidden in the UI and ignored by serving. + ARCHIVED = 3; + } + + // Identifier. The resource name of the AdUnit. + // Format: `networks/{network_code}/adUnits/{ad_unit_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. AdUnit ID. + int64 ad_unit_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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}" + string parent_ad_unit = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AdUnit" + } + ]; + + // 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. + repeated AdUnitParent parent_path = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the ad unit. Its maximum length is 255 + // characters. + string display_name = 9 [(google.api.field_behavior) = REQUIRED]; + + // 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 off of + // the ad unit ID. + string ad_unit_code = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The status of this ad unit. It defaults to ACTIVE. + Status status = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Non-empty default. The value to use for the HTML link's target attribute. + // This value will be interpreted as TOP if left blank. + TargetWindowEnum.TargetWindow target_window = 12 + [(google.api.field_behavior) = NON_EMPTY_DEFAULT]; + + // Optional. The resource names of Teams directly applied to this AdUnit. + // Format: "networks/{network_code}/teams/{team_id}" + repeated string applied_teams = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } + ]; + + // 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}" + repeated string teams = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } + ]; + + // Optional. A description of the ad unit. The maximum length is 65,535 + // characters. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + bool explicitly_targeted = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. This field is set to true if the ad unit has any children. + bool has_children = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instant this AdUnit was last modified. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The sizes that can be served inside this ad unit. + repeated AdUnitSize ad_unit_sizes = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Determines what set top box video on demand channel this ad unit + // corresponds to in an external set top box ad campaign system. + string external_set_top_box_channel_id = 17 + [(google.api.field_behavior) = OPTIONAL]; + + // 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. + google.protobuf.Duration refresh_delay = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ID of the CTV application that this ad unit is within. + int64 ctv_application_id = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of labels applied directly to this ad unit. + repeated AppliedLabel applied_labels = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // 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. + repeated AppliedLabel effective_applied_labels = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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. + repeated LabelFrequencyCap applied_label_frequency_caps = 23 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The label frequency caps applied directly to the ad unit as + // well as those inherited from parent ad units. + repeated LabelFrequencyCap effective_label_frequency_caps = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The smart size mode for this ad unit. This attribute is optional + // and defaults to SmartSizeMode.NONE for fixed sizes. + SmartSizeModeEnum.SmartSizeMode smart_size_mode = 25 + [(google.api.field_behavior) = OPTIONAL]; + + // 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. + AppliedAdsenseEnabledEnum.AppliedAdsenseEnabled applied_adsense_enabled = 26 + [(google.api.field_behavior) = OPTIONAL]; + + // 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. + bool effective_adsense_enabled = 27 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The summary of a parent AdUnit. +message AdUnitParent { + // Output only. The parent of the current AdUnit + // Format: `networks/{network_code}/adUnits/{ad_unit_id}` + string parent_ad_unit = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AdUnit" + } + ]; + + // Output only. The display name of the parent AdUnit. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A string used to uniquely identify the ad unit for the + // purposes of serving the ad. + string ad_unit_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Wrapper message for +// [TargetWindow][google.ads.admanager.v1.TargetWindowEnum.TargetWindow]. +message TargetWindowEnum { + // Corresponds to an HTML link's target attribute. + // See http://www.w3.org/TR/html401/present/frames.html#adef-target + enum TargetWindow { + // Default value. This value is unused. + TARGET_WINDOW_UNSPECIFIED = 0; + + // Specifies that the link should open in the full body of the page. + TOP = 1; + + // Specifies that the link should open in a new window. + BLANK = 2; + } +} + +// Frequency cap using a label. +message LabelFrequencyCap { + // The label to used for frequency capping. + // Format: "networks/{network_code}/labels/{label_id}" + string label = 1; + + // The frequency cap. + FrequencyCap frequency_cap = 2; +} + +// Wrapper message for +// [SmartSizeMode][google.ads.admanager.v1.SmartSizeModeEnum.SmartSizeMode]. +message SmartSizeModeEnum { + // The smart size mode for this ad unit. This attribute is optional and + // defaults to SmartSizeMode.NONE for fixed sizes. + enum SmartSizeMode { + // Default value. This value is unused. + SMART_SIZE_MODE_UNSPECIFIED = 0; + + // Fixed size mode (default). + NONE = 1; + + // The height is fixed for the request, the width is a range. + SMART_BANNER = 2; + + // Height and width are ranges. + DYNAMIC_SIZE = 3; + } +} + +// Request object for GetAdUnit method. +message GetAdUnitRequest { + // Required. The resource name of the AdUnit. + // Format: `networks/{network_code}/adUnits/{ad_unit_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AdUnit" + } + ]; +} + +// Request object for ListAdUnits method. +message ListAdUnitsRequest { + // Required. The parent, which owns this collection of AdUnits. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // 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. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for ListAdUnitsRequest containing matching AdUnit resources. +message ListAdUnitsResponse { + // The AdUnit from the specified network. + repeated AdUnit ad_units = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/ad_unit_size.proto b/google/ads/admanager/v1/ad_unit_size.proto new file mode 100644 index 0000000000000..d56db53a00c16 --- /dev/null +++ b/google/ads/admanager/v1/ad_unit_size.proto @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/environment_type_enum.proto"; +import "google/ads/admanager/v1/size.proto"; +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AdUnitSizeProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Represents the size, environment, and companions of an ad in an ad unit. +message AdUnitSize { + // Required. The Size of the AdUnit. + Size size = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The EnvironmentType of the AdUnit + EnvironmentTypeEnum.EnvironmentType environment_type = 2 + [(google.api.field_behavior) = REQUIRED]; + + // The companions for this ad unit size. Companions are only valid if the + // environment is + // [VIDEO_PLAYER][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType]. + repeated Size companions = 3; +} diff --git a/google/ads/admanager/v1/admanager_error.proto b/google/ads/admanager/v1/admanager_error.proto new file mode 100644 index 0000000000000..29363e183f9ac --- /dev/null +++ b/google/ads/admanager/v1/admanager_error.proto @@ -0,0 +1,52 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/protobuf/any.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AdManagerErrorProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// / AdManagerError contains all the information required for processing a +// / particular error thrown by the AdManager API. +// / +// / At least one AdManagerError should be included in all error messages sent +// to / the client. +message AdManagerError { + // The unique identifying string for this error. + string error_code = 1; + + // A publisher appropriate explanation of this error. + string message = 2; + + // The field path that triggered this error. + string field_path = 3; + + // The value that triggered this error. + string trigger = 4; + + // The stack trace that accompanies this error. + string stack_trace = 5; + + // A list of messages that carry any additional error details. + repeated google.protobuf.Any details = 6; +} diff --git a/google/ads/admanager/v1/admanager_grpc_service_config.json b/google/ads/admanager/v1/admanager_grpc_service_config.json new file mode 100644 index 0000000000000..9ffce904e5027 --- /dev/null +++ b/google/ads/admanager/v1/admanager_grpc_service_config.json @@ -0,0 +1,15 @@ +{ + "methodConfig": [{ + "name": [ + { "service": "google.ads.admanager.v1.OrderService" } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + }] +} diff --git a/google/ads/admanager/v1/admanager_v1.yaml b/google/ads/admanager/v1/admanager_v1.yaml new file mode 100644 index 0000000000000..46c0404b6a571 --- /dev/null +++ b/google/ads/admanager/v1/admanager_v1.yaml @@ -0,0 +1,61 @@ +type: google.api.Service +config_version: 3 +name: admanager.googleapis.com +title: Google Ad Manager API + +apis: +- name: google.ads.admanager.v1.AdPartnerService +- name: google.ads.admanager.v1.AdUnitService +- name: google.ads.admanager.v1.CompanyService +- name: google.ads.admanager.v1.ContactService +- name: google.ads.admanager.v1.CreativeService +- name: google.ads.admanager.v1.CustomFieldService +- name: google.ads.admanager.v1.CustomTargetingKeyService +- name: google.ads.admanager.v1.CustomTargetingValueService +- name: google.ads.admanager.v1.LabelService +- name: google.ads.admanager.v1.LineItemService +- name: google.ads.admanager.v1.NetworkService +- name: google.ads.admanager.v1.OrderService +- name: google.ads.admanager.v1.PlacementService +- name: google.ads.admanager.v1.ReportService +- name: google.ads.admanager.v1.RoleService +- name: google.ads.admanager.v1.TeamService +- name: google.ads.admanager.v1.UserService +- name: google.longrunning.Operations + +types: +- name: google.ads.admanager.v1.ExportSavedReportMetadata +- name: google.ads.admanager.v1.ExportSavedReportResponse +- name: google.ads.admanager.v1.Report + +documentation: + summary: 'Manage your Ad Manager inventory, run reports and more.' + overview: |- + The Ad Manager API enables an app to integrate with Google Ad Manager. + You can read Ad Manager data and run reports using the API. + +http: + rules: + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=networks/*/operations/reports/exports/*}' + additional_bindings: + - get: '/v1/{name=networks/*/operations/reports/runs/*}' + +publishing: + new_issue_uri: https://issuetracker.google.com/issues/new?component=1265187&template=1787490 + documentation_uri: https://developers.google.com/ad-manager/api/beta + api_short_name: admanager + github_label: 'api: admanager' + doc_tag_prefix: admanager + organization: ADS + library_settings: + - version: google.ads.admanager.v1 + launch_stage: BETA + java_settings: + common: + destinations: + - PACKAGE_MANAGER + python_settings: + common: + destinations: + - PACKAGE_MANAGER diff --git a/google/ads/admanager/v1/applied_label.proto b/google/ads/admanager/v1/applied_label.proto new file mode 100644 index 0000000000000..d0127e54aa1d7 --- /dev/null +++ b/google/ads/admanager/v1/applied_label.proto @@ -0,0 +1,41 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "AppliedLabelProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Represents a Label that can be applied to an entity. +message AppliedLabel { + // Required. The label to be applied. + // Format: "networks/{network_code}/labels/{label_id}" + string label = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Label" } + ]; + + // Specifies whether or not to negate the effects of the label. + bool negated = 2; +} diff --git a/google/ads/admanager/v1/company_credit_status_enum.proto b/google/ads/admanager/v1/company_credit_status_enum.proto new file mode 100644 index 0000000000000..3b194fd456cca --- /dev/null +++ b/google/ads/admanager/v1/company_credit_status_enum.proto @@ -0,0 +1,97 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CompanyCreditStatusEnumProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [CompanyCreditStatus][google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus] +message CompanyCreditStatusEnum { + // The credit status of a company. + // + // Credit statuses specify the credit-worthiness of a company and affect the + // ad serving of campaigns belonging to the company. + // + // In basic settings, only the + // [ACTIVE][google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus.ACTIVE] + // and + // [INACTIVE][google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus.INACTIVE] + // credit statuses are applicable. In advance settings, all credit statuses + // are applicable. + enum CompanyCreditStatus { + // No value specified + 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. + 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. + 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. + 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. + 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. + BLOCKED = 5; + } +} diff --git a/google/ads/admanager/v1/company_service.proto b/google/ads/admanager/v1/company_service.proto new file mode 100644 index 0000000000000..aedb5eeee655c --- /dev/null +++ b/google/ads/admanager/v1/company_service.proto @@ -0,0 +1,210 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/applied_label.proto"; +import "google/ads/admanager/v1/company_credit_status_enum.proto"; +import "google/ads/admanager/v1/company_type_enum.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CompanyServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling `Company` objects. +service CompanyService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a `Company` object. + rpc GetCompany(GetCompanyRequest) returns (Company) { + option (google.api.http) = { + get: "/v1/{name=networks/*/companies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `Company` objects. + rpc ListCompanies(ListCompaniesRequest) returns (ListCompaniesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/companies" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The `Company` resource. +message Company { + option (google.api.resource) = { + type: "admanager.googleapis.com/Company" + pattern: "networks/{network_code}/companies/{company}" + plural: "companies" + singular: "company" + }; + + // Identifier. The resource name of the `Company`. + // Format: `networks/{network_code}/companies/{company_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. `Company` ID. + int64 company_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the `Company`. + // + // This value has a maximum length of 127 characters. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of the `Company`. + CompanyTypeEnum.CompanyType type = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The address for the `Company`. + // + // This value has a maximum length of 1024 characters. + string address = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The email for the `Company`. + // + // This value has a maximum length of 128 characters. + string email = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The fax number for the `Company`. + // + // This value has a maximum length of 63 characters. + string fax = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The phone number for the `Company`. + // + // This value has a maximum length of 63 characters. + string phone = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The external ID for the `Company`. + // + // This value has a maximum length of 255 characters. + string external_id = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Comments about the `Company`. + // + // This value has a maximum length of 1024 characters. + string comment = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The credit status of this company. + // + // This attribute defaults to `ACTIVE` if basic settings are enabled and + // `ON_HOLD` if advance settings are enabled. + CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels that are directly applied to this company. + repeated AppliedLabel applied_labels = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource names of primary Contact of this company. + // Format: "networks/{network_code}/contacts/{contact_id}" + optional string primary_contact = 13 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Contact" + } + ]; + + // Optional. The resource names of Teams that are directly associated with + // this company. Format: "networks/{network_code}/teams/{team_id}" + repeated string applied_teams = 14 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } + ]; +} + +// Request object for `GetCompany` method. +message GetCompanyRequest { + // Required. The resource name of the Company. + // Format: `networks/{network_code}/companies/{company_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Company" + } + ]; +} + +// Request object for `ListCompanies` method. +message ListCompaniesRequest { + // Required. The parent, which owns this collection of Companies. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // 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. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListCompaniesRequest` containing matching `Company` +// resources. +message ListCompaniesResponse { + // The `Company` from the specified network. + repeated Company companies = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of `Companies`. + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/company_type_enum.proto b/google/ads/admanager/v1/company_type_enum.proto new file mode 100644 index 0000000000000..3f621cffd89f7 --- /dev/null +++ b/google/ads/admanager/v1/company_type_enum.proto @@ -0,0 +1,54 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CompanyTypeEnumProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [CompanyType][google.ads.admanager.v1.CompanyTypeEnum.CompanyType] +message CompanyTypeEnum { + // The type of a company. + enum CompanyType { + // No value specified + COMPANY_TYPE_UNSPECIFIED = 0; + + // A business entity that purchases ad inventory. + ADVERTISER = 1; + + // A company representing the publisher's own advertiser for house ads. + HOUSE_ADVERTISER = 2; + + // An organization that manages ad accounts and offers services, such as ad + // creation, placement, and management to advertisers. + AGENCY = 3; + + // A company representing the publisher's own agency. + HOUSE_AGENCY = 4; + + // A company representing multiple advertisers and agencies. + AD_NETWORK = 5; + + // A third-party that measures creative viewability. + VIEWABILITY_PROVIDER = 6; + } +} diff --git a/google/ads/admanager/v1/computed_status_enum.proto b/google/ads/admanager/v1/computed_status_enum.proto new file mode 100644 index 0000000000000..ad320edb2dfa5 --- /dev/null +++ b/google/ads/admanager/v1/computed_status_enum.proto @@ -0,0 +1,73 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ComputedStatusEnumProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [ComputedStatus][google.ads.admanager.v1.ComputedStatusEnum.ComputedStatus]. +message ComputedStatusEnum { + // Describes the computed LineItem status that is derived from the + // current state of the LineItem. + enum ComputedStatus { + // No value specified. + COMPUTED_STATUS_UNSPECIFIED = 0; + + // The LineItem has past its link LineItem#endDateTime with an auto + // extension, but hasn't met its goal. + DELIVERY_EXTENDED = 1; + + // The LineItem has begun serving. + DELIVERING = 2; + + // The LineItem has been activated and is ready to serve. + READY = 3; + + // The LineItem has been paused from serving. + PAUSED = 4; + + // The LineItem is inactive. It is either caused by missing creatives or + // the network disabling auto-activation. + INACTIVE = 5; + + // The LineItem has been paused and its reserved inventory has been + // released. The LineItem will not serve. + PAUSED_INVENTORY_RELEASED = 6; + + // The LineItem has been submitted for approval. + PENDING_APPROVAL = 7; + + // The LineItem has completed its run. + COMPLETED = 8; + + // The LineItem has been disapproved and is not eligible to serve. + DISAPPROVED = 9; + + // The LineItem is still being drafted. + DRAFT = 10; + + // The LineItem has been canceled and is no longer eligible to serve. + // This is a legacy status imported from Google Ad Manager orders. + CANCELED = 11; + } +} diff --git a/google/ads/admanager/v1/contact_service.proto b/google/ads/admanager/v1/contact_service.proto new file mode 100644 index 0000000000000..0d60b5f4fae80 --- /dev/null +++ b/google/ads/admanager/v1/contact_service.proto @@ -0,0 +1,142 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ContactServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling Contact objects. +service ContactService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a Contact object. + rpc GetContact(GetContactRequest) returns (Contact) { + option (google.api.http) = { + get: "/v1/{name=networks/*/contacts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of Contact objects. + rpc ListContacts(ListContactsRequest) returns (ListContactsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/contacts" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The Contact resource. +message Contact { + option (google.api.resource) = { + type: "admanager.googleapis.com/Contact" + pattern: "networks/{network_code}/contacts/{contact}" + plural: "contacts" + singular: "contact" + }; + + // Identifier. The resource name of the Contact. + // Format: `networks/{network_code}/contacts/{contact_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. `Contact` ID. + int64 contact_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request object for GetContact method. +message GetContactRequest { + // Required. The resource name of the Contact. + // Format: `networks/{network_code}/contacts/{contact_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Contact" + } + ]; +} + +// Request object for ListContacts method. +message ListContactsRequest { + // Required. The parent, which owns this collection of Contacts. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of Contacts to return. The service may return + // fewer than this value. If unspecified, at most 50 contacts will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListContacts` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListContacts` must match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for ListContactsRequest containing matching Contact +// resources. +message ListContactsResponse { + // The Contact from the specified network. + repeated Contact contacts = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of Contacts. + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/creative_placeholder.proto b/google/ads/admanager/v1/creative_placeholder.proto new file mode 100644 index 0000000000000..871806cb70148 --- /dev/null +++ b/google/ads/admanager/v1/creative_placeholder.proto @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/applied_label.proto"; +import "google/ads/admanager/v1/size.proto"; +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CreativePlaceholderProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Describes a slot that a creative is expected to fill. This is used in +// forecasting and to validate that the correct creatives are associated with +// the line item. +message CreativePlaceholder { + // Required. The size that the creative is expected to have. + Size size = 1 [(google.api.field_behavior) = REQUIRED]; + + // The companions that the creative is expected to have. This attribute can + // only be set if the line item it belongs to has an + // [EnvironmentType][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType] + // of VIDEO_PLAYER or [roadblocking_type][LineItem.roadblocking_type] of + // CREATIVE_SET. + repeated Size companion_sizes = 2; + + // Expected number of creatives that will be uploaded corresponding to this + // creative placeholder. This estimate is used to improve the accuracy of + // forecasting; for example, if label frequency capping limits the number of + // times a creative may be served. + int32 expected_creative_count = 3; + + // Set of labels applied directly to this CreativePlaceholder. + repeated AppliedLabel applied_labels = 4; + + // Indicates if the expected creative of this placeholder has an AMP only + // variant. This is used to improve the accuracy of forecasting and has no + // effect on serving. + bool amp_only = 5; + + // The display name of the creative targeting that this CreativePlaceholder + // represents. + string creative_targeting_display_name = 6; +} diff --git a/google/ads/admanager/v1/creative_service.proto b/google/ads/admanager/v1/creative_service.proto new file mode 100644 index 0000000000000..9f5bd81192408 --- /dev/null +++ b/google/ads/admanager/v1/creative_service.proto @@ -0,0 +1,176 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/ad_partner_declaration.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CreativeServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling Creative objects. +service CreativeService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a Creative object. + rpc GetCreative(GetCreativeRequest) returns (Creative) { + option (google.api.http) = { + get: "/v1/{name=networks/*/creatives/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of Creative objects. + rpc ListCreatives(ListCreativesRequest) returns (ListCreativesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/creatives" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The Creative resource. +message Creative { + option (google.api.resource) = { + type: "admanager.googleapis.com/Creative" + pattern: "networks/{network_code}/creatives/{creative}" + plural: "creatives" + singular: "creative" + }; + + // Identifier. The resource name of the Creative. + // Format: `networks/{network_code}/creatives/{creative_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. `Creative` ID. + int64 creative_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Display name of the `Creative`. This attribute has a maximum + // length of 255 characters. + string display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource name of the Company, which is of type + // Company.Type.ADVERTISER, to which this Creative belongs. Format: + // "networks/{network_code}/companies/{company_id}" + string advertiser = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Company" + } + ]; + + // Output only. The instant this Creative was last modified. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URL of the creative for previewing the media. + string preview_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. String representations of creative size. + // This field is temporarily available and will be deprecated when + // `Creative.size` becomes available. + string size_label = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The Ad Partners associated with this creative. + // This is distinct from any associated companies that Google may detect + // programmatically. + AdPartnerDeclaration ad_partner_declaration = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request object for GetCreative method. +message GetCreativeRequest { + // Required. The resource name of the Creative. + // Format: `networks/{network_code}/creatives/{creative_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Creative" + } + ]; +} + +// Request object for ListCreatives method. +message ListCreativesRequest { + // Required. The parent, which owns this collection of Creatives. + // Format: networks/{network_code} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of Creatives to return. The service may return + // fewer than this value. If unspecified, at most 50 creatives will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListCreatives` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCreatives` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for ListCreativesRequest containing matching Creative +// resources. +message ListCreativesResponse { + // The Creative from the specified network. + repeated Creative creatives = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of Creatives. + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/custom_field_enums.proto b/google/ads/admanager/v1/custom_field_enums.proto new file mode 100644 index 0000000000000..7e44aa5b5566e --- /dev/null +++ b/google/ads/admanager/v1/custom_field_enums.proto @@ -0,0 +1,110 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CustomFieldEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [CustomFieldDataType][google.ads.admanager.v1.CustomFieldDataTypeEnum.CustomFieldDataType] +message CustomFieldDataTypeEnum { + // The data type for a CustomField. + enum CustomFieldDataType { + // No value specified + CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED = 0; + + // A string field + // + // The max length is 255 characters. + STRING = 1; + + // A number field. + NUMBER = 2; + + // A "Yes" or "No" toggle field. + TOGGLE = 3; + + // A drop-down field. + DROP_DOWN = 4; + } +} + +// Wrapper message for +// [CustomFieldEntityType][google.ads.admanager.v1.CustomFieldEntityTypeEnum.CustomFieldEntityType] +message CustomFieldEntityTypeEnum { + // The types of entities that a CustomField can be applied to. + enum CustomFieldEntityType { + // No value specified + CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED = 0; + + // The CustomField is applied to LineItems. + LINE_ITEM = 1; + + // The CustomField is applied to Orders. + ORDER = 2; + + // The CustomField is applied to Creatives. + CREATIVE = 3; + + // The CustomField is applied to Proposals. + PROPOSAL = 4; + + // The CustomField is applied to ProposalLineItems. + PROPOSAL_LINE_ITEM = 5; + } +} + +// Wrapper message for +// [CustomFieldStatus][google.ads.admanager.v1.CustomFieldStatusEnum.CustomFieldStatus] +message CustomFieldStatusEnum { + // The status of the CustomField. + enum CustomFieldStatus { + // No value specified + CUSTOM_FIELD_STATUS_UNSPECIFIED = 0; + + // The CustomField is active. + ACTIVE = 1; + + // The CustomField is inactive. + INACTIVE = 2; + } +} + +// Wrapper message for +// [CustomFieldVisibility][google.ads.admanager.v1.CustomFieldVisibilityEnum.CustomFieldVisibility] +message CustomFieldVisibilityEnum { + // The visibility level of a CustomField. + enum CustomFieldVisibility { + // No value specified + CUSTOM_FIELD_VISIBILITY_UNSPECIFIED = 0; + + // The CustomField is not visible in the UI and only visible through the + // API. + HIDDEN = 1; + + // The CustomField is visible in the UI and only editable through the API. + READ_ONLY = 2; + + // The CustomField is visible and editable in both the API and UI. + EDITABLE = 3; + } +} diff --git a/google/ads/admanager/v1/custom_field_service.proto b/google/ads/admanager/v1/custom_field_service.proto new file mode 100644 index 0000000000000..964487e526ba7 --- /dev/null +++ b/google/ads/admanager/v1/custom_field_service.proto @@ -0,0 +1,185 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/custom_field_enums.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CustomFieldServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling `CustomField` objects. +service CustomFieldService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a `CustomField` object. + rpc GetCustomField(GetCustomFieldRequest) returns (CustomField) { + option (google.api.http) = { + get: "/v1/{name=networks/*/customFields/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `CustomField` objects. + rpc ListCustomFields(ListCustomFieldsRequest) + returns (ListCustomFieldsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/customFields" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The `CustomField` resource. +message CustomField { + option (google.api.resource) = { + type: "admanager.googleapis.com/CustomField" + pattern: "networks/{network_code}/customFields/{custom_field}" + plural: "customFields" + singular: "customField" + }; + + // Identifier. The resource name of the `CustomField`. + // Format: `networks/{network_code}/customFields/{custom_field_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. `CustomField` ID. + int64 custom_field_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the `CustomField`. + // + // This value has a maximum length of 127 characters. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The description of the `CustomField`. + // + // This value has a maximum length of 511 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The status of the `CustomField`. + CustomFieldStatusEnum.CustomFieldStatus status = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The type of entity the `CustomField` can be applied to. + CustomFieldEntityTypeEnum.CustomFieldEntityType entity_type = 7 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The data type of the `CustomField`. + CustomFieldDataTypeEnum.CustomFieldDataType data_type = 8 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The visibility of the `CustomField`. + CustomFieldVisibilityEnum.CustomFieldVisibility visibility = 9 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The drop-down options for the `CustomField`. + // + // Only applicable for `CustomField` with the drop-down data type. + repeated CustomFieldOption options = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An option for a drop-down `CustomField`. +message CustomFieldOption { + // Output only. `CustomFieldOption` ID. + int64 custom_field_option_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the `CustomFieldOption`. + // + // This value has a maximum length of 127 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `GetCustomField` method. +message GetCustomFieldRequest { + // Required. The resource name of the CustomField. + // Format: `networks/{network_code}/customFields/{custom_field_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CustomField" + } + ]; +} + +// Request object for `ListCustomFields` method. +message ListCustomFieldsRequest { + // Required. The parent, which owns this collection of CustomFields. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // 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. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at https://google.aip.dev/160 + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at https://google.aip.dev/132#ordering + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListCustomFieldsRequest` containing matching +// `CustomField` objects. +message ListCustomFieldsResponse { + // The `CustomField` objects from the specified network. + repeated CustomField custom_fields = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // 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 + // [System Parameters](https://cloud.google.com/apis/docs/system-parameters). + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/custom_targeting_key_enums.proto b/google/ads/admanager/v1/custom_targeting_key_enums.proto new file mode 100644 index 0000000000000..a33be039ebfd3 --- /dev/null +++ b/google/ads/admanager/v1/custom_targeting_key_enums.proto @@ -0,0 +1,76 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CustomTargetingKeyEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [CustomTargetingKeyStatus][google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus] +message CustomTargetingKeyStatusEnum { + // Status of the custom targeting key. + enum CustomTargetingKeyStatus { + // Not specified value. + CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED = 0; + + // Custom targeting key is active. + ACTIVE = 1; + + // Custom targeting key is inactive. + INACTIVE = 2; + } +} + +// Wrapper message for +// [CustomTargetingKeyType][google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType] +message CustomTargetingKeyTypeEnum { + // Type of the custom targeting key. + enum CustomTargetingKeyType { + // Not specified value. + CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED = 0; + + // Key with a fixed set of values. + PREDEFINED = 1; + + // Key without a fixed set of values + FREEFORM = 2; + } +} + +// Wrapper message for +// [CustomTargetingKeyReportableType][google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType] +message CustomTargetingKeyReportableTypeEnum { + // Reportable type of the custom targeting key. + enum CustomTargetingKeyReportableType { + // Not specified value. + CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED = 0; + + // Not available for reporting in the Ad Manager query tool. + OFF = 1; + + // Available for reporting in the Ad Manager query tool. + ON = 2; + + // Custom dimension available for reporting in the AdManager query tool. + CUSTOM_DIMENSION = 3; + } +} diff --git a/google/ads/admanager/v1/custom_targeting_key_service.proto b/google/ads/admanager/v1/custom_targeting_key_service.proto new file mode 100644 index 0000000000000..59e83ac689515 --- /dev/null +++ b/google/ads/admanager/v1/custom_targeting_key_service.proto @@ -0,0 +1,169 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/custom_targeting_key_enums.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CustomTargetingKeyServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling `CustomTargetingKey` objects. +service CustomTargetingKeyService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a `CustomTargetingKey` object. + rpc GetCustomTargetingKey(GetCustomTargetingKeyRequest) + returns (CustomTargetingKey) { + option (google.api.http) = { + get: "/v1/{name=networks/*/customTargetingKeys/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `CustomTargetingKey` objects. + rpc ListCustomTargetingKeys(ListCustomTargetingKeysRequest) + returns (ListCustomTargetingKeysResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/customTargetingKeys" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The `CustomTargetingKey` resource. +message CustomTargetingKey { + option (google.api.resource) = { + type: "admanager.googleapis.com/CustomTargetingKey" + pattern: "networks/{network_code}/customTargetingKeys/{custom_targeting_key}" + plural: "customTargetingKeys" + singular: "customTargetingKey" + }; + + // Identifier. The resource name of the `CustomTargetingKey`. + // Format: + // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. `CustomTargetingKey` ID. + int64 custom_targeting_key_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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. + string ad_tag_name = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. Descriptive name for the `CustomTargetingKey`. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Indicates whether users will select from predefined values or + // create new targeting values, while specifying targeting criteria for a line + // item. + CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Status of the `CustomTargetingKey`. + CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Reportable state of the `CustomTargetingKey`. + CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType + reportable_type = 7 [(google.api.field_behavior) = REQUIRED]; +} + +// Request object for `GetCustomTargetingKey` method. +message GetCustomTargetingKeyRequest { + // Required. The resource name of the CustomTargetingKey. + // Format: + // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CustomTargetingKey" + } + ]; +} + +// Request object for `ListCustomTargetingKeys` method. +message ListCustomTargetingKeysRequest { + // Required. The parent, which owns this collection of CustomTargetingKeys. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // 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. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListCustomTargetingKeysRequest` containing matching +// `CustomTargetingKey` objects. +message ListCustomTargetingKeysResponse { + // The `CustomTargetingKey` objects from the specified network. + repeated CustomTargetingKey custom_targeting_keys = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/custom_targeting_value_enums.proto b/google/ads/admanager/v1/custom_targeting_value_enums.proto new file mode 100644 index 0000000000000..609e65dedf028 --- /dev/null +++ b/google/ads/admanager/v1/custom_targeting_value_enums.proto @@ -0,0 +1,90 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CustomTargetingValueEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [CustomTargetingValueStatus][google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus] +message CustomTargetingValueStatusEnum { + // Status of the custom targeting value. + enum CustomTargetingValueStatus { + // Not specified value. + CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED = 0; + + // Custom targeting value is active. + ACTIVE = 1; + + // Custom targeting value is inactive. + INACTIVE = 2; + } +} + +// Wrapper message for +// [CustomTargetingValueMatchType][google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType] +message CustomTargetingValueMatchTypeEnum { + // Match type of the custom targeting value. + enum CustomTargetingValueMatchType { + // Not specified value. + 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. + 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. + 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. + 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. + 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. + 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. + CONTAINS = 6; + } +} diff --git a/google/ads/admanager/v1/custom_targeting_value_service.proto b/google/ads/admanager/v1/custom_targeting_value_service.proto new file mode 100644 index 0000000000000..958bb0243a18a --- /dev/null +++ b/google/ads/admanager/v1/custom_targeting_value_service.proto @@ -0,0 +1,166 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/custom_targeting_value_enums.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "CustomTargetingValueServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling `CustomTargetingValue` objects. +service CustomTargetingValueService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a `CustomTargetingValue` object. + rpc GetCustomTargetingValue(GetCustomTargetingValueRequest) + returns (CustomTargetingValue) { + option (google.api.http) = { + get: "/v1/{name=networks/*/customTargetingKeys/*/customTargetingValues/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `CustomTargetingValue` objects. + rpc ListCustomTargetingValues(ListCustomTargetingValuesRequest) + returns (ListCustomTargetingValuesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*/customTargetingKeys/*}/customTargetingValues" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The `CustomTargetingValue` resource. +message CustomTargetingValue { + option (google.api.resource) = { + type: "admanager.googleapis.com/CustomTargetingValue" + pattern: "networks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value}" + plural: "customTargetingValues" + singular: "customTargetingValue" + }; + + // Identifier. The resource name of the `CustomTargetingValue`. + // Format: + // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // 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 string. For example, instead + // of using "age>=18 AND <=34", try "18-34" + string ad_tag_name = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. Descriptive name for the `CustomTargetingValue`. + string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The way in which the CustomTargetingValue.name strings will be + // matched. + CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Status of the `CustomTargetingValue`. + CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request object for `GetCustomTargetingValue` method. +message GetCustomTargetingValueRequest { + // Required. The resource name of the CustomTargetingValue. + // Format: + // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CustomTargetingValue" + } + ]; +} + +// Request object for `ListCustomTargetingValues` method. +message ListCustomTargetingValuesRequest { + // Required. The parent, which owns this collection of CustomTargetingValues. + // Format: + // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/CustomTargetingKey" + } + ]; + + // 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. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListCustomTargetingValuesRequest` containing matching +// `CustomTargetingValue` objects. +message ListCustomTargetingValuesResponse { + // The `CustomTargetingValue` objects from the specified network. + repeated CustomTargetingValue custom_targeting_values = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/environment_type_enum.proto b/google/ads/admanager/v1/environment_type_enum.proto new file mode 100644 index 0000000000000..5e31c0bfd567d --- /dev/null +++ b/google/ads/admanager/v1/environment_type_enum.proto @@ -0,0 +1,41 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentTypeEnumProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [EnvironmentType][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType]. +message EnvironmentTypeEnum { + // The different environments in which an ad can be shown. + enum EnvironmentType { + // No value specified + ENVIRONMENT_TYPE_UNSPECIFIED = 0; + + // A regular web browser. + BROWSER = 1; + + // Video players. + VIDEO_PLAYER = 2; + } +} diff --git a/google/ads/admanager/v1/frequency_cap.proto b/google/ads/admanager/v1/frequency_cap.proto new file mode 100644 index 0000000000000..2a6c1defbfd05 --- /dev/null +++ b/google/ads/admanager/v1/frequency_cap.proto @@ -0,0 +1,71 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "FrequencyCapProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Represents a Frequency Cap that can be applied to an entity. +message FrequencyCap { + // The maximum number of impressions for this frequency cap. + optional int64 max_impressions = 1; + + // The number of time units over which the frequency cap is effective. + optional int64 time_amount = 2; + + // The units of time of this frequency cap. + optional TimeUnitEnum.TimeUnit time_unit = 3; +} + +// Wrapper message for TimeUnit. +message TimeUnitEnum { + // Unit of time for the frequency cap. + enum TimeUnit { + // Default value. This value is unused. + TIME_UNIT_UNSPECIFIED = 0; + + // Minute + MINUTE = 1; + + // Hour + HOUR = 2; + + // Day + DAY = 3; + + // Week + WEEK = 4; + + // Month + MONTH = 5; + + // Lifetime + LIFETIME = 6; + + // Per pod of ads in a video stream. Only valid for entities in a + // VIDEO_PLAYER environment. + POD = 7; + + // Per video stream. Only valid for entities in a VIDEO_PLAYER environment. + STREAM = 8; + } +} diff --git a/google/ads/admanager/v1/goal.proto b/google/ads/admanager/v1/goal.proto new file mode 100644 index 0000000000000..139f82dbc6cb3 --- /dev/null +++ b/google/ads/admanager/v1/goal.proto @@ -0,0 +1,162 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "GoalProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Defines the criteria a [LineItem][google.ads.admanager.v1.LineItem] needs to +// satisfy to meet its delivery +// goal. +message Goal { + // The type of the goal for the LineItem. It defines the period over which the + // goal should be reached. + GoalTypeEnum.GoalType goal_type = 1; + + // The type of the goal unit for the LineItem. + UnitTypeEnum.UnitType unit_type = 2; + + // If this is a primary goal, it represents the number or percentage of + // impressions or clicks that will be reserved. If the line item is of type + // [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP], + // it represents the percentage of available impressions reserved. If the line + // item is of type + // [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] + // or + // [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY], + // it represents the number of remaining impressions reserved. If the line + // item is of type + // [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + // or + // [LineItemTypeEnum.LineItemType.HOUSE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.HOUSE], + // it represents the percentage of remaining impressions reserved.

If this + // is an impression cap goal, it represents the number of impressions or + // conversions that the line item will stop serving at if reached. For valid + // line item types, see [LineItem.impressions_cap][]. + int64 units = 3; +} + +// Wrapper message for +// [GoalType][google.ads.admanager.v1.GoalTypeEnum.GoalType]. +message GoalTypeEnum { + // Specifies the type of the goal for a LineItem. + enum GoalType { + // Default value. This value is unused. + GOAL_TYPE_UNSPECIFIED = 0; + + // No goal is specified for the number of ads delivered. + // The line item [type][google.ads.admanager.v1.LineItem.line_item_type] + // must be one of: + // + // * [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY] + // * [LineItemTypeEnum.LineItemType.AD_EXCHANGE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.AD_EXCHANGE] + // * [LineItemTypeEnum.LineItemType.CLICK_TRACKING][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.CLICK_TRACKING] + NONE = 1; + + // There is a goal on the number of ads delivered for this line item during + // its entire lifetime. + // The line item [type][google.ads.admanager.v1.LineItem.line_item_type] + // must be one of: + // + // * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + // * [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] + // * [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY] + // * [LineItemTypeEnum.LineItemType.ADSENSE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.ADSENSE] + // * [LineItemTypeEnum.LineItemType.AD_EXCHANGE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.AD_EXCHANGE] + // * [LineItemTypeEnum.LineItemType.ADMOB][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.ADMOB] + // * [LineItemTypeEnum.LineItemType.CLICK_TRACKING][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.CLICK_TRACKING] + LIFETIME = 2; + + // There is a daily goal on the number of ads delivered for this line item. + // The line item [type][google.ads.admanager.v1.LineItem.line_item_type] + // must be one of: + // + // * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + // * [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + // * [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY] + // * [LineItemTypeEnum.LineItemType.HOUSE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.HOUSE] + // * [LineItemTypeEnum.LineItemType.ADSENSE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.ADSENSE] + // * [LineItemTypeEnum.LineItemType.AD_EXCHANGE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.AD_EXCHANGE] + // * [LineItemTypeEnum.LineItemType.ADMOB][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.ADMOB] + // * [LineItemTypeEnum.LineItemType.BUMPER][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BUMPER] + DAILY = 3; + } +} + +// Wrapper message for +// [UnitType][google.ads.admanager.v1.UnitTypeEnum.UnitType]. +message UnitTypeEnum { + // Indicates the type of unit used for defining a reservation. The + // [LineItem.cost_type][google.ads.admanager.v1.LineItem.cost_type] can differ + // from the UnitType - an ad can have an impression goal, but be billed by its + // click. Usually CostType and UnitType will refer to the same unit. + enum UnitType { + // Default value. This value is unused. + UNIT_TYPE_UNSPECIFIED = 0; + + // The number of impressions served by creatives associated with the line + // item. + IMPRESSIONS = 1; + + // The number of clicks reported by creatives associated with the line item. + // The line item [type][google.ads.admanager.v1.LineItem.line_item_type] + // must be one of: + // + // * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + // * [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] + // * [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY] + CLICKS = 2; + + // The number of view-through Cost-Per-Action (CPA) conversions from + // creatives associated with the line item. This is only supported as + // secondary goal and the + // [LineItem.cost_type][google.ads.admanager.v1.LineItem.cost_type] must be + // [CostTypeEnum.CostType.CPA][]. + CLICK_THROUGH_CPA_CONVERSIONS = 3; + + // The number of view-through Cost-Per-Action (CPA) conversions from + // creatives associated with the line item. This is only supported as + // secondary goal and the + // [LineItem.cost_type][google.ads.admanager.v1.LineItem.cost_type] must be + // [CostTypeEnum.CostType.CPA}. + VIEW_THROUGH_CPA_CONVERSIONS = 4; + + // The number of total Cost-Per-Action (CPA) conversions from creatives + // associated with the line item. This is only supported as secondary goal + // and the [LineItem.cost_type} must be [CostTypeEnum.CostType.CPA}. + TOTAL_CPA_CONVERSIONS = 5; + + // The number of viewable impressions reported by creatives associated with + // the line item. The + // [LineItem.line_item_type][google.ads.admanager.v1.LineItem.line_item_type] + // must be + // [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD]. + VIEWABLE_IMPRESSIONS = 6; + + // The number of in-target impressions reported by third party measurements. + // The + // [LineItem.line_item_type][google.ads.admanager.v1.LineItem.line_item_type] + // must be + // [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD]. + IN_TARGET_IMPRESSIONS = 7; + } +} diff --git a/google/ads/admanager/v1/label_service.proto b/google/ads/admanager/v1/label_service.proto new file mode 100644 index 0000000000000..b18b571c6e679 --- /dev/null +++ b/google/ads/admanager/v1/label_service.proto @@ -0,0 +1,136 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "LabelServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling Label objects. +service LabelService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a Label object. + rpc GetLabel(GetLabelRequest) returns (Label) { + option (google.api.http) = { + get: "/v1/{name=networks/*/labels/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of Label objects. + rpc ListLabels(ListLabelsRequest) returns (ListLabelsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/labels" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The Label resource. +message Label { + option (google.api.resource) = { + type: "admanager.googleapis.com/Label" + pattern: "networks/{network_code}/labels/{label}" + plural: "labels" + singular: "label" + }; + + // Identifier. The resource name of the Label. + // Format: `networks/{network_code}/labels/{label_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Request object for GetLabel method. +message GetLabelRequest { + // Required. The resource name of the Label. + // Format: `networks/{network_code}/labels/{label_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Label" } + ]; +} + +// Request object for ListLabels method. +message ListLabelsRequest { + // Required. The parent, which owns this collection of Labels. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of Labels to return. The service may return + // fewer than this value. If unspecified, at most 50 labels will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListLabels` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListLabels` must match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for ListLabelsRequest containing matching Label +// resources. +message ListLabelsResponse { + // The Label from the specified network. + repeated Label labels = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of Labels. + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/line_item_enums.proto b/google/ads/admanager/v1/line_item_enums.proto new file mode 100644 index 0000000000000..81e2f888ca9fc --- /dev/null +++ b/google/ads/admanager/v1/line_item_enums.proto @@ -0,0 +1,241 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "LineItemEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [LineItemCostType][google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType]. +message LineItemCostTypeEnum { + // Describes the LineItem actions that are billable. + enum LineItemCostType { + // Not specified value. + LINE_ITEM_COST_TYPE_UNSPECIFIED = 0; + + // Cost per action. The line item + // [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + // + // * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + // * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + // * [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] + // * [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + CPA = 1; + + // Cost per click. The line item + // [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + // + // * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + // * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + // * [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] + // * [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + // * [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY] + // * [LineItemTypeEnum.LineItemType.HOUSE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.HOUSE] + CPC = 2; + + // Cost per day. The line item + // [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + // + // * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + // * [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + CPD = 3; + + // Cost per mille (thousand) impressions. The line item + // [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + // + // * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + // * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + // * [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] + // * [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + // * [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY] + // * [LineItemTypeEnum.LineItemType.HOUSE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.HOUSE] + CPM = 4; + + // Cost per mille (thousand) Active View viewable impressions. The line item + // [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + // + // * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + VCPM = 5; + + // Cost per millie (thousand) in-target impressions. The line item + // [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + // + // * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + CPM_IN_TARGET = 6; + + // Cost for the entire flight of the deal. The line item + // [type][google.ads.admanager.v1.LineItem.line_item_type] must be must be + // one of: + // + // * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + CPF = 7; + } +} + +// Wrapper message for +// [CreativeRotationType][google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType]. +message CreativeRotationTypeEnum { + // The strategy to use for displaying multiple + // [creatives][google.ads.admanager.v1.Creative] that are associated with a + // line item. + enum CreativeRotationType { + // Not specified value + CREATIVE_ROTATION_TYPE_UNSPECIFIED = 0; + + // Creatives are displayed approximately the same number of times over the + // duration of the line item. + EVENLY = 1; + + // Creatives are served approximately proportionally to their performance. + OPTIMIZED = 2; + + // Creatives are served approximately proportionally to their weights, set + // on the `LineItemCreativeAssociation`. + WEIGHTED = 3; + + // Creatives are served exactly in sequential order, aka Storyboarding. Set + // on the `LineItemCreativeAssociation`. + SEQUENTIAL = 4; + } +} + +// Wrapper message for +// [DeliveryRateType][google.ads.admanager.v1.DeliveryRateTypeEnum.DeliveryRateType]. +message DeliveryRateTypeEnum { + // Possible delivery rates for a line item. It dictates the manner in which + // the line item is served. + enum DeliveryRateType { + // Not specified value + DELIVERY_RATE_TYPE_UNSPECIFIED = 0; + + // Line items are served as evenly as possible across the number of days + // specified in a line item's [duration][LineItem.duration]. + EVENLY = 1; + + // Line items are served more aggressively in the beginning of the flight + // date. + FRONTLOADED = 2; + + // The booked impressions may delivered well before the + // [end_time][google.ads.admanager.v1.LineItem.end_time]. Other + // lower-priority or lower-value line items will be stopped from delivering + // until the line item meets the number of impressions or clicks it is + // booked for. + AS_FAST_AS_POSSIBLE = 3; + } +} + +// Wrapper message for +// [LineItemDiscountType][google.ads.admanager.v1.LineItemDiscountTypeEnum.LineItemDiscountType]. +message LineItemDiscountTypeEnum { + // Describes the possible discount types on the cost of booking a line item. + enum LineItemDiscountType { + // No value specified + LINE_ITEM_DISCOUNT_TYPE_UNSPECIFIED = 0; + + // An absolute value will be discounted from the line item's cost. + ABSOLUTE_VALUE = 1; + + // A percentage of the cost will be discounted for booking the line item. + PERCENTAGE = 2; + } +} + +// Wrapper message for +// [LineItemType][google.ads.admanager.v1.LineItemTypeEnum.LineItemType]. +message LineItemTypeEnum { + // Indicates the priority of a LineItem, determined by the way in which + // impressions are reserved to be served for it. + enum LineItemType { + // Not specified value. + LINE_ITEM_TYPE_UNSPECIFIED = 0; + + // The type of LineItem for which a percentage of all the impressions that + // are being sold are reserved. + SPONSORSHIP = 12; + + // The type of LineItem for which a fixed quantity of impressions or + // clicks are reserved. + STANDARD = 13; + + // The type of LineItem most commonly used to fill a site's unsold + // inventory if not contractually obligated to deliver a requested number + // of impressions. Uses daily percentage of unsold impressions or clicks. + NETWORK = 9; + + // The type of LineItem for which a fixed quantity of impressions or + // clicks will be delivered at a priority lower than the STANDARD type. + BULK = 4; + + // The type of LineItem most commonly used to fill a site's unsold + // inventory if not contractually obligated to deliver a requested number + // of impressions. Uses fixed quantity percentage of unsold impressions or + // clicks. + PRICE_PRIORITY = 11; + + // The type of LineItem typically used for ads that promote products and + // services chosen by the publisher. + HOUSE = 7; + + // Represents a legacy LineItem that has been migrated from the DFP + // system. + LEGACY_DFP = 8; + + // The type of LineItem used for ads that track ads being served + // externally of Ad Manager. + CLICK_TRACKING = 6; + + // A LineItem using dynamic allocation backed by AdSense. + ADSENSE = 2; + + // A LineItem using dynamic allocation backed by the Google Ad Exchange. + AD_EXCHANGE = 3; + + // Represents a non-monetizable video LineItem that targets one or more + // bumper positions, which are short house video messages used by + // publishers to separate content from ad breaks. + BUMPER = 5; + + // A LineItem using dynamic allocation backed by AdMob. + ADMOB = 1; + + // The type of LineItem for which there are no impressions reserved, and + // will serve for a second price bid. + PREFERRED_DEAL = 10; + } +} + +// Wrapper message for +// [ReservationStatus][google.ads.admanager.v1.ReservationStatusEnum.ReservationStatus]. +message ReservationStatusEnum { + // Defines the different reservation statuses of a line item. + enum ReservationStatus { + // No value specified + RESERVATION_STATUS_UNSPECIFIED = 0; + + // Indicates that inventory has been reserved for the line item. + RESERVED = 1; + + // Indicates that inventory has not been reserved for the line item. + UNRESERVED = 2; + } +} diff --git a/google/ads/admanager/v1/line_item_service.proto b/google/ads/admanager/v1/line_item_service.proto new file mode 100644 index 0000000000000..2191e77e23dcc --- /dev/null +++ b/google/ads/admanager/v1/line_item_service.proto @@ -0,0 +1,338 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/computed_status_enum.proto"; +import "google/ads/admanager/v1/creative_placeholder.proto"; +import "google/ads/admanager/v1/environment_type_enum.proto"; +import "google/ads/admanager/v1/goal.proto"; +import "google/ads/admanager/v1/line_item_enums.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/money.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "LineItemServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling LineItem objects. +service LineItemService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a LineItem object. + rpc GetLineItem(GetLineItemRequest) returns (LineItem) { + option (google.api.http) = { + get: "/v1/{name=networks/*/orders/*/lineItems/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of LineItem objects. + rpc ListLineItems(ListLineItemsRequest) returns (ListLineItemsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*/orders/*}/lineItems" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The LineItem resource. +message LineItem { + option (google.api.resource) = { + type: "admanager.googleapis.com/LineItem" + pattern: "networks/{network_code}/orders/{order}/lineItems/{line_item}" + plural: "lineItems" + singular: "lineItem" + }; + + // Identifier. The resource name of the LineItem. + // Format: + // `networks/{network_code}/orders/{order_id}/lineItems/{line_item_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Display name of the LineItem. This attribute has a maximum length + // of 255 characters. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The archival status of the LineItem. + bool archived = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. This attribute is only applicable for certain + // [line item types][LineItemType] and acts as an "FYI" or note, which does + // not impact ad-serving or other backend systems. + // + // For [SPONSORSHIP][LineItemType.SPONSORSHIP] line items, this represents + // the minimum quantity, which is a lifetime impression volume goal for + // reporting purposes. + // + // For [STANDARD][LineItemType.STANDARD] line items, this represents the + // contracted quantity, which is the number of units specified in the contract + // that the advertiser has bought for this line item. This attribute is only + // available if you have this feature enabled on your network. + int64 contracted_units_bought = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The amount of money to spend per impression or click. + google.type.Money cost_per_unit = 15 [(google.api.field_behavior) = REQUIRED]; + + // Required. The method used for billing this line item. + LineItemCostTypeEnum.LineItemCostType cost_type = 19 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The instant at which the LineItem was created. This attribute + // may be null for line items created before this feature was introduced. + google.protobuf.Timestamp create_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instant at which the LineItem was last updated + google.protobuf.Timestamp update_time = 31 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The strategy used for displaying multiple + // [creatives][google.ads.admanager.v1.Creative] that are associated with the + // line item. + CreativeRotationTypeEnum.CreativeRotationType creative_rotation_type = 22 + [(google.api.field_behavior) = REQUIRED]; + + // Non-empty default. The strategy for delivering ads over the duration of the + // line item. Defaults to [EVENLY][DeliveryRateType.EVENLY] or + // [FRONTLOADED][DeliveryRatetype.FRONTLOADED] depending on the network's + // configuration. + DeliveryRateTypeEnum.DeliveryRateType delivery_rate_type = 23 + [(google.api.field_behavior) = NON_EMPTY_DEFAULT]; + + // Optional. The number here is either a percentage or an absolute value + // depending on the + // [discount_type][google.ads.admanager.v1.LineItem.discount_type]. If it is + // [PERCENTAGE][LineItemDiscountType.PERCENTAGE], then only non-fractional + // values are supported. + double discount = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Non-empty default. The type of discount applied to the line item. Defaults + // to [PERCENTAGE][LineItemDiscountType.PERCENTAGE]. + LineItemDiscountTypeEnum.LineItemDiscountType discount_type = 24 + [(google.api.field_behavior) = NON_EMPTY_DEFAULT]; + + // Non-empty default. The environment that the line item is targeting. The + // default value is [BROWSER][EnvironmentType.BROWSER]. If this value is + // [VIDEO_PLAYER][EnvironmentType.VIDEO_PLAYER], then this line item can only + // target [AdUnits][google.ads.admanager.v1.AdUnit] that have `AdUnitSizes` + // whose `environment_type` is also `VIDEO_PLAYER`. + EnvironmentTypeEnum.EnvironmentType environment_type = 25 + [(google.api.field_behavior) = NON_EMPTY_DEFAULT]; + + // Optional. Identifier for the LineItem that is meaningful to the publisher. + // This attribute has a maximum length of 255 characters. + string external_id = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Time at which the LineItem will begin serving. This attribute + // must be in the future when creating a LineItem. + google.protobuf.Timestamp start_time = 6 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Time at which the LineItem will stop serving. This attribute is + // ignored when + // [unlimited_end_time][google.ads.admanager.v1.LineItem.unlimited_end_time] + // is `true`. If specified, it must be after + // [start_time][google.ads.admanager.v1.LineItem.start_time]. This end time + // does not include + // [auto_extension_days][google.ads.admanager.v1.LineItem.auto_extension_days]. + google.protobuf.Timestamp end_time = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of days to allow a LineItem to deliver past its + // [end_time][google.ads.admanager.v1.LineItem.end_time]. A maximum of 7 days + // is allowed. This feature is only available for Ad Manager 360 accounts. + int32 auto_extension_days = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the LineItem has an + // [end_time][google.ads.admanager.v1.LineItem.end_time]. This attribute can + // be set to `true` for only LineItems with + // [line_item_type][google.ads.admanager.v1.LineItem.line_item_type] + // [SPONSORSHIP][LineItemType.SPONSORSHIP], [NETWORK][LineItemType.NETWORK], + // [PRICE_PRIORITY][LineItemType.PRICE_PRIORITY] and + // [HOUSE][LineItemType.HOUSE]. + bool unlimited_end_time = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The application that last modified this line item. + string last_modified_by_app = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Determines the default priority of the LineItem for delivery. + // More information can be found on the [Ad Manager Help + // Center](https://support.google.com/dfp_premium/answer/177279). + LineItemTypeEnum.LineItemType line_item_type = 10 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Indicates if a line item is missing any + // [creatives][google.ads.admanager.v1.Creative] for the + // [creative_placeholders][google.ads.admanager.v1.LineItem.creative_placeholders] + // specified. + // + // [Creatives][google.ads.admanager.v1.Creative] can be considered missing for + // several reasons: + // + // * Not enough [creatives][google.ads.admanager.v1.Creative] of a certain + // size have been uploaded, + // as determined by + // [expectedCreativeCount][google.ads.admanager.v1.CreativePlaceholder.expected_creative_count]. + // For example a line item specifies 750x350, 400x200, but only a 750x350 + // was uploaded. Or line item specifies 750x350 with an expected count of 2, + // but only one was uploaded. + // * The [appliedLabels][Creative.applied_labels] of an associated + // [Creative][google.ads.admanager.v1.Creative] + // do not match the + // [effectiveAppliedLabels][CreativePlaceholder.effective_applied_labels] of + // the line item. For example if a line item specifies 750x350 with a foo + // applied label, but a 750x350 creative without an applied label was + // uploaded. + bool missing_creatives = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Provides any additional notes that may annotate LineItem. This + // field has a maximum length of 65,535 characters. + string notes = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Priority of the LineItem for delivery. Valid values range from 1 + // to 16. This field can only be changed by certain networks, otherwise a + // `PERMISSION_DENIED` error will occur. + // + // The following list shows the default, minimum, and maximum priority values + // for each [LineItemType][LineItemType]: formatted as `LineItemType`: default + // priority (minimum priority, maximum priority): + // + // * `SPONSORSHIP`: 4 (2,5) + // * `STANDARD`: 8 (6,10) + // * `NETWORK`: 12 (11, 14) + // * `BULK`: 12 (11, 14) + // * `PRICE_PRIORITY`: 12 (11, 14) + // * `HOUSE`: 16 (15, 16) + // * `CLICK_TRACKING`: 16 (1, 16) + // * `AD_EXCHANGE`: 12 (1, 16) + // * `ADSENSE`: 12 (1, 16) + // * `BUMPER`: 16 (15, 16) + int64 priority = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Describes whether or not inventory has been reserved for the + // line item. + ReservationStatusEnum.ReservationStatus reservation_status = 26 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The web property code used for dynamic allocation line items. + // This web property is only required with line item types + // [AD_EXCHANGE][LineItemType.AD_EXCHANGE] and + // [ADSENSE][LineItemType.ADSENSE]. + string web_property_code = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Details about the creatives that are expected to serve through + // this LineItem. + repeated CreativePlaceholder creative_placeholders = 27 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The status of the LineItem. + ComputedStatusEnum.ComputedStatus status = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The primary goal that this LineItem is associated with, which is + // used in its pacing and budgeting. + Goal primary_goal = 29 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The impression limit for the LineItem. This field is meaningful + // only if the + // [LineItem.line_item_type][google.ads.admanager.v1.LineItem.line_item_type] + // is [LineItemType.SPONSORSHIP][] and + // [LineItem.cost_type][google.ads.admanager.v1.LineItem.cost_type] is + // [CostType.CPM][]. + Goal impression_limit = 30 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request object for GetLineItem method. +message GetLineItemRequest { + // Required. The resource name of the LineItem. + // Format: + // `networks/{network_code}/orders/{order_id}/lineItems/{line_item_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/LineItem" + } + ]; +} + +// Request object for ListLineItems method. +message ListLineItemsRequest { + // Required. The parent, which owns this collection of LineItems. + // Format: networks/{network_code}/orders/{order_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Order" } + ]; + + // Optional. The maximum number of LineItems to return. The service may return + // fewer than this value. If unspecified, at most 50 line items will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListLineItems` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListLineItems` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for ListLineItemsRequest containing matching LineItem +// resources. +message ListLineItemsResponse { + // The LineItem from the specified network. + repeated LineItem line_items = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of LineItems. + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/network_service.proto b/google/ads/admanager/v1/network_service.proto new file mode 100644 index 0000000000000..ef5868841429a --- /dev/null +++ b/google/ads/admanager/v1/network_service.proto @@ -0,0 +1,106 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "NetworkServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling Network objects. +service NetworkService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a Network object. + rpc GetNetwork(GetNetworkRequest) returns (Network) { + option (google.api.http) = { + get: "/v1/{name=networks/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// The Network resource. +message Network { + option (google.api.resource) = { + type: "admanager.googleapis.com/Network" + pattern: "networks/{network_code}" + plural: "networks" + singular: "network" + }; + + // Identifier. The resource name of the Network. + // Format: networks/{network_code} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Display name for Network. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Network Code. + string network_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Property code. + string property_code = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time zone associated with the delivery of orders and + // reporting. + string time_zone = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Primary currency code, in ISO-4217 format. + string currency_code = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Currency codes that can be used as an alternative to the primary + // currency code for trafficking Line Items. + repeated string secondary_currency_codes = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // 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} + string effective_root_ad_unit = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AdUnit" + } + ]; + + // Output only. Whether this is a test network. + bool test_network = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Network ID. + int64 network_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request to get Network +message GetNetworkRequest { + // Required. Resource name of Network. + // Format: networks/{network_code} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; +} diff --git a/google/ads/admanager/v1/order_service.proto b/google/ads/admanager/v1/order_service.proto new file mode 100644 index 0000000000000..c35534b98def4 --- /dev/null +++ b/google/ads/admanager/v1/order_service.proto @@ -0,0 +1,325 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/applied_label.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "OrderServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling `Order` objects. +service OrderService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve an Order object. + rpc GetOrder(GetOrderRequest) returns (Order) { + option (google.api.http) = { + get: "/v1/{name=networks/*/orders/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `Order` objects. + // + // Fields used for literal matching in filter string: + // * `order_id` + // * `display_name` + // * `external_order_id` + rpc ListOrders(ListOrdersRequest) returns (ListOrdersResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/orders" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The `Order` resource. +message Order { + option (google.api.resource) = { + type: "admanager.googleapis.com/Order" + pattern: "networks/{network_code}/orders/{order}" + plural: "orders" + singular: "order" + }; + + // The status of an Order. + enum Status { + // Default value. This value is unused. + STATUS_UNSPECIFIED = 0; + + // Indicates that the Order has just been created but no approval has been + // requested yet. + DRAFT = 2; + + // Indicates that a request for approval for the Order has been made. + PENDING_APPROVAL = 3; + + // Indicates that the Order has been approved and is ready to serve. + APPROVED = 4; + + // Indicates that the Order has been disapproved and is not eligible to + // serve. + DISAPPROVED = 5; + + // This is a legacy state. Paused status should be checked on LineItems + // within the order. + PAUSED = 6; + + // Indicates that the Order has been canceled and cannot serve. + CANCELED = 7; + + // Indicates that the Order has been deleted. + DELETED = 8; + } + + // Identifier. The resource name of the `Order`. + // Format: `networks/{network_code}/orders/{order_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Order ID. + int64 order_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the Order. This value is required to create + // an order and has a maximum length of 255 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies whether or not the Order is a programmatic order. + bool programmatic = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource name of the User responsible for trafficking the + // Order. Format: "networks/{network_code}/users/{user_id}" + string trafficker = 23 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/User" } + ]; + + // Optional. The resource names of Contacts from the advertiser of this Order. + // Format: "networks/{network_code}/contacts/{contact_id}" + repeated string advertiser_contacts = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Contact" + } + ]; + + // Required. The resource name of the Company, which is of type + // Company.Type.ADVERTISER, to which this order belongs. This attribute is + // required. Format: "networks/{network_code}/companies/{company_id}" + string advertiser = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Company" + } + ]; + + // Optional. The resource names of Contacts from the advertising Agency of + // this Order. Format: "networks/{network_code}/contacts/{contact_id}" + repeated string agency_contacts = 7 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Contact" + } + ]; + + // 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}" + string agency = 8 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Company" + } + ]; + + // Optional. The resource names of Teams directly applied to this Order. + // Format: "networks/{network_code}/teams/{team_id}" + repeated string applied_teams = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } + ]; + + // Output only. The resource names of Teams applied to this Order including + // inherited values. Format: "networks/{network_code}/teams/{team_id}" + repeated string effective_teams = 28 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } + ]; + + // 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}" + string creator = 10 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "admanager.googleapis.com/User" } + ]; + + // Output only. The ISO 4217 3-letter currency code for the currency used by + // the Order. This value is the network's currency code. + string currency_code = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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. + google.protobuf.Timestamp start_time = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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. + google.protobuf.Timestamp end_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. An arbitrary ID to associate to the Order, which can be used as a + // key to an external system. + int64 external_order_id = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The archival status of the Order. + bool archived = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The application which modified this order. This attribute is + // assigned by Google. + string last_modified_by_app = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instant this Order was last modified. + google.protobuf.Timestamp update_time = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Provides any additional notes that may annotate the Order. This + // attribute has a maximum length of 65,535 characters. + string notes = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The purchase order number for the Order. This value has a maximum + // length of 63 characters. + string po_number = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The status of the Order. + Status status = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The resource name of the User responsible for the sales of the + // Order. Format: "networks/{network_code}/users/{user_id}" + string salesperson = 21 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "admanager.googleapis.com/User" } + ]; + + // Optional. The resource names of the secondary salespeople associated with + // the order. Format: "networks/{network_code}/users/{user_id}" + repeated string secondary_salespeople = 22 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "admanager.googleapis.com/User" } + ]; + + // Optional. The resource names of the secondary traffickers associated with + // the order. Format: "networks/{network_code}/users/{user_id}" + repeated string secondary_traffickers = 24 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "admanager.googleapis.com/User" } + ]; + + // Optional. The set of labels applied directly to this order. + repeated AppliedLabel applied_labels = 25 + [(google.api.field_behavior) = OPTIONAL]; + + // 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. + repeated AppliedLabel effective_applied_labels = 26 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request object for `GetOrder` method. +message GetOrderRequest { + // Required. The resource name of the Order. + // Format: `networks/{network_code}/orders/{order_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Order" } + ]; +} + +// Request object for `ListOrders` method. +message ListOrdersRequest { + // Required. The parent, which owns this collection of Orders. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // 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. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListOrdersRequest` containing matching `Order` +// resources. +message ListOrdersResponse { + // The `Order` from the specified network. + repeated Order orders = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/placement_enums.proto b/google/ads/admanager/v1/placement_enums.proto new file mode 100644 index 0000000000000..371d5adb045c1 --- /dev/null +++ b/google/ads/admanager/v1/placement_enums.proto @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "PlacementEnumsProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Wrapper message for +// [PlacementStatus][google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus] +message PlacementStatusEnum { + // Status of the placement. + enum PlacementStatus { + // Not specified value. + PLACEMENT_STATUS_UNSPECIFIED = 0; + + // Stats are collected, user-visible. + ACTIVE = 1; + + // No stats collected, not user-visible. + INACTIVE = 2; + + // No stats collected, user-visible. + ARCHIVED = 3; + } +} diff --git a/google/ads/admanager/v1/placement_service.proto b/google/ads/admanager/v1/placement_service.proto new file mode 100644 index 0000000000000..5e984020d3f98 --- /dev/null +++ b/google/ads/admanager/v1/placement_service.proto @@ -0,0 +1,174 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/ads/admanager/v1/placement_enums.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "PlacementServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling `Placement` objects. +service PlacementService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a `Placement` object. + rpc GetPlacement(GetPlacementRequest) returns (Placement) { + option (google.api.http) = { + get: "/v1/{name=networks/*/placements/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of `Placement` objects. + rpc ListPlacements(ListPlacementsRequest) returns (ListPlacementsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/placements" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The `Placement` resource. +message Placement { + option (google.api.resource) = { + type: "admanager.googleapis.com/Placement" + pattern: "networks/{network_code}/placements/{placement}" + plural: "placements" + singular: "placement" + }; + + // Identifier. The resource name of the `Placement`. + // Format: `networks/{network_code}/placements/{placement_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. `Placement` ID. + int64 placement_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the placement. Its maximum length is 255 + // characters. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A description of the Placement. This value is optional and its + // maximum length is 65,535 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string placement_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of the Placement. This attribute is read-only. + PlacementStatusEnum.PlacementStatus status = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The resource names of AdUnits that constitute the Placement. + // Format: "networks/{network_code}/adUnits/{ad_unit_id}" + repeated string targeted_ad_units = 7 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/AdUnit" + } + ]; + + // Output only. The instant this Placement was last modified. + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request object for `GetPlacement` method. +message GetPlacementRequest { + // Required. The resource name of the Placement. + // Format: `networks/{network_code}/placements/{placement_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Placement" + } + ]; +} + +// Request object for `ListPlacements` method. +message ListPlacementsRequest { + // Required. The parent, which owns this collection of Placements. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // 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. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for `ListPlacementsRequest` containing matching `Placement` +// objects. +message ListPlacementsResponse { + // The `Placement` objects from the specified network. + repeated Placement placements = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/report_service.proto b/google/ads/admanager/v1/report_service.proto new file mode 100644 index 0000000000000..2e05d9b10c472 --- /dev/null +++ b/google/ads/admanager/v1/report_service.proto @@ -0,0 +1,135 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "ReportServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for interacting with Reports. +service ReportService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // Initiates the execution and export of a report asynchronously. Users can + // get the report by polling this operation via + // OperationsService.GetOperation. + // Intervals of at least 2 seconds are recommended, with an exponential + // backoff. Once a report is complete, the operation will contain a + // ExportSavedReportResponse in its response field. + rpc ExportSavedReport(ExportSavedReportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{report=networks/*/reports/*}:exportSavedReport" + body: "*" + }; + option (google.api.method_signature) = "report"; + option (google.longrunning.operation_info) = { + response_type: "ExportSavedReportResponse" + metadata_type: "ExportSavedReportMetadata" + }; + } +} + +// The Report resource. +message Report { + option (google.api.resource) = { + type: "admanager.googleapis.com/Report" + pattern: "networks/{network_code}/reports/{report}" + plural: "reports" + singular: "report" + }; + + // Identifier. The resource name of the Report. + // Report resource name have the form: + // `networks/{network_code}/reports/{report_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Request proto for the configuration of a report run. +message ExportSavedReportRequest { + // Supported file formats. + enum Format { + // Default value. This value is unused. + FORMAT_UNSPECIFIED = 0; + + // Comma separated values meant to be used by automated machine + // processing. + // + // Unlike other formats, the output is not localized and there is no + // totals row by default. + CSV_DUMP = 2; + + // The report file is generated as an Office Open XML spreadsheet designed + // for Excel 2007+. + XLSX = 5; + + // The report is generated as XML. + XML = 6; + } + + // The name of a particular saved report resource. + // + // A report will be run based on the specification of this saved report. + // It must have the format of + // "networks/{network_code}/reports/{report_id}" + string report = 1 [(google.api.resource_reference) = { + type: "admanager.googleapis.com/Report" + }]; + + // Required. The export format requested. + Format format = 2 [(google.api.field_behavior) = REQUIRED]; + + // Whether or not to include the report properties (e.g. network, user, date + // generated...) in the generated report. + bool include_report_properties = 3; + + // Whether or not to include the IDs if there are any (e.g. advertiser ID, + // order ID...) present in the report. + bool include_ids = 4; + + // Whether or not to include a row containing metric totals. + bool include_totals_row = 5; + + // The file name of report download. The file extension is determined by + // export_format and gzip_compressed. + // + // Defaults to "DFP Report" if not specified. + string file_name = 6; +} + +// The message stored in the google.longrunning.Operation.metadata field. +// Contains metadata regarding this execution. +message ExportSavedReportMetadata { + // The result generated in this report run. + int64 result_id = 1; +} + +// Message included in the longrunning Operation result.response field when +// the report completes successfully. +message ExportSavedReportResponse { + // The link to the exported file. + string download_url = 1; +} diff --git a/google/ads/admanager/v1/role_service.proto b/google/ads/admanager/v1/role_service.proto new file mode 100644 index 0000000000000..b15e064db7e2f --- /dev/null +++ b/google/ads/admanager/v1/role_service.proto @@ -0,0 +1,136 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "RoleServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling Role objects. +service RoleService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a Role object. + rpc GetRole(GetRoleRequest) returns (Role) { + option (google.api.http) = { + get: "/v1/{name=networks/*/roles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of Role objects. + rpc ListRoles(ListRolesRequest) returns (ListRolesResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/roles" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The Role resource. +message Role { + option (google.api.resource) = { + type: "admanager.googleapis.com/Role" + pattern: "networks/{network_code}/roles/{role}" + plural: "roles" + singular: "role" + }; + + // Identifier. The resource name of the Role. + // Format: `networks/{network_code}/roles/{role_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Request object for GetRole method. +message GetRoleRequest { + // Required. The resource name of the Role. + // Format: `networks/{network_code}/roles/{role_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Role" } + ]; +} + +// Request object for ListRoles method. +message ListRolesRequest { + // Required. The parent, which owns this collection of Roles. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // 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. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for ListRolesRequest containing matching Role +// resources. +message ListRolesResponse { + // The Role from the specified network. + repeated Role roles = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of Roles. + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/size.proto b/google/ads/admanager/v1/size.proto new file mode 100644 index 0000000000000..9e3befcc54739 --- /dev/null +++ b/google/ads/admanager/v1/size.proto @@ -0,0 +1,83 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "SizeProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Represents the dimensions of an AdUnit, LineItem, or Creative. +message Size { + // Required. The width of the [Creative](google.ads.admanager.v1.Creative), + // [AdUnit](google.ads.admanager.v1.AdUnit), or + // [LineItem](google.ads.admanager.v1.LineItem). + int32 width = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The height of the [Creative](google.ads.admanager.v1.Creative), + // [AdUnit](google.ads.admanager.v1.AdUnit), or + // [LineItem](google.ads.admanager.v1.LineItem). + int32 height = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The SizeType of the + // [Creative](google.ads.admanager.v1.Creative), + // [AdUnit](google.ads.admanager.v1.AdUnit), or + // [LineItem](google.ads.admanager.v1.LineItem). + SizeTypeEnum.SizeType size_type = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Wrapper message for +// [SizeType][google.ads.admanager.v1.SizeTypeEnum.SizeType]. +message SizeTypeEnum { + // The different Size types for an ad. + enum SizeType { + // Default value. This value is unused. + SIZE_TYPE_UNSPECIFIED = 0; + + // Dimension based size, an actual height and width in pixels. + PIXEL = 1; + + // Size is expressed as a ratio. For example, 4:1 could be + // met by a 100 x 25 sized image. + 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. + INTERSTITIAL = 3; + + // Size is ignored. This must be used with 1x1 + // size. + IGNORED = 4; + + // Native size, which is a function of the how the client renders the + // creative. This must be used with 1x1 size. + 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. + FLUID = 6; + + // Audio size. Used with audio ads. This must be used with 1x1 size. + AUDIO = 7; + } +} diff --git a/google/ads/admanager/v1/team_service.proto b/google/ads/admanager/v1/team_service.proto new file mode 100644 index 0000000000000..898f829e0096a --- /dev/null +++ b/google/ads/admanager/v1/team_service.proto @@ -0,0 +1,136 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "TeamServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling Team objects. +service TeamService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a Team object. + rpc GetTeam(GetTeamRequest) returns (Team) { + option (google.api.http) = { + get: "/v1/{name=networks/*/teams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of Team objects. + rpc ListTeams(ListTeamsRequest) returns (ListTeamsResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/teams" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The Team resource. +message Team { + option (google.api.resource) = { + type: "admanager.googleapis.com/Team" + pattern: "networks/{network_code}/teams/{team}" + plural: "teams" + singular: "team" + }; + + // Identifier. The resource name of the Team. + // Format: `networks/{network_code}/teams/{team_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Request object for GetTeam method. +message GetTeamRequest { + // Required. The resource name of the Team. + // Format: `networks/{network_code}/teams/{team_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } + ]; +} + +// Request object for ListTeams method. +message ListTeamsRequest { + // Required. The parent, which owns this collection of Teams. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of Teams to return. The service may return + // fewer than this value. If unspecified, at most 50 teams will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListTeams` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListTeams` must match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for ListTeamsRequest containing matching Team +// resources. +message ListTeamsResponse { + // The Team from the specified network. + repeated Team teams = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of Teams. + // 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 + int32 total_size = 3; +} diff --git a/google/ads/admanager/v1/user_service.proto b/google/ads/admanager/v1/user_service.proto new file mode 100644 index 0000000000000..265472e6f1ba6 --- /dev/null +++ b/google/ads/admanager/v1/user_service.proto @@ -0,0 +1,171 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.ads.admanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.AdManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; +option java_multiple_files = true; +option java_outer_classname = "UserServiceProto"; +option java_package = "com.google.ads.admanager.v1"; +option objc_class_prefix = "GAA"; +option php_namespace = "Google\\Ads\\AdManager\\V1"; + +// Provides methods for handling User objects. +service UserService { + option (google.api.default_host) = "admanager.googleapis.com"; + + // API to retrieve a User object. + rpc GetUser(GetUserRequest) returns (User) { + option (google.api.http) = { + get: "/v1/{name=networks/*/users/*}" + }; + option (google.api.method_signature) = "name"; + } + + // API to retrieve a list of User objects. + rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) { + option (google.api.http) = { + get: "/v1/{parent=networks/*}/users" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The User resource. +message User { + option (google.api.resource) = { + type: "admanager.googleapis.com/User" + pattern: "networks/{network_code}/users/{user}" + plural: "users" + singular: "user" + }; + + // Identifier. The resource name of the User. + // Format: `networks/{network_code}/users/{user_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. `User` ID. + int64 user_id = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The name of the User. It has a maximum length of 128 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The email or login of the User. In order to create a new user, + // you must already have a Google Account. + string email = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The unique Role ID of the User. Roles that are created by Google + // will have negative IDs. + string role = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/Role" } + ]; + + // Output only. Specifies whether or not the User is active. An inactive user + // cannot log in to the system or perform any operations. + bool active = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. An identifier for the User that is meaningful to the publisher. + // This attribute has a maximum length of 255 characters. + string external_id = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Whether the user is an OAuth2 service account user. + // Service account users can only be added through the UI. + bool service_account = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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. + string orders_ui_local_time_zone = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request object for GetUser method. +message GetUserRequest { + // Required. The resource name of the User. + // Format: `networks/{network_code}/users/{user_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "admanager.googleapis.com/User" } + ]; +} + +// Request object for ListUsers method. +message ListUsersRequest { + // Required. The parent, which owns this collection of Users. + // Format: `networks/{network_code}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "admanager.googleapis.com/Network" + } + ]; + + // Optional. The maximum number of Users to return. The service may return + // fewer than this value. If unspecified, at most 50 users will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListUsers` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListUsers` must match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to filter the response. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Expression to specify sorting order. + // See syntax details at + // https://developers.google.com/ad-manager/api/beta/filters#order + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of individual resources to skip while paginating. + int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for ListUsersRequest containing matching User resources. +message ListUsersResponse { + // The User from the specified network. + repeated User users = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Total number of Users. + // 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 + int32 total_size = 3; +}