google-cloud-data_catalog-v1 0.14.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/data_catalog/v1/data_catalog/client.rb +288 -54
  4. data/lib/google/cloud/data_catalog/v1/data_catalog/operations.rb +768 -0
  5. data/lib/google/cloud/data_catalog/v1/data_catalog/rest/client.rb +228 -54
  6. data/lib/google/cloud/data_catalog/v1/data_catalog/rest/operations.rb +792 -0
  7. data/lib/google/cloud/data_catalog/v1/data_catalog/rest/service_stub.rb +120 -0
  8. data/lib/google/cloud/data_catalog/v1/data_catalog/rest.rb +1 -0
  9. data/lib/google/cloud/data_catalog/v1/data_catalog.rb +1 -0
  10. data/lib/google/cloud/data_catalog/v1/policy_tag_manager/client.rb +6 -3
  11. data/lib/google/cloud/data_catalog/v1/policy_tag_manager/rest/client.rb +6 -3
  12. data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/client.rb +6 -4
  13. data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/rest/client.rb +6 -4
  14. data/lib/google/cloud/data_catalog/v1/version.rb +1 -1
  15. data/lib/google/cloud/datacatalog/v1/bigquery_pb.rb +24 -25
  16. data/lib/google/cloud/datacatalog/v1/common_pb.rb +26 -12
  17. data/lib/google/cloud/datacatalog/v1/data_source_pb.rb +24 -18
  18. data/lib/google/cloud/datacatalog/v1/datacatalog_pb.rb +55 -263
  19. data/lib/google/cloud/datacatalog/v1/datacatalog_services_pb.rb +33 -0
  20. data/lib/google/cloud/datacatalog/v1/dataplex_spec_pb.rb +25 -21
  21. data/lib/google/cloud/datacatalog/v1/dump_content_pb.rb +49 -0
  22. data/lib/google/cloud/datacatalog/v1/gcs_fileset_spec_pb.rb +25 -10
  23. data/lib/google/cloud/datacatalog/v1/physical_schema_pb.rb +24 -26
  24. data/lib/google/cloud/datacatalog/v1/policytagmanager_pb.rb +28 -66
  25. data/lib/google/cloud/datacatalog/v1/policytagmanagerserialization_pb.rb +25 -43
  26. data/lib/google/cloud/datacatalog/v1/schema_pb.rb +27 -11
  27. data/lib/google/cloud/datacatalog/v1/search_pb.rb +25 -21
  28. data/lib/google/cloud/datacatalog/v1/table_spec_pb.rb +24 -26
  29. data/lib/google/cloud/datacatalog/v1/tags_pb.rb +25 -59
  30. data/lib/google/cloud/datacatalog/v1/timestamps_pb.rb +25 -6
  31. data/lib/google/cloud/datacatalog/v1/usage_pb.rb +26 -11
  32. data/proto_docs/google/api/client.rb +67 -4
  33. data/proto_docs/google/cloud/datacatalog/v1/common.rb +25 -0
  34. data/proto_docs/google/cloud/datacatalog/v1/datacatalog.rb +367 -41
  35. data/proto_docs/google/cloud/datacatalog/v1/dump_content.rb +53 -0
  36. data/proto_docs/google/cloud/datacatalog/v1/gcs_fileset_spec.rb +2 -1
  37. data/proto_docs/google/cloud/datacatalog/v1/policytagmanager.rb +23 -2
  38. data/proto_docs/google/cloud/datacatalog/v1/policytagmanagerserialization.rb +6 -3
  39. data/proto_docs/google/cloud/datacatalog/v1/schema.rb +68 -3
  40. data/proto_docs/google/cloud/datacatalog/v1/search.rb +2 -2
  41. data/proto_docs/google/cloud/datacatalog/v1/table_spec.rb +5 -5
  42. data/proto_docs/google/cloud/datacatalog/v1/tags.rb +11 -8
  43. data/proto_docs/google/cloud/datacatalog/v1/usage.rb +30 -1
  44. data/proto_docs/google/longrunning/operations.rb +164 -0
  45. data/proto_docs/google/protobuf/any.rb +144 -0
  46. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  47. data/proto_docs/google/rpc/status.rb +48 -0
  48. metadata +11 -4
@@ -26,7 +26,8 @@ module Google
26
26
  # export.
27
27
  # @!attribute [rw] display_name
28
28
  # @return [::String]
29
- # Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
29
+ # Required. Display name of the taxonomy. At most 200 bytes when encoded in
30
+ # UTF-8.
30
31
  # @!attribute [rw] description
