xref: /aosp_15_r20/external/googleapis/google/ads/admanager/v1/size.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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/api/field_behavior.proto";
20
21option csharp_namespace = "Google.Ads.AdManager.V1";
22option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager";
23option java_multiple_files = true;
24option java_outer_classname = "SizeProto";
25option java_package = "com.google.ads.admanager.v1";
26option objc_class_prefix = "GAA";
27option php_namespace = "Google\\Ads\\AdManager\\V1";
28
29// Represents the dimensions of an AdUnit, LineItem, or Creative.
30message Size {
31  // Required. The width of the [Creative](google.ads.admanager.v1.Creative),
32  // [AdUnit](google.ads.admanager.v1.AdUnit), or
33  // [LineItem](google.ads.admanager.v1.LineItem).
34  int32 width = 1 [(google.api.field_behavior) = REQUIRED];
35
36  // Required. The height of the [Creative](google.ads.admanager.v1.Creative),
37  // [AdUnit](google.ads.admanager.v1.AdUnit), or
38  // [LineItem](google.ads.admanager.v1.LineItem).
39  int32 height = 2 [(google.api.field_behavior) = REQUIRED];
40
41  // Required. The SizeType of the
42  // [Creative](google.ads.admanager.v1.Creative),
43  // [AdUnit](google.ads.admanager.v1.AdUnit), or
44  // [LineItem](google.ads.admanager.v1.LineItem).
45  SizeTypeEnum.SizeType size_type = 3 [(google.api.field_behavior) = REQUIRED];
46}
47
48// Wrapper message for
49// [SizeType][google.ads.admanager.v1.SizeTypeEnum.SizeType].
50message SizeTypeEnum {
51  // The different Size types for an ad.
52  enum SizeType {
53    // Default value. This value is unused.
54    SIZE_TYPE_UNSPECIFIED = 0;
55
56    // Dimension based size, an actual height and width in pixels.
57    PIXEL = 1;
58
59    // Size is expressed as a ratio. For example, 4:1 could be
60    // met by a 100 x 25 sized image.
61    ASPECT_RATIO = 2;
62
63    // Out-of-page (Interstitial) size that is not related to the slot it is
64    // served. This must be used with 1x1 size.
65    INTERSTITIAL = 3;
66
67    // Size is ignored. This must be used with 1x1
68    // size.
69    IGNORED = 4;
70
71    // Native size, which is a function of the how the client renders the
72    // creative. This must be used with 1x1 size.
73    NATIVE = 5;
74
75    // Fluid size. Automatically sizes the ad by filling the width of the
76    // enclosing column and adjusting the height as appropriate. This must be
77    // used with 1x1 size.
78    FLUID = 6;
79
80    // Audio size. Used with audio ads. This must be used with 1x1 size.
81    AUDIO = 7;
82  }
83}
84