google-ads-googleads 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +5 -5
  2. data/ChangeLog +3 -0
  3. data/lib/google/ads/googleads/path_lookup_util.rb +29 -0
  4. data/lib/google/ads/googleads/proto_lookup_util.rb +91 -10
  5. data/lib/google/ads/googleads/v0/common/{ad_pb.rb → ad_type_infos_pb.rb} +4 -22
  6. data/lib/google/ads/googleads/v0/common/criteria_pb.rb +37 -3
  7. data/lib/google/ads/googleads/v0/common/metrics_pb.rb +8 -8
  8. data/lib/google/ads/googleads/v0/common/policy_pb.rb +57 -0
  9. data/lib/google/ads/googleads/v0/enums/ad_group_type_pb.rb +2 -0
  10. data/lib/google/ads/googleads/v0/enums/ad_network_type_pb.rb +1 -0
  11. data/lib/google/ads/googleads/v0/enums/ad_type_pb.rb +1 -0
  12. data/lib/google/ads/googleads/v0/enums/advertising_channel_sub_type_pb.rb +3 -0
  13. data/lib/google/ads/googleads/v0/enums/advertising_channel_type_pb.rb +2 -0
  14. data/lib/google/ads/googleads/v0/enums/bid_modifier_source_pb.rb +28 -0
  15. data/lib/google/ads/googleads/v0/enums/campaign_group_status_pb.rb +28 -0
  16. data/lib/google/ads/googleads/v0/enums/campaign_shared_set_status_pb.rb +28 -0
  17. data/lib/google/ads/googleads/v0/enums/criterion_type_pb.rb +2 -1
  18. data/lib/google/ads/googleads/v0/enums/device_pb.rb +1 -0
  19. data/lib/google/ads/googleads/v0/enums/hotel_date_selection_type_pb.rb +28 -0
  20. data/lib/google/ads/googleads/v0/enums/interaction_type_pb.rb +27 -0
  21. data/lib/google/ads/googleads/v0/enums/minute_of_hour_pb.rb +30 -0
  22. data/lib/google/ads/googleads/v0/enums/month_of_year_pb.rb +38 -0
  23. data/lib/google/ads/googleads/v0/enums/policy_topic_entry_type_pb.rb +31 -0
  24. data/lib/google/ads/googleads/v0/enums/policy_topic_evidence_destination_mismatch_url_type_pb.rb +31 -0
  25. data/lib/google/ads/googleads/v0/enums/product_condition_pb.rb +30 -0
  26. data/lib/google/ads/googleads/v0/enums/product_type_level_pb.rb +31 -0
  27. data/lib/google/ads/googleads/v0/enums/recommendation_type_pb.rb +5 -0
  28. data/lib/google/ads/googleads/v0/enums/shared_set_status_pb.rb +28 -0
  29. data/lib/google/ads/googleads/v0/enums/shared_set_type_pb.rb +28 -0
  30. data/lib/google/ads/googleads/v0/enums/slot_pb.rb +1 -0
  31. data/lib/google/ads/googleads/v0/errors/authentication_error_pb.rb +2 -0
  32. data/lib/google/ads/googleads/v0/errors/authorization_error_pb.rb +2 -0
  33. data/lib/google/ads/googleads/v0/errors/campaign_criterion_error_pb.rb +1 -0
  34. data/lib/google/ads/googleads/v0/errors/campaign_error_pb.rb +1 -2
  35. data/lib/google/ads/googleads/v0/errors/campaign_group_error_pb.rb +29 -0
  36. data/lib/google/ads/googleads/v0/errors/campaign_shared_set_error_pb.rb +27 -0
  37. data/lib/google/ads/googleads/v0/errors/context_error_pb.rb +1 -0
  38. data/lib/google/ads/googleads/v0/errors/database_error_pb.rb +27 -0
  39. data/lib/google/ads/googleads/v0/errors/enum_error_pb.rb +27 -0
  40. data/lib/google/ads/googleads/v0/errors/errors_pb.rb +21 -0
  41. data/lib/google/ads/googleads/v0/errors/header_error_pb.rb +27 -0
  42. data/lib/google/ads/googleads/v0/errors/mutate_error_pb.rb +1 -0
  43. data/lib/google/ads/googleads/v0/errors/policy_finding_error_pb.rb +27 -0
  44. data/lib/google/ads/googleads/v0/errors/query_error_pb.rb +1 -0
  45. data/lib/google/ads/googleads/v0/errors/quota_error_pb.rb +1 -0
  46. data/lib/google/ads/googleads/v0/errors/recommendation_error_pb.rb +1 -0
  47. data/lib/google/ads/googleads/v0/errors/shared_criterion_error_pb.rb +27 -0
  48. data/lib/google/ads/googleads/v0/errors/shared_set_error_pb.rb +30 -0
  49. data/lib/google/ads/googleads/v0/resources/ad_group_ad_pb.rb +2 -2
  50. data/lib/google/ads/googleads/v0/resources/ad_group_bid_modifier_pb.rb +4 -0
  51. data/lib/google/ads/googleads/v0/resources/ad_pb.rb +42 -0
  52. data/lib/google/ads/googleads/v0/resources/campaign_bid_modifier_pb.rb +30 -0
  53. data/lib/google/ads/googleads/v0/resources/campaign_criterion_pb.rb +2 -1
  54. data/lib/google/ads/googleads/v0/resources/campaign_group_pb.rb +27 -0
  55. data/lib/google/ads/googleads/v0/resources/campaign_pb.rb +9 -0
  56. data/lib/google/ads/googleads/v0/resources/campaign_shared_set_pb.rb +27 -0
  57. data/lib/google/ads/googleads/v0/resources/recommendation_pb.rb +25 -2
  58. data/lib/google/ads/googleads/v0/resources/shared_criterion_pb.rb +31 -0
  59. data/lib/google/ads/googleads/v0/resources/shared_set_pb.rb +31 -0
  60. data/lib/google/ads/googleads/v0/services.rb +1163 -0
  61. data/lib/google/ads/googleads/v0/services/ad_group_ad_service_client.rb +4 -4
  62. data/lib/google/ads/googleads/v0/services/ad_group_ad_service_services_pb.rb +2 -3
  63. data/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_client.rb +4 -4
  64. data/lib/google/ads/googleads/v0/services/ad_group_bid_modifier_service_services_pb.rb +2 -3
  65. data/lib/google/ads/googleads/v0/services/ad_group_criterion_service_client.rb +4 -4
  66. data/lib/google/ads/googleads/v0/services/ad_group_criterion_service_services_pb.rb +2 -3
  67. data/lib/google/ads/googleads/v0/services/ad_group_service_client.rb +4 -4
  68. data/lib/google/ads/googleads/v0/services/ad_group_service_services_pb.rb +2 -3
  69. data/lib/google/ads/googleads/v0/services/bidding_strategy_service_client.rb +4 -4
  70. data/lib/google/ads/googleads/v0/services/bidding_strategy_service_services_pb.rb +2 -3
  71. data/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_client.rb +268 -0
  72. data/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_client_config.json +36 -0
  73. data/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_pb.rb +47 -0
  74. data/lib/google/ads/googleads/v0/services/campaign_bid_modifier_service_services_pb.rb +51 -0
  75. data/lib/google/ads/googleads/v0/services/campaign_budget_service_client.rb +4 -4
  76. data/lib/google/ads/googleads/v0/services/campaign_budget_service_services_pb.rb +2 -3
  77. data/lib/google/ads/googleads/v0/services/campaign_criterion_service_client.rb +4 -4
  78. data/lib/google/ads/googleads/v0/services/campaign_criterion_service_services_pb.rb +2 -3
  79. data/lib/google/ads/googleads/v0/services/campaign_group_service_client.rb +268 -0
  80. data/lib/google/ads/googleads/v0/services/campaign_group_service_client_config.json +36 -0
  81. data/lib/google/ads/googleads/v0/services/campaign_group_service_pb.rb +47 -0
  82. data/lib/google/ads/googleads/v0/services/campaign_group_service_services_pb.rb +51 -0
  83. data/lib/google/ads/googleads/v0/services/campaign_service_client.rb +4 -4
  84. data/lib/google/ads/googleads/v0/services/campaign_service_services_pb.rb +2 -3
  85. data/lib/google/ads/googleads/v0/services/campaign_shared_set_service_client.rb +267 -0
  86. data/lib/google/ads/googleads/v0/services/campaign_shared_set_service_client_config.json +36 -0
  87. data/lib/google/ads/googleads/v0/services/campaign_shared_set_service_pb.rb +44 -0
  88. data/lib/google/ads/googleads/v0/services/campaign_shared_set_service_services_pb.rb +50 -0
  89. data/lib/google/ads/googleads/v0/services/credentials.rb +10 -2
  90. data/lib/google/ads/googleads/v0/services/customer_service_client.rb +2 -2
  91. data/lib/google/ads/googleads/v0/services/customer_service_services_pb.rb +2 -3
  92. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/ad_type_infos.rb +120 -0
  93. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/bidding.rb +176 -0
  94. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/criteria.rb +225 -0
  95. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/custom_parameter.rb +33 -0
  96. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/common/metrics.rb +208 -0
  97. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad.rb +79 -0
  98. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group.rb +87 -0
  99. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_ad.rb +43 -0
  100. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_bid_modifier.rb +70 -0
  101. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/ad_group_criterion.rb +148 -0
  102. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/bidding_strategy.rb +73 -0
  103. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign.rb +223 -0
  104. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_bid_modifier.rb +46 -0
  105. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_budget.rb +88 -0
  106. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_criterion.rb +66 -0
  107. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_group.rb +49 -0
  108. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/campaign_shared_set.rb +47 -0
  109. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/customer.rb +57 -0
  110. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/geo_target_constant.rb +44 -0
  111. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/google_ads_field.rb +89 -0
  112. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/keyword_view.rb +32 -0
  113. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/recommendation.rb +223 -0
  114. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_criterion.rb +46 -0
  115. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/resources/shared_set.rb +56 -0
  116. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_ad_service.rb +68 -0
  117. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_bid_modifier_service.rb +71 -0
  118. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_criterion_service.rb +69 -0
  119. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/ad_group_service.rb +68 -0
  120. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/bidding_strategy_service.rb +70 -0
  121. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_bid_modifier_service.rb +71 -0
  122. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_budget_service.rb +69 -0
  123. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_criterion_service.rb +69 -0
  124. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_group_service.rb +70 -0
  125. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_service.rb +69 -0
  126. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/campaign_shared_set_service.rb +64 -0
  127. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/customer_service.rb +29 -0
  128. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/geo_target_constant_service.rb +29 -0
  129. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_field_service.rb +59 -0
  130. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/google_ads_service.rb +156 -0
  131. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/keyword_view_service.rb +29 -0
  132. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/recommendation_service.rb +112 -0
  133. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_criterion_service.rb +64 -0
  134. data/lib/google/ads/googleads/v0/services/doc/google/ads/googleads/v0/services/shared_set_service.rb +69 -0
  135. data/lib/google/ads/googleads/v0/services/doc/google/protobuf/any.rb +124 -0
  136. data/lib/google/ads/googleads/v0/services/doc/google/protobuf/field_mask.rb +223 -0
  137. data/lib/google/ads/googleads/v0/services/doc/google/protobuf/wrappers.rb +89 -0
  138. data/lib/google/ads/googleads/v0/services/doc/google/rpc/status.rb +83 -0
  139. data/lib/google/ads/googleads/v0/services/doc/overview.rb +82 -0
  140. data/lib/google/ads/googleads/v0/services/geo_target_constant_service_client.rb +2 -2
  141. data/lib/google/ads/googleads/v0/services/geo_target_constant_service_services_pb.rb +2 -3
  142. data/lib/google/ads/googleads/v0/services/google_ads_field_service_client.rb +4 -4
  143. data/lib/google/ads/googleads/v0/services/google_ads_field_service_services_pb.rb +2 -3
  144. data/lib/google/ads/googleads/v0/services/google_ads_service_client.rb +2 -2
  145. data/lib/google/ads/googleads/v0/services/google_ads_service_pb.rb +12 -0
  146. data/lib/google/ads/googleads/v0/services/google_ads_service_services_pb.rb +2 -3
  147. data/lib/google/ads/googleads/v0/services/keyword_view_service_client.rb +2 -2
  148. data/lib/google/ads/googleads/v0/services/keyword_view_service_services_pb.rb +2 -3
  149. data/lib/google/ads/googleads/v0/services/recommendation_service_client.rb +4 -4
  150. data/lib/google/ads/googleads/v0/services/recommendation_service_pb.rb +2 -2
  151. data/lib/google/ads/googleads/v0/services/recommendation_service_services_pb.rb +2 -3
  152. data/lib/google/ads/googleads/v0/services/shared_criterion_service_client.rb +267 -0
  153. data/lib/google/ads/googleads/v0/services/shared_criterion_service_client_config.json +36 -0
  154. data/lib/google/ads/googleads/v0/services/shared_criterion_service_pb.rb +44 -0
  155. data/lib/google/ads/googleads/v0/services/shared_criterion_service_services_pb.rb +50 -0
  156. data/lib/google/ads/googleads/v0/services/shared_set_service_client.rb +267 -0
  157. data/lib/google/ads/googleads/v0/services/shared_set_service_client_config.json +36 -0
  158. data/lib/google/ads/googleads/v0/services/shared_set_service_pb.rb +47 -0
  159. data/lib/google/ads/googleads/v0/services/shared_set_service_services_pb.rb +50 -0
  160. data/lib/google/ads/googleads/version.rb +1 -1
  161. metadata +100 -4
