google-analytics-data-v1beta 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -71,7 +71,8 @@ module Google
71
71
  extend ::Google::Protobuf::MessageExts::ClassMethods
72
72
  end
73
73
 
74
- # The dimensions and metrics currently accepted in reporting methods.
74
+ # The dimensions, metrics and comparisons currently accepted in reporting
75
+ # methods.
75
76
  # @!attribute [rw] name
76
77
  # @return [::String]
77
78
  # Resource name of this metadata.
@@ -556,6 +557,232 @@ module Google
556
557
  include ::Google::Protobuf::MessageExts
557
558
  extend ::Google::Protobuf::MessageExts::ClassMethods
558
559
  end
560
+
561
+ # A request to retrieve configuration metadata about a specific audience
562
+ # export.
563
+ # @!attribute [rw] name
564
+ # @return [::String]
565
+ # Required. The audience export resource name.
566
+ # Format: `properties/{property}/audienceExports/{audience_export}`
567
+ class GetAudienceExportRequest
568
+ include ::Google::Protobuf::MessageExts
569
+ extend ::Google::Protobuf::MessageExts::ClassMethods
570
+ end
571
+
572
+ # A request to list all audience exports for a property.
573
+ # @!attribute [rw] parent
574
+ # @return [::String]
575
+ # Required. All audience exports for this property will be listed in the
576
+ # response. Format: `properties/{property}`
577
+ # @!attribute [rw] page_size
578
+ # @return [::Integer]
579
+ # Optional. The maximum number of audience exports to return. The service may
580
+ # return fewer than this value. If unspecified, at most 200 audience exports
581
+ # will be returned. The maximum value is 1000 (higher values will be coerced
582
+ # to the maximum).
583
+ # @!attribute [rw] page_token
584
+ # @return [::String]
585
+ # Optional. A page token, received from a previous `ListAudienceExports`
586
+ # call. Provide this to retrieve the subsequent page.
587
+ #
588
+ # When paginating, all other parameters provided to `ListAudienceExports`
589
+ # must match the call that provided the page token.
590
+ class ListAudienceExportsRequest
591
+ include ::Google::Protobuf::MessageExts
592
+ extend ::Google::Protobuf::MessageExts::ClassMethods
593
+ end
594
+
595
+ # A list of all audience exports for a property.
596
+ # @!attribute [rw] audience_exports
597
+ # @return [::Array<::Google::Analytics::Data::V1beta::AudienceExport>]
598
+ # Each audience export for a property.
599
+ # @!attribute [rw] next_page_token
600
+ # @return [::String]
601
+ # A token, which can be sent as `page_token` to retrieve the next page.
602
+ # If this field is omitted, there are no subsequent pages.
603
+ class ListAudienceExportsResponse
604
+ include ::Google::Protobuf::MessageExts
605
+ extend ::Google::Protobuf::MessageExts::ClassMethods
606
+ end
607
+
608
+ # A request to create a new audience export.
609
+ # @!attribute [rw] parent
610
+ # @return [::String]
611
+ # Required. The parent resource where this audience export will be created.
612
+ # Format: `properties/{property}`
613
+ # @!attribute [rw] audience_export
614
+ # @return [::Google::Analytics::Data::V1beta::AudienceExport]
615
+ # Required. The audience export to create.
616
+ class CreateAudienceExportRequest
617
+ include ::Google::Protobuf::MessageExts
618
+ extend ::Google::Protobuf::MessageExts::ClassMethods
619
+ end
620
+
621
+ # An audience export is a list of users in an audience at the time of the
622
+ # list's creation. One audience may have multiple audience exports created for
623
+ # different days.
624
+ # @!attribute [r] name
625
+ # @return [::String]
626
+ # Output only. Identifier. The audience export resource name assigned during
627
+ # creation. This resource name identifies this `AudienceExport`.
628
+ #
629
+ # Format: `properties/{property}/audienceExports/{audience_export}`
630
+ # @!attribute [rw] audience
631
+ # @return [::String]
632
+ # Required. The audience resource name. This resource name identifies the
633
+ # audience being listed and is shared between the Analytics Data & Admin
634
+ # APIs.
635
+ #
636
+ # Format: `properties/{property}/audiences/{audience}`
637
+ # @!attribute [r] audience_display_name
638
+ # @return [::String]
639
+ # Output only. The descriptive display name for this audience. For example,
640
+ # "Purchasers".
641
+ # @!attribute [rw] dimensions
642
+ # @return [::Array<::Google::Analytics::Data::V1beta::AudienceDimension>]
643
+ # Required. The dimensions requested and displayed in the query response.
644
+ # @!attribute [r] state
645
+ # @return [::Google::Analytics::Data::V1beta::AudienceExport::State]
646
+ # Output only. The current state for this AudienceExport.
647
+ # @!attribute [r] begin_creating_time
648
+ # @return [::Google::Protobuf::Timestamp]
649
+ # Output only. The time when CreateAudienceExport was called and the
650
+ # AudienceExport began the `CREATING` state.
651
+ # @!attribute [r] creation_quota_tokens_charged
652
+ # @return [::Integer]
653
+ # Output only. The total quota tokens charged during creation of the
654
+ # AudienceExport. Because this token count is based on activity from the
655
+ # `CREATING` state, this tokens charged will be fixed once an AudienceExport
656
+ # enters the `ACTIVE` or `FAILED` states.
657
+ # @!attribute [r] row_count
658
+ # @return [::Integer]
659
+ # Output only. The total number of rows in the AudienceExport result.
660
+ # @!attribute [r] error_message
661
+ # @return [::String]
662
+ # Output only. Error message is populated when an audience export fails
663
+ # during creation. A common reason for such a failure is quota exhaustion.
664
+ # @!attribute [r] percentage_completed
665
+ # @return [::Float]
666
+ # Output only. The percentage completed for this audience export ranging
667
+ # between 0 to 100.
668
+ class AudienceExport
669
+ include ::Google::Protobuf::MessageExts
670
+ extend ::Google::Protobuf::MessageExts::ClassMethods
671
+
672
+ # The AudienceExport currently exists in this state.
673
+ module State
674
+ # Unspecified state will never be used.
675
+ STATE_UNSPECIFIED = 0
676
+
677
+ # The AudienceExport is currently creating and will be available in the
678
+ # future. Creating occurs immediately after the CreateAudienceExport call.
679
+ CREATING = 1
680
+
681
+ # The AudienceExport is fully created and ready for querying. An
682
+ # AudienceExport is updated to active asynchronously from a request; this
683
+ # occurs some time (for example 15 minutes) after the initial create call.
684
+ ACTIVE = 2
685
+
686
+ # The AudienceExport failed to be created. It is possible that
687
+ # re-requesting this audience export will succeed.
688
+ FAILED = 3
689
+ end
690
+ end
691
+
692
+ # This metadata is currently blank.
693
+ class AudienceExportMetadata
694
+ include ::Google::Protobuf::MessageExts
695
+ extend ::Google::Protobuf::MessageExts::ClassMethods
696
+ end
697
+
698
+ # A request to list users in an audience export.
699
+ # @!attribute [rw] name
700
+ # @return [::String]
701
+ # Required. The name of the audience export to retrieve users from.
702
+ # Format: `properties/{property}/audienceExports/{audience_export}`
703
+ # @!attribute [rw] offset
704
+ # @return [::Integer]
705
+ # Optional. The row count of the start row. The first row is counted as row
706
+ # 0.
707
+ #
708
+ # When paging, the first request does not specify offset; or equivalently,
709
+ # sets offset to 0; the first request returns the first `limit` of rows. The
710
+ # second request sets offset to the `limit` of the first request; the second
711
+ # request returns the second `limit` of rows.
712
+ #
713
+ # To learn more about this pagination parameter, see
714
+ # [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
715
+ # @!attribute [rw] limit
716
+ # @return [::Integer]
717
+ # Optional. The number of rows to return. If unspecified, 10,000 rows are
718
+ # returned. The API returns a maximum of 250,000 rows per request, no matter
719
+ # how many you ask for. `limit` must be positive.
720
+ #
721
+ # The API can also return fewer rows than the requested `limit`, if there
722
+ # aren't as many dimension values as the `limit`.
723
+ #
724
+ # To learn more about this pagination parameter, see
725
+ # [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
726
+ class QueryAudienceExportRequest
727
+ include ::Google::Protobuf::MessageExts
728
+ extend ::Google::Protobuf::MessageExts::ClassMethods
729
+ end
730
+
731
+ # A list of users in an audience export.
732
+ # @!attribute [rw] audience_export
733
+ # @return [::Google::Analytics::Data::V1beta::AudienceExport]
734
+ # Configuration data about AudienceExport being queried. Returned to help
735
+ # interpret the audience rows in this response. For example, the dimensions
736
+ # in this AudienceExport correspond to the columns in the AudienceRows.
737
+ # @!attribute [rw] audience_rows
738
+ # @return [::Array<::Google::Analytics::Data::V1beta::AudienceRow>]
739
+ # Rows for each user in an audience export. The number of rows in this
740
+ # response will be less than or equal to request's page size.
741
+ # @!attribute [rw] row_count
742
+ # @return [::Integer]
743
+ # The total number of rows in the AudienceExport result. `rowCount` is
744
+ # independent of the number of rows returned in the response, the `limit`
745
+ # request parameter, and the `offset` request parameter. For example if a
746
+ # query returns 175 rows and includes `limit` of 50 in the API request, the
747
+ # response will contain `rowCount` of 175 but only 50 rows.
748
+ #
749
+ # To learn more about this pagination parameter, see
750
+ # [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
751
+ class QueryAudienceExportResponse
752
+ include ::Google::Protobuf::MessageExts
753
+ extend ::Google::Protobuf::MessageExts::ClassMethods
754
+ end
755
+
756
+ # Dimension value attributes for the audience user row.
757
+ # @!attribute [rw] dimension_values
758
+ # @return [::Array<::Google::Analytics::Data::V1beta::AudienceDimensionValue>]
759
+ # Each dimension value attribute for an audience user. One dimension value
760
+ # will be added for each dimension column requested.
761
+ class AudienceRow
762
+ include ::Google::Protobuf::MessageExts
763
+ extend ::Google::Protobuf::MessageExts::ClassMethods
764
+ end
765
+
766
+ # An audience dimension is a user attribute. Specific user attributed are
767
+ # requested and then later returned in the `QueryAudienceExportResponse`.
768
+ # @!attribute [rw] dimension_name
769
+ # @return [::String]
770
+ # Optional. The API name of the dimension. See the [API
771
+ # Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions)
772
+ # for the list of dimension names.
773
+ class AudienceDimension
774
+ include ::Google::Protobuf::MessageExts
775
+ extend ::Google::Protobuf::MessageExts::ClassMethods
776
+ end
777
+
778
+ # The value of a dimension.
779
+ # @!attribute [rw] value
780
+ # @return [::String]
781
+ # Value as a string if the dimension type is a string.
782
+ class AudienceDimensionValue
783
+ include ::Google::Protobuf::MessageExts
784
+ extend ::Google::Protobuf::MessageExts::ClassMethods
785
+ end
559
786
  end
