1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.ads.admanager.v1; 18 19import "google/ads/admanager/v1/applied_label.proto"; 20import "google/ads/admanager/v1/company_credit_status_enum.proto"; 21import "google/ads/admanager/v1/company_type_enum.proto"; 22import "google/api/annotations.proto"; 23import "google/api/client.proto"; 24import "google/api/field_behavior.proto"; 25import "google/api/resource.proto"; 26 27option csharp_namespace = "Google.Ads.AdManager.V1"; 28option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; 29option java_multiple_files = true; 30option java_outer_classname = "CompanyServiceProto"; 31option java_package = "com.google.ads.admanager.v1"; 32option objc_class_prefix = "GAA"; 33option php_namespace = "Google\\Ads\\AdManager\\V1"; 34 35// Provides methods for handling `Company` objects. 36service CompanyService { 37 option (google.api.default_host) = "admanager.googleapis.com"; 38 39 // API to retrieve a `Company` object. 40 rpc GetCompany(GetCompanyRequest) returns (Company) { 41 option (google.api.http) = { 42 get: "/v1/{name=networks/*/companies/*}" 43 }; 44 option (google.api.method_signature) = "name"; 45 } 46 47 // API to retrieve a list of `Company` objects. 48 rpc ListCompanies(ListCompaniesRequest) returns (ListCompaniesResponse) { 49 option (google.api.http) = { 50 get: "/v1/{parent=networks/*}/companies" 51 }; 52 option (google.api.method_signature) = "parent"; 53 } 54} 55 56// The `Company` resource. 57message Company { 58 option (google.api.resource) = { 59 type: "admanager.googleapis.com/Company" 60 pattern: "networks/{network_code}/companies/{company}" 61 plural: "companies" 62 singular: "company" 63 }; 64 65 // Identifier. The resource name of the `Company`. 66 // Format: `networks/{network_code}/companies/{company_id}` 67 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 68 69 // Output only. `Company` ID. 70 int64 company_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 71 72 // Required. The display name of the `Company`. 73 // 74 // This value has a maximum length of 127 characters. 75 string display_name = 3 [(google.api.field_behavior) = REQUIRED]; 76 77 // Required. The type of the `Company`. 78 CompanyTypeEnum.CompanyType type = 4 [(google.api.field_behavior) = REQUIRED]; 79 80 // Optional. The address for the `Company`. 81 // 82 // This value has a maximum length of 1024 characters. 83 string address = 5 [(google.api.field_behavior) = OPTIONAL]; 84 85 // Optional. The email for the `Company`. 86 // 87 // This value has a maximum length of 128 characters. 88 string email = 6 [(google.api.field_behavior) = OPTIONAL]; 89 90 // Optional. The fax number for the `Company`. 91 // 92 // This value has a maximum length of 63 characters. 93 string fax = 7 [(google.api.field_behavior) = OPTIONAL]; 94 95 // Optional. The phone number for the `Company`. 96 // 97 // This value has a maximum length of 63 characters. 98 string phone = 8 [(google.api.field_behavior) = OPTIONAL]; 99 100 // Optional. The external ID for the `Company`. 101 // 102 // This value has a maximum length of 255 characters. 103 string external_id = 9 [(google.api.field_behavior) = OPTIONAL]; 104 105 // Optional. Comments about the `Company`. 106 // 107 // This value has a maximum length of 1024 characters. 108 string comment = 10 [(google.api.field_behavior) = OPTIONAL]; 109 110 // Optional. The credit status of this company. 111 // 112 // This attribute defaults to `ACTIVE` if basic settings are enabled and 113 // `ON_HOLD` if advance settings are enabled. 114 CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 115 [(google.api.field_behavior) = OPTIONAL]; 116 117 // Optional. The labels that are directly applied to this company. 118 repeated AppliedLabel applied_labels = 12 119 [(google.api.field_behavior) = OPTIONAL]; 120 121 // Optional. The resource names of primary Contact of this company. 122 // Format: "networks/{network_code}/contacts/{contact_id}" 123 optional string primary_contact = 13 [ 124 (google.api.field_behavior) = OPTIONAL, 125 (google.api.resource_reference) = { 126 type: "admanager.googleapis.com/Contact" 127 } 128 ]; 129 130 // Optional. The resource names of Teams that are directly associated with 131 // this company. Format: "networks/{network_code}/teams/{team_id}" 132 repeated string applied_teams = 14 [ 133 (google.api.field_behavior) = OPTIONAL, 134 (google.api.resource_reference) = { type: "admanager.googleapis.com/Team" } 135 ]; 136} 137 138// Request object for `GetCompany` method. 139message GetCompanyRequest { 140 // Required. The resource name of the Company. 141 // Format: `networks/{network_code}/companies/{company_id}` 142 string name = 1 [ 143 (google.api.field_behavior) = REQUIRED, 144 (google.api.resource_reference) = { 145 type: "admanager.googleapis.com/Company" 146 } 147 ]; 148} 149 150// Request object for `ListCompanies` method. 151message ListCompaniesRequest { 152 // Required. The parent, which owns this collection of Companies. 153 // Format: `networks/{network_code}` 154 string parent = 1 [ 155 (google.api.field_behavior) = REQUIRED, 156 (google.api.resource_reference) = { 157 type: "admanager.googleapis.com/Network" 158 } 159 ]; 160 161 // Optional. The maximum number of `Companies` to return. The service may 162 // return fewer than this value. If unspecified, at most 50 `Companies` will 163 // be returned. The maximum value is 1000; values above 1000 will be coerced 164 // to 1000. 165 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 166 167 // Optional. A page token, received from a previous `ListCompanies` call. 168 // Provide this to retrieve the subsequent page. 169 // 170 // When paginating, all other parameters provided to `ListCompanies` must 171 // match the call that provided the page token. 172 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 173 174 // Optional. Expression to filter the response. 175 // See syntax details at 176 // https://developers.google.com/ad-manager/api/beta/filters 177 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 178 179 // Optional. Expression to specify sorting order. 180 // See syntax details at 181 // https://developers.google.com/ad-manager/api/beta/filters#order 182 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 183 184 // Optional. Number of individual resources to skip while paginating. 185 int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; 186} 187 188// Response object for `ListCompaniesRequest` containing matching `Company` 189// resources. 190message ListCompaniesResponse { 191 // The `Company` from the specified network. 192 repeated Company companies = 1; 193 194 // A token, which can be sent as `page_token` to retrieve the next page. 195 // If this field is omitted, there are no subsequent pages. 196 string next_page_token = 2; 197 198 // Total number of `Companies`. 199 // If a filter was included in the request, this reflects the total number 200 // after the filtering is applied. 201 // 202 // `total_size` will not be calculated in the response unless it has been 203 // included in a response field mask. The response field mask can be provided 204 // to the method by using the URL parameter `$fields` or `fields`, or by using 205 // the HTTP/gRPC header `X-Goog-FieldMask`. 206 // 207 // For more information, see 208 // https://developers.google.com/ad-manager/api/beta/field-masks 209 int32 total_size = 3; 210} 211