31
32
  # @return [::String]
32
33
  # Description of the serialized taxonomy. At most 2000 bytes when
@@ -83,7 +84,8 @@ module Google
83
84
  # {::Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client#import_taxonomies ImportTaxonomies}.
84
85
  # @!attribute [rw] parent
85
86
  # @return [::String]
86
- # Required. Resource name of project that the imported taxonomies will belong to.
87
+ # Required. Resource name of project that the imported taxonomies will belong
88
+ # to.
87
89
  # @!attribute [rw] inline_source
88
90
  # @return [::Google::Cloud::DataCatalog::V1::InlineSource]
89
91
  # Inline source taxonomy to import.
@@ -128,7 +130,8 @@ module Google
128
130
  # {::Google::Cloud::DataCatalog::V1::PolicyTagManagerSerialization::Client#export_taxonomies ExportTaxonomies}.
129
131
  # @!attribute [rw] parent
130
132
  # @return [::String]
131
- # Required. Resource name of the project that the exported taxonomies belong to.
133
+ # Required. Resource name of the project that the exported taxonomies belong
134
+ # to.
132
135
  # @!attribute [rw] taxonomies
133
136
  # @return [::Array<::String>]
134
137
  # Required. Resource names of the taxonomies to export.
@@ -54,17 +54,82 @@ module Google
54
54
  # bytes.
55
55
  # @!attribute [rw] mode
56
56
  # @return [::String]
57
- # Optional. A column's mode indicates whether values in this column are required,
58
- # nullable, or repeated.
57
+ # Optional. A column's mode indicates whether values in this column are
58
+ # required, nullable, or repeated.
59
59
  #
60
60
  # Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
61
61
  # Default mode is `NULLABLE`.
62
+ # @!attribute [rw] default_value
63
+ # @return [::String]
64
+ # Optional. Default value for the column.
65
+ # @!attribute [rw] ordinal_position
66
+ # @return [::Integer]
67
+ # Optional. Ordinal position
68
+ # @!attribute [rw] highest_indexing_type
69
+ # @return [::Google::Cloud::DataCatalog::V1::ColumnSchema::IndexingType]
70
+ # Optional. Most important inclusion of this column.
62
71
  # @!attribute [rw] subcolumns
63
72
  # @return [::Array<::Google::Cloud::DataCatalog::V1::ColumnSchema>]
64
- # Optional. Schema of sub-columns. A column can have zero or more sub-columns.
73
+ # Optional. Schema of sub-columns. A column can have zero or more
74
+ # sub-columns.
75
+ # @!attribute [rw] looker_column_spec
76
+ # @return [::Google::Cloud::DataCatalog::V1::ColumnSchema::LookerColumnSpec]
77
+ # Looker specific column info of this column.
78
+ # @!attribute [rw] gc_rule
79
+ # @return [::String]
80
+ # Optional. Garbage collection policy for the column or column family.
81
+ # Applies to systems like Cloud Bigtable.
65
82
  class ColumnSchema
66
83
  include ::Google::Protobuf::MessageExts
67
84
  extend ::Google::Protobuf::MessageExts::ClassMethods
85
+
86
+ # Column info specific to Looker System.
87
+ # @!attribute [rw] type
88
+ # @return [::Google::Cloud::DataCatalog::V1::ColumnSchema::LookerColumnSpec::LookerColumnType]
89
+ # Looker specific column type of this column.
90
+ class LookerColumnSpec
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
+
94
+ # Column type in Looker.
95
+ module LookerColumnType
96
+ # Unspecified.
97
+ LOOKER_COLUMN_TYPE_UNSPECIFIED = 0
98
+
99
+ # Dimension.
100
+ DIMENSION = 1
101
+
102
+ # Dimension group - parent for Dimension.
103
+ DIMENSION_GROUP = 2
104
+
105
+ # Filter.
106
+ FILTER = 3
107
+
108
+ # Measure.
109
+ MEASURE = 4
110
+
111
+ # Parameter.
112
+ PARAMETER = 5
113
+ end
114
+ end
115
+
116
+ # Specifies inclusion of the column in an index
117
+ module IndexingType
118
+ # Unspecified.
119
+ INDEXING_TYPE_UNSPECIFIED = 0
120
+
121
+ # Column not a part of an index.
122
+ INDEXING_TYPE_NONE = 1
123
+
124
+ # Column Part of non unique index.
125
+ INDEXING_TYPE_NON_UNIQUE = 2
126
+
127
+ # Column part of unique index.
128
+ INDEXING_TYPE_UNIQUE = 3
129
+
130
+ # Column part of the primary key.
131
+ INDEXING_TYPE_PRIMARY_KEY = 4
132
+ end
68
133
  end