560
787
  end
561
788
  end
@@ -88,7 +88,16 @@ module Google
88
88
  # @return [::String]
89
89
  # The name of the dimension. See the [API
90
90
  # Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
91
- # for the list of dimension names.
91
+ # for the list of dimension names supported by core reporting methods such
92
+ # as `runReport` and `batchRunReports`. See
93
+ # [Realtime
94
+ # Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions)
95
+ # for the list of dimension names supported by the `runRealtimeReport`
96
+ # method. See
97
+ # [Funnel
98
+ # Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions)
99
+ # for the list of dimension names supported by the `runFunnelReport`
100
+ # method.
92
101
  #
93
102
  # If `dimensionExpression` is specified, `name` can be any string that you
94
103
  # would like within the allowed character set. For example if a
@@ -162,7 +171,16 @@ module Google
162
171
  # @return [::String]
163
172
  # The name of the metric. See the [API
164
173
  # Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
165
- # for the list of metric names.
174
+ # for the list of metric names supported by core reporting methods such
175
+ # as `runReport` and `batchRunReports`. See
176
+ # [Realtime
177
+ # Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics)
178
+ # for the list of metric names supported by the `runRealtimeReport`
179
+ # method. See
180
+ # [Funnel
181
+ # Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics)
182
+ # for the list of metric names supported by the `runFunnelReport`
183
+ # method.
166
184
  #