@@ -0,0 +1,69 @@
1
+ # Copyright 2018 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
+ # https://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
+
15
+ module Google
16
+ module Ads
17
+ module Googleads
18
+ module V0
19
+ module Services
20
+ # Request message for {Google::Ads::Googleads::V0::Services::SharedSetService::GetSharedSet SharedSetService::GetSharedSet}.
21
+ # @!attribute [rw] resource_name
22
+ # @return [String]
23
+ # The resource name of the shared set to fetch.
24
+ class GetSharedSetRequest; end
25
+
26
+ # Request message for {Google::Ads::Googleads::V0::Services::SharedSetService::MutateSharedSets SharedSetService::MutateSharedSets}.
27
+ # @!attribute [rw] customer_id
28
+ # @return [String]
29
+ # The ID of the customer whose shared sets are being modified.
30
+ # @!attribute [rw] operations
31
+ # @return [Array<Google::Ads::Googleads::V0::Services::SharedSetOperation>]
32
+ # The list of operations to perform on individual shared sets.
33
+ class MutateSharedSetsRequest; end
34
+
35
+ # A single operation (create, update, remove) on an shared set.
36
+ # @!attribute [rw] update_mask
37
+ # @return [Google::Protobuf::FieldMask]
38
+ # FieldMask that determines which resource fields are modified in an update.
39
+ # @!attribute [rw] create
40
+ # @return [Google::Ads::Googleads::V0::Resources::SharedSet]
41
+ # Create operation: No resource name is expected for the new shared set.
42
+ # @!attribute [rw] update
43
+ # @return [Google::Ads::Googleads::V0::Resources::SharedSet]
44
+ # Update operation: The shared set is expected to have a valid resource
45
+ # name.
46
+ # @!attribute [rw] remove
47
+ # @return [String]
48
+ # Remove operation: A resource name for the removed shared set is expected,
49
+ # in this format:
50
+ #
51
+ # +customers/{customer_id}/sharedSets/{shared_set_id}+
52
+ class SharedSetOperation; end
53
+
54
+ # Response message for a shared set mutate.
55
+ # @!attribute [rw] results
56
+ # @return [Array<Google::Ads::Googleads::V0::Services::MutateSharedSetResult>]
57
+ # All results for the mutate.
58
+ class MutateSharedSetsResponse; end
59
+
60
+ # The result for the shared set mutate.
61
+ # @!attribute [rw] resource_name
62
+ # @return [String]
63
+ # Returned for successful operations.
64
+ class MutateSharedSetResult; end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,124 @@
1
+ # Copyright 2018 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
+ # https://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
+
15
+ module Google
16
+ module Protobuf
17
+ # +Any+ contains an arbitrary serialized protocol buffer message along with a
18
+ # URL that describes the type of the serialized message.
19
+ #
20
+ # Protobuf library provides support to pack/unpack Any values in the form
21
+ # of utility functions or additional generated methods of the Any type.
22
+ #
23
+ # Example 1: Pack and unpack a message in C++.
24
+ #
25
+ # Foo foo = ...;
26
+ # Any any;
27
+ # any.PackFrom(foo);
28
+ # ...
29
+ # if (any.UnpackTo(&foo)) {
30
+ # ...
31
+ # }
32
+ #
33
+ # Example 2: Pack and unpack a message in Java.
34
+ #
35
+ # Foo foo = ...;
36
+ # Any any = Any.pack(foo);
37
+ # ...
38
+ # if (any.is(Foo.class)) {
39
+ # foo = any.unpack(Foo.class);
40
+ # }
41
+ #
42
+ # Example 3: Pack and unpack a message in Python.
43
+ #
44
+ # foo = Foo(...)
45
+ # any = Any()
46
+ # any.Pack(foo)
47
+ # ...
48
+ # if any.Is(Foo.DESCRIPTOR):
49
+ # any.Unpack(foo)
50
+ # ...
51
+ #
52
+ # Example 4: Pack and unpack a message in Go
53
+ #
54
+ # foo := &pb.Foo{...}
55
+ # any, err := ptypes.MarshalAny(foo)
56
+ # ...
57
+ # foo := &pb.Foo{}
58
+ # if err := ptypes.UnmarshalAny(any, foo); err != nil {
59
+ # ...
60
+ # }
61
+ #
62
+ # The pack methods provided by protobuf library will by default use
63
+ # 'type.googleapis.com/full.type.name' as the type URL and the unpack
64
+ # methods only use the fully qualified type name after the last '/'
65
+ # in the type URL, for example "foo.bar.com/x/y.z" will yield type
66
+ # name "y.z".
67
+ #
68
+ #
69
+ # = JSON
70
+ #
71
+ # The JSON representation of an +Any+ value uses the regular
72
+ # representation of the deserialized, embedded message, with an
73
+ # additional field +@type+ which contains the type URL. Example:
74
+ #
75
+ # package google.profile;
76
+ # message Person {
77
+ # string first_name = 1;
78
+ # string last_name = 2;
79
+ # }
80
+ #
81
+ # {
82
+ # "@type": "type.googleapis.com/google.profile.Person",
83
+ # "firstName": <string>,
84
+ # "lastName": <string>
85
+ # }
86
+ #
87
+ # If the embedded message type is well-known and has a custom JSON
88
+ # representation, that representation will be embedded adding a field
89
+ # +value+ which holds the custom JSON in addition to the +@type+
90
+ # field. Example (for message {Google::Protobuf::Duration}):
91
+ #
92
+ # {
93
+ # "@type": "type.googleapis.com/google.protobuf.Duration",
94
+ # "value": "1.212s"
95
+ # }
96
+ # @!attribute [rw] type_url
97
+ # @return [String]
98
+ # A URL/resource name whose content describes the type of the
99
+ # serialized protocol buffer message.
100
+ #
101
+ # For URLs which use the scheme +http+, +https+, or no scheme, the
102
+ # following restrictions and interpretations apply:
103
+ #
104
+ # * If no scheme is provided, +https+ is assumed.
105
+ # * The last segment of the URL's path must represent the fully
106
+ # qualified name of the type (as in +path/google.protobuf.Duration+).
107
+ # The name should be in a canonical form (e.g., leading "." is
108
+ # not accepted).
109
+ # * An HTTP GET on the URL must yield a {Google::Protobuf::Type}
110
+ # value in binary format, or produce an error.
111
+ # * Applications are allowed to cache lookup results based on the
112
+ # URL, or have them precompiled into a binary to avoid any
113
+ # lookup. Therefore, binary compatibility needs to be preserved
114
+ # on changes to types. (Use versioned type names to manage
115
+ # breaking changes.)
116
+ #
117
+ # Schemes other than +http+, +https+ (or the empty scheme) might be
118
+ # used with implementation specific semantics.
119
+ # @!attribute [rw] value
120
+ # @return [String]
121
+ # Must be a valid serialized protocol buffer of the above specified type.
122
+ class Any; end
123
+ end
124
+ end
@@ -0,0 +1,223 @@
1
+ # Copyright 2018 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
+ # https://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
+
15
+ module Google
16
+ module Protobuf
17
+ # +FieldMask+ represents a set of symbolic field paths, for example:
18
+ #
19
+ # paths: "f.a"
20
+ # paths: "f.b.d"
21
+ #
22
+ # Here +f+ represents a field in some root message, +a+ and +b+
23
+ # fields in the message found in +f+, and +d+ a field found in the
24
+ # message in +f.b+.
25
+ #
26
+ # Field masks are used to specify a subset of fields that should be
27
+ # returned by a get operation or modified by an update operation.
28
+ # Field masks also have a custom JSON encoding (see below).
29
+ #
30
+ # = Field Masks in Projections
31
+ #
32
+ # When used in the context of a projection, a response message or
33
+ # sub-message is filtered by the API to only contain those fields as
34
+ # specified in the mask. For example, if the mask in the previous
35
+ # example is applied to a response message as follows:
36
+ #
37
+ # f {
38
+ # a : 22
39
+ # b {
40
+ # d : 1
41
+ # x : 2
42
+ # }
43
+ # y : 13
44
+ # }
45
+ # z: 8
46
+ #
47
+ # The result will not contain specific values for fields x,y and z
48
+ # (their value will be set to the default, and omitted in proto text
49
+ # output):
50
+ #
51
+ #
52
+ # f {
53
+ # a : 22
54
+ # b {
55
+ # d : 1
56
+ # }
57
+ # }
58
+ #
59
+ # A repeated field is not allowed except at the last position of a
60
+ # paths string.
61
+ #
62
+ # If a FieldMask object is not present in a get operation, the
63
+ # operation applies to all fields (as if a FieldMask of all fields
64
+ # had been specified).
65
+ #
66
+ # Note that a field mask does not necessarily apply to the
67
+ # top-level response message. In case of a REST get operation, the
68
+ # field mask applies directly to the response, but in case of a REST
69
+ # list operation, the mask instead applies to each individual message
70
+ # in the returned resource list. In case of a REST custom method,
71
+ # other definitions may be used. Where the mask applies will be
72
+ # clearly documented together with its declaration in the API. In
73
+ # any case, the effect on the returned resource/resources is required
74
+ # behavior for APIs.
75
+ #
76
+ # = Field Masks in Update Operations
77
+ #
78
+ # A field mask in update operations specifies which fields of the
79
+ # targeted resource are going to be updated. The API is required
80
+ # to only change the values of the fields as specified in the mask
81
+ # and leave the others untouched. If a resource is passed in to
82
+ # describe the updated values, the API ignores the values of all
83
+ # fields not covered by the mask.
84
+ #
85
+ # If a repeated field is specified for an update operation, the existing
86
+ # repeated values in the target resource will be overwritten by the new values.
87
+ # Note that a repeated field is only allowed in the last position of a +paths+
88
+ # string.
89
+ #
90
+ # If a sub-message is specified in the last position of the field mask for an
91
+ # update operation, then the existing sub-message in the target resource is
92
+ # overwritten. Given the target message:
93
+ #
94
+ # f {
95
+ # b {
96
+ # d : 1
97
+ # x : 2
98
+ # }
99
+ # c : 1
100
+ # }
101
+ #
102
+ # And an update message:
103
+ #
104
+ # f {
105
+ # b {
106
+ # d : 10
107
+ # }
108
+ # }
109
+ #
110
+ # then if the field mask is:
111
+ #
112
+ # paths: "f.b"
113
+ #
114
+ # then the result will be:
115
+ #
116
+ # f {
117
+ # b {
118
+ # d : 10
119
+ # }
120
+ # c : 1
121
+ # }
122
+ #
123
+ # However, if the update mask was:
124
+ #
125
+ # paths: "f.b.d"
126
+ #
127
+ # then the result would be:
128
+ #
129
+ # f {
130
+ # b {
131
+ # d : 10
132
+ # x : 2
133
+ # }
134
+ # c : 1
135
+ # }
136
+ #
137
+ # In order to reset a field's value to the default, the field must
138
+ # be in the mask and set to the default value in the provided resource.
139
+ # Hence, in order to reset all fields of a resource, provide a default
140
+ # instance of the resource and set all fields in the mask, or do
141
+ # not provide a mask as described below.
142
+ #
143
+ # If a field mask is not present on update, the operation applies to
144
+ # all fields (as if a field mask of all fields has been specified).
145
+ # Note that in the presence of schema evolution, this may mean that
146
+ # fields the client does not know and has therefore not filled into
147
+ # the request will be reset to their default. If this is unwanted
148
+ # behavior, a specific service may require a client to always specify
149
+ # a field mask, producing an error if not.
150
+ #
151
+ # As with get operations, the location of the resource which
152
+ # describes the updated values in the request message depends on the
153
+ # operation kind. In any case, the effect of the field mask is
154
+ # required to be honored by the API.
155
+ #
156
+ # == Considerations for HTTP REST
157
+ #
158
+ # The HTTP kind of an update operation which uses a field mask must
159
+ # be set to PATCH instead of PUT in order to satisfy HTTP semantics
160
+ # (PUT must only be used for full updates).
161
+ #
162
+ # = JSON Encoding of Field Masks
163
+ #
164
+ # In JSON, a field mask is encoded as a single string where paths are
165
+ # separated by a comma. Fields name in each path are converted
166
+ # to/from lower-camel naming conventions.
167
+ #
168
+ # As an example, consider the following message declarations:
169
+ #
170
+ # message Profile {
171
+ # User user = 1;
172
+ # Photo photo = 2;
173
+ # }
174
+ # message User {
175
+ # string display_name = 1;
176
+ # string address = 2;
177
+ # }
178
+ #
179
+ # In proto a field mask for +Profile+ may look as such:
180
+ #
181
+ # mask {
182
+ # paths: "user.display_name"
183
+ # paths: "photo"
184
+ # }
185
+ #
186
+ # In JSON, the same mask is represented as below:
187
+ #
188
+ # {
189
+ # mask: "user.displayName,photo"
190
+ # }
191
+ #
192
+ # = Field Masks and Oneof Fields
193
+ #
194
+ # Field masks treat fields in oneofs just as regular fields. Consider the
195
+ # following message:
196
+ #
197
+ # message SampleMessage {
198
+ # oneof test_oneof {
199
+ # string name = 4;
200
+ # SubMessage sub_message = 9;
201
+ # }
202
+ # }
203
+ #
204
+ # The field mask can be:
205
+ #
206
+ # mask {
207
+ # paths: "name"
208
+ # }
209
+ #
210
+ # Or:
211
+ #
212
+ # mask {
213
+ # paths: "sub_message"
214
+ # }
215
+ #
216
+ # Note that oneof type names ("test_oneof" in this case) cannot be used in
217
+ # paths.
218
+ # @!attribute [rw] paths
219
+ # @return [Array<String>]
220
+ # The set of field mask paths.
221
+ class FieldMask; end
222
+ end
223
+ end
@@ -0,0 +1,89 @@
1
+ # Copyright 2018 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
+ # https://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
+
15
+ module Google
16
+ module Protobuf
17
+ # Wrapper message for +double+.
18
+ #
19
+ # The JSON representation for +DoubleValue+ is JSON number.
20
+ # @!attribute [rw] value
21
+ # @return [Float]
22
+ # The double value.
23
+ class DoubleValue; end
24
+
25
+ # Wrapper message for +float+.
26
+ #
27
+ # The JSON representation for +FloatValue+ is JSON number.
28
+ # @!attribute [rw] value
29
+ # @return [Float]
30
+ # The float value.
31
+ class FloatValue; end
32
+
33
+ # Wrapper message for +int64+.
34
+ #
35
+ # The JSON representation for +Int64Value+ is JSON string.
36
+ # @!attribute [rw] value
37
+ # @return [Integer]
38
+ # The int64 value.
39
+ class Int64Value; end
40
+
41
+ # Wrapper message for +uint64+.
42
+ #
43
+ # The JSON representation for +UInt64Value+ is JSON string.
44
+ # @!attribute [rw] value
45
+ # @return [Integer]
46
+ # The uint64 value.
47
+ class UInt64Value; end
48
+
49
+ # Wrapper message for +int32+.
50
+ #
51
+ # The JSON representation for +Int32Value+ is JSON number.
52
+ # @!attribute [rw] value
53
+ # @return [Integer]
54
+ # The int32 value.
55
+ class Int32Value; end
56
+
57
+ # Wrapper message for +uint32+.
58
+ #
59
+ # The JSON representation for +UInt32Value+ is JSON number.
60
+ # @!attribute [rw] value
61
+ # @return [Integer]
62
+ # The uint32 value.
63
+ class UInt32Value; end
64
+
65
+ # Wrapper message for +bool+.
66
+ #
67
+ # The JSON representation for +BoolValue+ is JSON +true+ and +false+.
68
+ # @!attribute [rw] value
69
+ # @return [true, false]
70
+ # The bool value.
71
+ class BoolValue; end
72
+
73
+ # Wrapper message for +string+.
74
+ #
75
+ # The JSON representation for +StringValue+ is JSON string.
76
+ # @!attribute [rw] value
77
+ # @return [String]
78
+ # The string value.
79
+ class StringValue; end
80
+
81
+ # Wrapper message for +bytes+.
82
+ #
83
+ # The JSON representation for +BytesValue+ is JSON string.
84
+ # @!attribute [rw] value
85
+ # @return [String]
86
+ # The bytes value.
87
+ class BytesValue; end
88
+ end
89
+ end