69
134
  end
70
135
  end
@@ -61,8 +61,8 @@ module Google
61
61
  # The last modification timestamp of the entry in the source system.
62
62
  # @!attribute [r] integrated_system
63
63
  # @return [::Google::Cloud::DataCatalog::V1::IntegratedSystem]
64
- # Output only. The source system that Data Catalog automatically integrates with, such
65
- # as BigQuery, Cloud Pub/Sub, or Dataproc Metastore.
64
+ # Output only. The source system that Data Catalog automatically integrates
65
+ # with, such as BigQuery, Cloud Pub/Sub, or Dataproc Metastore.
66
66
  # @!attribute [rw] user_specified_system
67
67
  # @return [::String]
68
68
  # Custom source system that you can manually integrate Data Catalog with.
@@ -50,9 +50,9 @@ module Google
50
50
  # Normal BigQuery table specification.
51
51
  # @!attribute [r] grouped_entry
52
52
  # @return [::String]
53
- # Output only. If the table is date-sharded, that is, it matches the `[prefix]YYYYMMDD`
54
- # name pattern, this field is the Data Catalog resource name of the
55
- # date-sharded grouped entry. For example:
53
+ # Output only. If the table is date-sharded, that is, it matches the
54
+ # `[prefix]YYYYMMDD` name pattern, this field is the Data Catalog resource
55
+ # name of the date-sharded grouped entry. For example:
56
56
  #
57
57
  # `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`.
58
58
  #
@@ -69,8 +69,8 @@ module Google
69
69
  # (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding).
70
70
  # @!attribute [r] dataset
71
71
  # @return [::String]
72
- # Output only. The Data Catalog resource name of the dataset entry the current table
73
- # belongs to. For example:
72
+ # Output only. The Data Catalog resource name of the dataset entry the
73
+ # current table belongs to. For example:
74
74
  #
75
75
  # `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`.
76
76
  # @!attribute [r] table_prefix
@@ -53,8 +53,8 @@ module Google
53
53
  # (`.`). Example: `column.nested_column`.
54
54
  # @!attribute [rw] fields
55
55
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DataCatalog::V1::TagField}]
56
- # Required. Maps the ID of a tag field to its value and additional information
57
- # about that field.
56
+ # Required. Maps the ID of a tag field to its value and additional
57
+ # information about that field.
58
58
  #
59
59
  # Tag template defines valid field IDs. A tag
60
60
  # must have at least 1 field and at most 500 fields.
@@ -105,8 +105,9 @@ module Google
105
105
  # is 100 KiB.
106
106
  # @!attribute [r] order
107
107
  # @return [::Integer]
108
- # Output only. The order of this field with respect to other fields in this tag. Can be
109
- # set by {::Google::Cloud::DataCatalog::V1::TagTemplateField#order Tag}.
108
+ # Output only. The order of this field with respect to other fields in this
109
+ # tag. Can be set by
110
+ # {::Google::Cloud::DataCatalog::V1::TagTemplateField#order Tag}.
110
111
  #
111
112
  # For example, a higher value can indicate a more important field.
112
113
  # The value can be negative. Multiple fields can have the same order, and
@@ -127,8 +128,8 @@ module Google
127
128
 
128
129
  # A tag template defines a tag that can have one or more typed fields.
129
130
  #
130
- # The template is used to create tags that are attached to GCP resources.
131
- # [Tag template roles]
131
+ # The template is used to create tags that are attached to Google Cloud
132
+ # resources. [Tag template roles]
132
133
  # (https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles)
133
134
  # provide permissions to create, edit, and use the template. For example,
134
135
  # see the [TagTemplate User]
@@ -185,7 +186,8 @@ module Google
185
186
  # The template for an individual field within a tag template.
186
187
  # @!attribute [r] name
187
188
  # @return [::String]
188
- # Output only. The resource name of the tag template field in URL format. Example:
189
+ # Output only. The resource name of the tag template field in URL format.
190
+ # Example:
189
191
  #
190
192
  # `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}`
191
193
  #
@@ -251,7 +253,8 @@ module Google
251
253
 
252
254
  # @!attribute [rw] display_name
253
255
  # @return [::String]
254
- # Required. The display name of the enum value. Must not be an empty string.
256
+ # Required. The display name of the enum value. Must not be an empty
257
+ # string.
255
258
  #