167
185
  # If `expression` is specified, `name` can be any string that you would like
168
186
  # within the allowed character set. For example if `expression` is
@@ -667,9 +685,17 @@ module Google
667
685
  # possible for a request to be subject to thresholding thresholding and no
668
686
  # data is absent from the report, and this happens when all data is above the
669
687
  # thresholds. To learn more, see [Data
670
- # thresholds](https://support.google.com/analytics/answer/9383630) and [About
671
- # Demographics and
672
- # Interests](https://support.google.com/analytics/answer/2799357).
688
+ # thresholds](https://support.google.com/analytics/answer/9383630).
689
+ # @!attribute [rw] sampling_metadatas
690
+ # @return [::Array<::Google::Analytics::Data::V1beta::SamplingMetadata>]
691
+ # If this report results is
692
+ # [sampled](https://support.google.com/analytics/answer/13331292), this
693
+ # describes the percentage of events used in this report. One
694
+ # `samplingMetadatas` is populated for each date range. Each
695
+ # `samplingMetadatas` corresponds to a date range in order that date ranges
696
+ # were specified in the request.
697
+ #
698
+ # However if the results are not sampled, this field will not be defined.
673
699
  class ResponseMetaData
674
700
  include ::Google::Protobuf::MessageExts
675
701
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -701,6 +727,30 @@ module Google
701
727
  end
702
728
  end
703
729
 
730
+ # If this report results is
731
+ # [sampled](https://support.google.com/analytics/answer/13331292), this
732
+ # describes the percentage of events used in this report. Sampling is the
733
+ # practice of analyzing a subset of all data in order to uncover the meaningful
734
+ # information in the larger data set.
735
+ # @!attribute [rw] samples_read_count
736
+ # @return [::Integer]
737
+ # The total number of events read in this sampled report for a date range.
738
+ # This is the size of the subset this property's data that was analyzed in
739
+ # this report.
740
+ # @!attribute [rw] sampling_space_size
741
+ # @return [::Integer]
742
+ # The total number of events present in this property's data that could
743
+ # have been analyzed in this report for a date range. Sampling
744
+ # uncovers the meaningful information about the larger data set, and this
745
+ # is the size of the larger data set.
746
+ #
747
+ # To calculate the percentage of available data that was used in this
748
+ # report, compute `samplesReadCount/samplingSpaceSize`.
749
+ class SamplingMetadata
750
+ include ::Google::Protobuf::MessageExts
751
+ extend ::Google::Protobuf::MessageExts::ClassMethods
752
+ end
753
+
704
754
  # Describes a dimension column in the report. Dimensions requested in a report
705
755
  # produce column entries within rows and DimensionHeaders. However, dimensions
706
756
  # used exclusively within filters or expressions do not produce columns in a
@@ -304,6 +304,19 @@ module Google
304
304
  # seconds: 360 # 6 minutes
305
305
  # total_poll_timeout:
306
306
  # seconds: 54000 # 90 minutes
307
+ # @!attribute [rw] auto_populated_fields
308
+ # @return [::Array<::String>]
309
+ # List of top-level fields of the request message, that should be
310
+ # automatically populated by the client libraries based on their
311
+ # (google.api.field_info).format. Currently supported format: UUID4.
312
+ #
313
+ # Example of a YAML configuration:
314
+ #
315
+ # publishing:
316
+ # method_settings:
317
+ # - selector: google.example.v1.ExampleService.CreateExample
318
+ # auto_populated_fields:
319
+ # - request_id
307
320
  class MethodSettings
308
321
  include ::Google::Protobuf::MessageExts