256
259
  # The name must contain only Unicode letters, numbers (0-9), underscores
257
260
  # (_), dashes (-), spaces ( ), and can't start or end with spaces. The
@@ -48,6 +48,17 @@ module Google
48
48
  extend ::Google::Protobuf::MessageExts::ClassMethods
49
49
  end
50
50
 
51
+ # Common statistics on the entry's usage.
52
+ #
53
+ # They can be set on any system.
54
+ # @!attribute [rw] view_count
55
+ # @return [::Integer]
56
+ # View count in source system.
57
+ class CommonUsageStats
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+ end
61
+
51
62
  # The set of all usage signals that Data Catalog stores.
52
63
  #
53
64
  # Note: Usually, these signals are updated daily. In rare cases, an update may
@@ -57,9 +68,18 @@ module Google
57
68
  # The end timestamp of the duration of usage statistics.
58
69
  # @!attribute [r] usage_within_time_range
59
70
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DataCatalog::V1::UsageStats}]
60
- # Output only. BigQuery usage statistics over each of the predefined time ranges.
71
+ # Output only. BigQuery usage statistics over each of the predefined time
72
+ # ranges.
61
73
  #
62
74
  # Supported time ranges are `{"24H", "7D", "30D"}`.
75
+ # @!attribute [rw] common_usage_within_time_range
76
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DataCatalog::V1::CommonUsageStats}]
77
+ # Common usage statistics over each of the predefined time ranges.
78
+ #
79
+ # Supported time ranges are `{"24H", "7D", "30D", "Lifetime"}`.
80
+ # @!attribute [rw] favorite_count
81
+ # @return [::Integer]
82
+ # Favorite count in the source system.
63
83
  class UsageSignal
64
84
  include ::Google::Protobuf::MessageExts
65
85
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -72,6 +92,15 @@ module Google
72
92
  include ::Google::Protobuf::MessageExts
73
93
  extend ::Google::Protobuf::MessageExts::ClassMethods
74
94
  end
95
+
96
+ # @!attribute [rw] key
97
+ # @return [::String]
98
+ # @!attribute [rw] value
99
+ # @return [::Google::Cloud::DataCatalog::V1::CommonUsageStats]
100
+ class CommonUsageWithinTimeRangeEntry
101
+ include ::Google::Protobuf::MessageExts
102
+ extend ::Google::Protobuf::MessageExts::ClassMethods
103
+ end
75
104
  end
76
105
  end
77
106
  end
@@ -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
@@ -69,7 +69,6 @@ module Google
69
69
  # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
- #
73
72
  # Example 5: Compute Timestamp from Java `Instant.now()`.
74
73
  #
75
74
  # Instant now = Instant.now();
@@ -78,7 +77,6 @@ module Google
78
77
  # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
78
  # .setNanos(now.getNano()).build();
80
79
  #
81
- #
82
80
  # Example 6: Compute Timestamp from current time in Python.
83
81
  #
84
82
  # timestamp = Timestamp()
@@ -108,7 +106,7 @@ module Google
108
106
  # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
109
107
  # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
110
108
  # the Joda Time's [`ISODateTimeFormat.dateTime()`](
111
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
109
+ # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
112
110
  # ) to obtain a formatter capable of generating timestamps in this format.
113
111
  # @!attribute [rw] seconds
114
112
  # @return [::Integer]
@@ -0,0 +1,48 @@
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 Rpc
22
+ # The `Status` type defines a logical error model that is suitable for
23
+ # different programming environments, including REST APIs and RPC APIs. It is
24
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
25
+ # three pieces of data: error code, error message, and error details.
26
+ #
27
+ # You can find out more about this error model and how to work with it in the
28
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
29
+ # @!attribute [rw] code
30
+ # @return [::Integer]
31
+ # The status code, which should be an enum value of
32
+ # [google.rpc.Code][google.rpc.Code].
33
+ # @!attribute [rw] message
34
+ # @return [::String]
35
+ # A developer-facing error message, which should be in English. Any
36
+ # user-facing error message should be localized and sent in the
37
+ # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized
38
+ # by the client.
39
+ # @!attribute [rw] details
40
+ # @return [::Array<::Google::Protobuf::Any>]
41
+ # A list of messages that carry the error details. There is a common set of
42
+ # message types for APIs to use.
43
+ class Status
44
+ include ::Google::Protobuf::MessageExts
45
+ extend ::Google::Protobuf::MessageExts::ClassMethods
46
+ end
47
+ end
48
+ end