309
322
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -0,0 +1,164 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Longrunning
22
+ # This resource represents a long-running operation that is the result of a
23
+ # network API call.
24
+ # @!attribute [rw] name
25
+ # @return [::String]
26
+ # The server-assigned name, which is only unique within the same service that
27
+ # originally returns it. If you use the default HTTP mapping, the
28
+ # `name` should be a resource name ending with `operations/{unique_id}`.
29
+ # @!attribute [rw] metadata
30
+ # @return [::Google::Protobuf::Any]
31
+ # Service-specific metadata associated with the operation. It typically
32
+ # contains progress information and common metadata such as create time.
33
+ # Some services might not provide such metadata. Any method that returns a
34
+ # long-running operation should document the metadata type, if any.
35
+ # @!attribute [rw] done
36
+ # @return [::Boolean]
37
+ # If the value is `false`, it means the operation is still in progress.
38
+ # If `true`, the operation is completed, and either `error` or `response` is
39
+ # available.
40
+ # @!attribute [rw] error
41
+ # @return [::Google::Rpc::Status]
42
+ # The error result of the operation in case of failure or cancellation.
43
+ # @!attribute [rw] response
44
+ # @return [::Google::Protobuf::Any]
45
+ # The normal response of the operation in case of success. If the original
46
+ # method returns no data on success, such as `Delete`, the response is
47
+ # `google.protobuf.Empty`. If the original method is standard
48
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
49
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
50
+ # is the original method name. For example, if the original method name
51
+ # is `TakeSnapshot()`, the inferred response type is
52
+ # `TakeSnapshotResponse`.
53
+ class Operation
54
+ include ::Google::Protobuf::MessageExts
55
+ extend ::Google::Protobuf::MessageExts::ClassMethods
56
+ end
57
+
58
+ # The request message for Operations.GetOperation.
59
+ # @!attribute [rw] name
60
+ # @return [::String]
61
+ # The name of the operation resource.
62
+ class GetOperationRequest
63
+ include ::Google::Protobuf::MessageExts
64
+ extend ::Google::Protobuf::MessageExts::ClassMethods
65
+ end
66
+
67
+ # The request message for Operations.ListOperations.
68
+ # @!attribute [rw] name
69
+ # @return [::String]
70
+ # The name of the operation's parent resource.
71
+ # @!attribute [rw] filter
72
+ # @return [::String]
73
+ # The standard list filter.
74
+ # @!attribute [rw] page_size
75
+ # @return [::Integer]
76
+ # The standard list page size.
77
+ # @!attribute [rw] page_token
78
+ # @return [::String]
79
+ # The standard list page token.
80
+ class ListOperationsRequest
81
+ include ::Google::Protobuf::MessageExts
82
+ extend ::Google::Protobuf::MessageExts::ClassMethods
83
+ end
84
+
85
+ # The response message for Operations.ListOperations.
86
+ # @!attribute [rw] operations
87
+ # @return [::Array<::Google::Longrunning::Operation>]
88
+ # A list of operations that matches the specified filter in the request.
89
+ # @!attribute [rw] next_page_token
90
+ # @return [::String]
91
+ # The standard List next-page token.
92
+ class ListOperationsResponse
93
+ include ::Google::Protobuf::MessageExts
94
+ extend ::Google::Protobuf::MessageExts::ClassMethods
95
+ end
96
+
97
+ # The request message for Operations.CancelOperation.
98
+ # @!attribute [rw] name
99
+ # @return [::String]
100
+ # The name of the operation resource to be cancelled.
101
+ class CancelOperationRequest
102
+ include ::Google::Protobuf::MessageExts
103
+ extend ::Google::Protobuf::MessageExts::ClassMethods
104
+ end
105
+
106
+ # The request message for Operations.DeleteOperation.
107
+ # @!attribute [rw] name
108
+ # @return [::String]
109
+ # The name of the operation resource to be deleted.
110
+ class DeleteOperationRequest
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+
115
+ # The request message for Operations.WaitOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to wait on.
119
+ # @!attribute [rw] timeout
120
+ # @return [::Google::Protobuf::Duration]
121
+ # The maximum duration to wait before timing out. If left blank, the wait
122
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
123
+ # If RPC context deadline is also specified, the shorter one will be used.
124
+ class WaitOperationRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
129
+ # A message representing the message types used by a long-running operation.
130
+ #
131
+ # Example:
132
+ #
133
+ # rpc LongRunningRecognize(LongRunningRecognizeRequest)
134
+ # returns (google.longrunning.Operation) {
135
+ # option (google.longrunning.operation_info) = {
136
+ # response_type: "LongRunningRecognizeResponse"
137
+ # metadata_type: "LongRunningRecognizeMetadata"
138
+ # };
139
+ # }
140
+ # @!attribute [rw] response_type
141
+ # @return [::String]
142
+ # Required. The message name of the primary return type for this
143
+ # long-running operation.
144
+ # This type will be used to deserialize the LRO's response.
145
+ #
146
+ # If the response is in a different package from the rpc, a fully-qualified
147
+ # message name must be used (e.g. `google.protobuf.Struct`).
148
+ #
149
+ # Note: Altering this value constitutes a breaking change.
150
+ # @!attribute [rw] metadata_type
151
+ # @return [::String]
152
+ # Required. The message name of the metadata type for this long-running
153
+ # operation.
154
+ #
155
+ # If the response is in a different package from the rpc, a fully-qualified
156
+ # message name must be used (e.g. `google.protobuf.Struct`).
157
+ #
158
+ # Note: Altering this value constitutes a breaking change.
159
+ class OperationInfo
160
+ include ::Google::Protobuf::MessageExts
161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
162
+ end
163
+ end
164
+ end
@@ -0,0 +1,144 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Protobuf
22
+ # `Any` contains an arbitrary serialized protocol buffer message along with a
23
+ # URL that describes the type of the serialized message.
24
+ #
25
+ # Protobuf library provides support to pack/unpack Any values in the form
26
+ # of utility functions or additional generated methods of the Any type.
27
+ #
28
+ # Example 1: Pack and unpack a message in C++.
29
+ #
30
+ # Foo foo = ...;
31
+ # Any any;
32
+ # any.PackFrom(foo);
33
+ # ...
34
+ # if (any.UnpackTo(&foo)) {
35
+ # ...
36
+ # }
37
+ #
38
+ # Example 2: Pack and unpack a message in Java.
39
+ #
40
+ # Foo foo = ...;
41
+ # Any any = Any.pack(foo);
42
+ # ...
43
+ # if (any.is(Foo.class)) {
44
+ # foo = any.unpack(Foo.class);
45
+ # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
50
+ #
51
+ # Example 3: Pack and unpack a message in Python.
52
+ #
53
+ # foo = Foo(...)
54
+ # any = Any()
55
+ # any.Pack(foo)
56
+ # ...
57
+ # if any.Is(Foo.DESCRIPTOR):
58
+ # any.Unpack(foo)
59
+ # ...
60
+ #
61
+ # Example 4: Pack and unpack a message in Go
62
+ #
63
+ # foo := &pb.Foo{...}
64
+ # any, err := anypb.New(foo)
65
+ # if err != nil {
66
+ # ...
67
+ # }
68
+ # ...
69
+ # foo := &pb.Foo{}
70
+ # if err := any.UnmarshalTo(foo); err != nil {
71
+ # ...
72
+ # }
73
+ #
74
+ # The pack methods provided by protobuf library will by default use
75
+ # 'type.googleapis.com/full.type.name' as the type URL and the unpack
76
+ # methods only use the fully qualified type name after the last '/'
77
+ # in the type URL, for example "foo.bar.com/x/y.z" will yield type
78
+ # name "y.z".
79
+ #
80
+ # JSON
81
+ # ====
82
+ # The JSON representation of an `Any` value uses the regular
83
+ # representation of the deserialized, embedded message, with an
84
+ # additional field `@type` which contains the type URL. Example:
85
+ #
86
+ # package google.profile;
87
+ # message Person {
88
+ # string first_name = 1;
89
+ # string last_name = 2;
90
+ # }
91
+ #
92
+ # {
93
+ # "@type": "type.googleapis.com/google.profile.Person",
94
+ # "firstName": <string>,
95
+ # "lastName": <string>
96
+ # }
97
+ #
98
+ # If the embedded message type is well-known and has a custom JSON
99
+ # representation, that representation will be embedded adding a field
100
+ # `value` which holds the custom JSON in addition to the `@type`
101
+ # field. Example (for message [google.protobuf.Duration][]):
102
+ #
103
+ # {
104
+ # "@type": "type.googleapis.com/google.protobuf.Duration",
105
+ # "value": "1.212s"
106
+ # }
107
+ # @!attribute [rw] type_url
108
+ # @return [::String]
109
+ # A URL/resource name that uniquely identifies the type of the serialized
110
+ # protocol buffer message. This string must contain at least
111
+ # one "/" character. The last segment of the URL's path must represent
112
+ # the fully qualified name of the type (as in
113
+ # `path/google.protobuf.Duration`). The name should be in a canonical form
114
+ # (e.g., leading "." is not accepted).
115
+ #
116
+ # In practice, teams usually precompile into the binary all types that they
117
+ # expect it to use in the context of Any. However, for URLs which use the
118
+ # scheme `http`, `https`, or no scheme, one can optionally set up a type
119
+ # server that maps type URLs to message definitions as follows:
120
+ #
121
+ # * If no scheme is provided, `https` is assumed.
122
+ # * An HTTP GET on the URL must yield a [google.protobuf.Type][]
123
+ # value in binary format, or produce an error.
124
+ # * Applications are allowed to cache lookup results based on the
125
+ # URL, or have them precompiled into a binary to avoid any
126
+ # lookup. Therefore, binary compatibility needs to be preserved
127
+ # on changes to types. (Use versioned type names to manage
128
+ # breaking changes.)
129
+ #
130
+ # Note: this functionality is not currently available in the official
131
+ # protobuf release, and it is not used for type URLs beginning with
132
+ # type.googleapis.com.
133
+ #
134
+ # Schemes other than `http`, `https` (or the empty scheme) might be
135
+ # used with implementation specific semantics.
136
+ # @!attribute [rw] value
137
+ # @return [::String]
138
+ # Must be a valid serialized protocol buffer of the above specified type.
139
+ class Any
140
+ include ::Google::Protobuf::MessageExts
141
+ extend ::Google::Protobuf::MessageExts::ClassMethods
142
+ end
143
+ end
144
+ end