google-cloud-data_catalog-v1 0.4.4 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +188 -190
  3. data/README.md +66 -2
  4. data/lib/google/cloud/data_catalog/v1.rb +5 -0
  5. data/lib/google/cloud/data_catalog/v1/data_catalog/client.rb +245 -121
  6. data/lib/google/cloud/data_catalog/v1/data_catalog/paths.rb +23 -0
  7. data/lib/google/cloud/data_catalog/v1/policy_tag_manager.rb +54 -0
  8. data/lib/google/cloud/data_catalog/v1/policy_tag_manager/client.rb +1320 -0
  9. data/lib/google/cloud/data_catalog/v1/policy_tag_manager/credentials.rb +51 -0
  10. data/lib/google/cloud/data_catalog/v1/policy_tag_manager/paths.rb +90 -0
  11. data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization.rb +51 -0
  12. data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/client.rb +474 -0
  13. data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/credentials.rb +51 -0
  14. data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/paths.rb +69 -0
  15. data/lib/google/cloud/data_catalog/v1/version.rb +1 -1
  16. data/lib/google/cloud/datacatalog/v1/common_pb.rb +1 -0
  17. data/lib/google/cloud/datacatalog/v1/data_source_pb.rb +30 -0
  18. data/lib/google/cloud/datacatalog/v1/datacatalog_pb.rb +25 -0
  19. data/lib/google/cloud/datacatalog/v1/datacatalog_services_pb.rb +33 -30
  20. data/lib/google/cloud/datacatalog/v1/policytagmanager_pb.rb +107 -0
  21. data/lib/google/cloud/datacatalog/v1/policytagmanager_services_pb.rb +85 -0
  22. data/lib/google/cloud/datacatalog/v1/policytagmanagerserialization_pb.rb +70 -0
  23. data/lib/google/cloud/datacatalog/v1/policytagmanagerserialization_services_pb.rb +62 -0
  24. data/lib/google/cloud/datacatalog/v1/search_pb.rb +2 -0
  25. data/lib/google/cloud/datacatalog/v1/table_spec_pb.rb +1 -0
  26. data/lib/google/cloud/datacatalog/v1/tags_pb.rb +1 -0
  27. data/proto_docs/google/api/field_behavior.rb +6 -0
  28. data/proto_docs/google/api/resource.rb +50 -14
  29. data/proto_docs/google/cloud/datacatalog/v1/common.rb +3 -0
  30. data/proto_docs/google/cloud/datacatalog/v1/data_source.rb +51 -0
  31. data/proto_docs/google/cloud/datacatalog/v1/datacatalog.rb +212 -111
  32. data/proto_docs/google/cloud/datacatalog/v1/policytagmanager.rb +292 -0
  33. data/proto_docs/google/cloud/datacatalog/v1/policytagmanagerserialization.rb +141 -0
  34. data/proto_docs/google/cloud/datacatalog/v1/schema.rb +16 -4
  35. data/proto_docs/google/cloud/datacatalog/v1/search.rb +14 -0
  36. data/proto_docs/google/cloud/datacatalog/v1/table_spec.rb +3 -0
  37. data/proto_docs/google/cloud/datacatalog/v1/tags.rb +44 -21
  38. data/proto_docs/google/protobuf/timestamp.rb +10 -1
  39. metadata +28 -9
@@ -17,6 +17,8 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/data_catalog/v1/data_catalog"
20
+ require "google/cloud/data_catalog/v1/policy_tag_manager"
21
+ require "google/cloud/data_catalog/v1/policy_tag_manager_serialization"
20
22
  require "google/cloud/data_catalog/v1/version"
21
23
 
22
24
  module Google
@@ -33,3 +35,6 @@ module Google
33
35
  end
34
36
  end
35
37
  end
38
+
39
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
40
+ require "google/cloud/data_catalog/v1/_helpers" if ::File.file? helper_path
@@ -61,7 +61,7 @@ module Google
61
61
  parent_config = while namespace.any?
62
62
  parent_name = namespace.join "::"
63
63
  parent_const = const_get parent_name
64
- break parent_const.configure if parent_const&.respond_to? :configure
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
65
  namespace.pop
66
66
  end
67
67
  default_config = Client::Configuration.new parent_config
@@ -71,65 +71,65 @@ module Google
71
71
  default_config.rpcs.search_catalog.timeout = 60.0
72
72
  default_config.rpcs.search_catalog.retry_policy = {
73
73
  initial_delay: 0.1,
74
- max_delay: 60.0,
75
- multiplier: 1.3,
76
- retry_codes: [14]
74
+ max_delay: 60.0,
75
+ multiplier: 1.3,
76
+ retry_codes: [14]
77
77
  }
78
78
 
79
79
  default_config.rpcs.get_entry_group.timeout = 60.0
80
80
  default_config.rpcs.get_entry_group.retry_policy = {
81
81
  initial_delay: 0.1,
82
- max_delay: 60.0,
83
- multiplier: 1.3,
84
- retry_codes: [14]
82
+ max_delay: 60.0,
83
+ multiplier: 1.3,
84
+ retry_codes: [14]
85
85
  }
86
86
 
87
87
  default_config.rpcs.list_entry_groups.timeout = 60.0
88
88
  default_config.rpcs.list_entry_groups.retry_policy = {
89
89
  initial_delay: 0.1,
90
- max_delay: 60.0,
91
- multiplier: 1.3,
92
- retry_codes: [14]
90
+ max_delay: 60.0,
91
+ multiplier: 1.3,
92
+ retry_codes: [14]
93
93
  }
94
94
 
95
95
  default_config.rpcs.get_entry.timeout = 60.0
96
96
  default_config.rpcs.get_entry.retry_policy = {
97
97
  initial_delay: 0.1,
98
- max_delay: 60.0,
99
- multiplier: 1.3,
100
- retry_codes: [14]
98
+ max_delay: 60.0,
99
+ multiplier: 1.3,
100
+ retry_codes: [14]
101
101
  }
102
102
 
103
103
  default_config.rpcs.lookup_entry.timeout = 60.0
104
104
  default_config.rpcs.lookup_entry.retry_policy = {
105
105
  initial_delay: 0.1,
106
- max_delay: 60.0,
107
- multiplier: 1.3,
108
- retry_codes: [14]
106
+ max_delay: 60.0,
107
+ multiplier: 1.3,
108
+ retry_codes: [14]
109
109
  }
110
110
 
111
111
  default_config.rpcs.list_entries.timeout = 60.0
112
112
  default_config.rpcs.list_entries.retry_policy = {
113
113
  initial_delay: 0.1,
114
- max_delay: 60.0,
115
- multiplier: 1.3,
116
- retry_codes: [14]
114
+ max_delay: 60.0,
115
+ multiplier: 1.3,
116
+ retry_codes: [14]
117
117
  }
118
118
 
119
119
  default_config.rpcs.list_tags.timeout = 60.0
120
120
  default_config.rpcs.list_tags.retry_policy = {
121
121
  initial_delay: 0.1,
122
- max_delay: 60.0,
123
- multiplier: 1.3,
124
- retry_codes: [14]
122
+ max_delay: 60.0,
123
+ multiplier: 1.3,
124
+ retry_codes: [14]
125
125
  }
126
126
 
127
127
  default_config.rpcs.get_iam_policy.timeout = 60.0
128
128
  default_config.rpcs.get_iam_policy.retry_policy = {
129
129
  initial_delay: 0.1,
130
- max_delay: 60.0,
131
- multiplier: 1.3,
132
- retry_codes: [14]
130
+ max_delay: 60.0,
131
+ multiplier: 1.3,
132
+ retry_codes: [14]
133
133
  }
134
134
 
135
135
  default_config
@@ -193,7 +193,13 @@ module Google
193
193
 
194
194
  # Create credentials
195
195
  credentials = @config.credentials
196
- credentials ||= Credentials.default scope: @config.scope
196
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
197
+ # but only if the default endpoint does not have a region prefix.
198
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
199
+ @config.endpoint == Client.configure.endpoint &&
200
+ !@config.endpoint.split(".").first.include?("-")
201
+ credentials ||= Credentials.default scope: @config.scope,
202
+ enable_self_signed_jwt: enable_self_signed_jwt
197
203
  if credentials.is_a?(String) || credentials.is_a?(Hash)
198
204
  credentials = Credentials.new credentials, scope: @config.scope
199
205
  end
@@ -218,7 +224,7 @@ module Google
218
224
  # This is a custom method
219
225
  # (https://cloud.google.com/apis/design/custom_methods) and does not return
220
226
  # the complete resource, only the resource identifier and high level
221
- # fields. Clients can subsequentally call `Get` methods.
227
+ # fields. Clients can subsequently call `Get` methods.
222
228
  #
223
229
  # Note that Data Catalog search queries do not guarantee full recall. Query
224
230
  # results that match your query may not be returned, even in subsequent
@@ -250,8 +256,8 @@ module Google
250
256
  # `include_gcp_public_datasets` is considered invalid. Data Catalog will
251
257
  # return an error in such a case.
252
258
  # @param query [::String]
253
- # Required. The query string in search query syntax. The query must be
254
- # non-empty.
259
+ # Optional. The query string in search query syntax. An empty query string will result
260
+ # in all data assets (in the specified scope) that the user has access to.
255
261
  #
256
262
  # Query strings can be simple as "x" or more qualified as:
257
263
  #
@@ -268,8 +274,8 @@ module Google
268
274
  # for page_size is 1000. Throws an invalid argument for page_size > 1000.
269
275
  # @param page_token [::String]
270
276
  # Optional. Pagination token returned in an earlier
271
- # {::Google::Cloud::DataCatalog::V1::SearchCatalogResponse#next_page_token SearchCatalogResponse.next_page_token},
272
- # which indicates that this is a continuation of a prior
277
+ # {::Google::Cloud::DataCatalog::V1::SearchCatalogResponse#next_page_token SearchCatalogResponse.next_page_token}, which
278
+ # indicates that this is a continuation of a prior
273
279
  # {::Google::Cloud::DataCatalog::V1::DataCatalog::Client#search_catalog SearchCatalogRequest}
274
280
  # call, and that the system should return the next page of data. If empty,
275
281
  # the first page is returned.
@@ -360,16 +366,18 @@ module Google
360
366
  # the default parameter values, pass an empty Hash as a request object (see above).
361
367
  #
362
368
  # @param parent [::String]
363
- # Required. The name of the project this entry group is in. Example:
369
+ # Required. The name of the project this entry group belongs to. Example:
364
370
  #
365
- # * projects/\\{project_id}/locations/\\{location}
371
+ # `projects/{project_id}/locations/{location}`
366
372
  #
367
- # Note that this EntryGroup and its child resources may not actually be
368
- # stored in the location in this name.
373
+ # Note: The entry group itself and its child resources might not be
374
+ # stored in the location specified in its name.
369
375
  # @param entry_group_id [::String]
370
- # Required. The id of the entry group to create.
371
- # The id must begin with a letter or underscore, contain only English
372
- # letters, numbers and underscores, and be at most 64 characters.
376
+ # Required. The ID of the entry group to create.
377
+ #
378
+ # The ID must contain only letters (a-z, A-Z), numbers (0-9),
379
+ # underscores (_), and must start with a letter or underscore.
380
+ # The maximum size is 64 bytes when encoded in UTF-8.
373
381
  # @param entry_group [::Google::Cloud::DataCatalog::V1::EntryGroup, ::Hash]
374
382
  # The entry group to create. Defaults to an empty entry group.
375
383
  #
@@ -512,8 +520,11 @@ module Google
512
520
  # @param entry_group [::Google::Cloud::DataCatalog::V1::EntryGroup, ::Hash]
513
521
  # Required. The updated entry group. "name" field must be set.
514
522
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
515
- # The fields to update on the entry group. If absent or empty, all modifiable
516
- # fields are updated.
523
+ # Names of fields whose values to overwrite on an entry group.
524
+ #
525
+ # If this parameter is absent or empty, all modifiable fields
526
+ # are overwritten. If such fields are non-required and omitted in the
527
+ # request body, their values are emptied.
517
528
  #
518
529
  # @yield [response, operation] Access the result along with the RPC operation
519
530
  # @yieldparam response [::Google::Cloud::DataCatalog::V1::EntryGroup]
@@ -652,16 +663,16 @@ module Google
652
663
  # the default parameter values, pass an empty Hash as a request object (see above).
653
664
  #
654
665
  # @param parent [::String]
655
- # Required. The name of the location that contains the entry groups, which
656
- # can be provided in URL format. Example:
666
+ # Required. The name of the location that contains the entry groups, which can be
667
+ # provided in URL format. Example:
657
668
  #
658
669
  # * projects/\\{project_id}/locations/\\{location}
659
670
  # @param page_size [::Integer]
660
- # Optional. The maximum number of items to return. Default is 10. Max limit
661
- # is 1000. Throws an invalid argument for `page_size > 1000`.
671
+ # Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
672
+ # Throws an invalid argument for `page_size > 1000`.
662
673
  # @param page_token [::String]
663
- # Optional. Token that specifies which page is requested. If empty, the first
664
- # page is returned.
674
+ # Optional. Token that specifies which page is requested. If empty, the first page is
675
+ # returned.
665
676
  #
666
677
  # @yield [response, operation] Access the result along with the RPC operation
667
678
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::EntryGroup>]
@@ -710,8 +721,8 @@ module Google
710
721
  end
711
722
 
712
723
  ##
713
- # Creates an entry. Only entries of 'FILESET' type or user-specified type can
714
- # be created.
724
+ # Creates an entry. Only entries of types 'FILESET', 'CLUSTER', 'DATA_STREAM'
725
+ # or with a user-specified type can be created.
715
726
  #
716
727
  # Users should enable the Data Catalog API in the project identified by
717
728
  # the `parent` parameter (see [Data Catalog Resource Project]
@@ -736,14 +747,18 @@ module Google
736
747
  # the default parameter values, pass an empty Hash as a request object (see above).
737
748
  #
738
749
  # @param parent [::String]
739
- # Required. The name of the entry group this entry is in. Example:
750
+ # Required. The name of the entry group this entry belongs to. Example:
740
751
  #
741
- # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}
752
+ # `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
742
753
  #
743
- # Note that this Entry and its child resources may not actually be stored in
744
- # the location in this name.
754
+ # Note: The entry itself and its child resources might not be stored in
755
+ # the location specified in its name.
745
756
  # @param entry_id [::String]
746
- # Required. The id of the entry to create.
757
+ # Required. The ID of the entry to create.
758
+ #
759
+ # The ID must contain only letters (a-z, A-Z), numbers (0-9),
760
+ # and underscores (_).
761
+ # The maximum size is 64 bytes when encoded in UTF-8.
747
762
  # @param entry [::Google::Cloud::DataCatalog::V1::Entry, ::Hash]
748
763
  # Required. The entry to create.
749
764
  #
@@ -817,26 +832,30 @@ module Google
817
832
  # @param entry [::Google::Cloud::DataCatalog::V1::Entry, ::Hash]
818
833
  # Required. The updated entry. The "name" field must be set.
819
834
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
820
- # The fields to update on the entry. If absent or empty, all modifiable
821
- # fields are updated.
835
+ # Names of fields whose values to overwrite on an entry.
836
+ #
837
+ # If this parameter is absent or empty, all modifiable fields
838
+ # are overwritten. If such fields are non-required and omitted in the
839
+ # request body, their values are emptied.
822
840
  #
823
841
  # The following fields are modifiable:
842
+ #
824
843
  # * For entries with type `DATA_STREAM`:
825
844
  # * `schema`
826
- # * For entries with type `FILESET`
845
+ # * For entries with type `FILESET`:
827
846
  # * `schema`
828
847
  # * `display_name`
829
848
  # * `description`
830
849
  # * `gcs_fileset_spec`
831
850
  # * `gcs_fileset_spec.file_patterns`
832
- # * For entries with `user_specified_type`
851
+ # * For entries with `user_specified_type`:
833
852
  # * `schema`
834
853
  # * `display_name`
835
854
  # * `description`
836
- # * user_specified_type
837
- # * user_specified_system
838
- # * linked_resource
839
- # * source_system_timestamps
855
+ # * `user_specified_type`
856
+ # * `user_specified_system`
857
+ # * `linked_resource`
858
+ # * `source_system_timestamps`
840
859
  #
841
860
  # @yield [response, operation] Access the result along with the RPC operation
842
861
  # @yieldparam response [::Google::Cloud::DataCatalog::V1::Entry]
@@ -1040,7 +1059,7 @@ module Google
1040
1059
  # @param options [::Gapic::CallOptions, ::Hash]
1041
1060
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1042
1061
  #
1043
- # @overload lookup_entry(linked_resource: nil, sql_resource: nil)
1062
+ # @overload lookup_entry(linked_resource: nil, sql_resource: nil, fully_qualified_name: nil)
1044
1063
  # Pass arguments to `lookup_entry` via keyword arguments. Note that at
1045
1064
  # least one keyword argument is required. To specify no parameters, or to keep all
1046
1065
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1066,8 +1085,24 @@ module Google
1066
1085
  # * `bigquery.dataset.project_id.dataset_id`
1067
1086
  # * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id`
1068
1087
  #
1069
- # `*_id`s shoud satisfy the standard SQL rules for identifiers.
1088
+ # `*_id`s should satisfy the standard SQL rules for identifiers.
1070
1089
  # https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.
1090
+ # @param fully_qualified_name [::String]
1091
+ # Fully qualified name (FQN) of the resource.
1092
+ #
1093
+ # FQNs take two forms:
1094
+ #
1095
+ # * For non-regionalized resources:
1096
+ #
1097
+ # `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
1098
+ #
1099
+ # * For regionalized resources:
1100
+ #
1101
+ # `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
1102
+ #
1103
+ # Example for a DPMS table:
1104
+ #
1105
+ # `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
1071
1106
  #
1072
1107
  # @yield [response, operation] Access the result along with the RPC operation
1073
1108
  # @yieldparam response [::Google::Cloud::DataCatalog::V1::Entry]
@@ -1219,7 +1254,11 @@ module Google
1219
1254
  #
1220
1255
  # * projects/\\{project_id}/locations/us-central1
1221
1256
  # @param tag_template_id [::String]
1222
- # Required. The id of the tag template to create.
1257
+ # Required. The ID of the tag template to create.
1258
+ #
1259
+ # The ID must contain only lowercase letters (a-z), numbers (0-9),
1260
+ # or underscores (_), and must start with a letter or underscore.
1261
+ # The maximum size is 64 bytes when encoded in UTF-8.
1223
1262
  # @param tag_template [::Google::Cloud::DataCatalog::V1::TagTemplate, ::Hash]
1224
1263
  # Required. The tag template to create.
1225
1264
  #
@@ -1363,13 +1402,12 @@ module Google
1363
1402
  # @param tag_template [::Google::Cloud::DataCatalog::V1::TagTemplate, ::Hash]
1364
1403
  # Required. The template to update. The "name" field must be set.
1365
1404
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1366
- # The field mask specifies the parts of the template to overwrite.
1367
- #
1368
- # Allowed fields:
1369
- #
1370
- # * `display_name`
1405
+ # Names of fields whose values to overwrite on a tag template. Currently,
1406
+ # only `display_name` can be overwritten.
1371
1407
  #
1372
- # If absent or empty, all of the allowed fields above will be updated.
1408
+ # In general, if this parameter is absent or empty, all modifiable fields
1409
+ # are overwritten. If such fields are non-required and omitted in the
1410
+ # request body, their values are emptied.
1373
1411
  #
1374
1412
  # @yield [response, operation] Access the result along with the RPC operation
1375
1413
  # @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplate]
@@ -1523,7 +1561,10 @@ module Google
1523
1561
  # * projects/\\{project_id}/locations/us-central1/tagTemplates/\\{tag_template_id}
1524
1562
  # @param tag_template_field_id [::String]
1525
1563
  # Required. The ID of the tag template field to create.
1526
- # Field ids can contain letters (both uppercase and lowercase), numbers
1564
+ #
1565
+ # Note: Adding a required field to an existing template is *not* allowed.
1566
+ #
1567
+ # Field IDs can contain letters (both uppercase and lowercase), numbers
1527
1568
  # (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
1528
1569
  # character long and at most 128 characters long. Field IDs must also be
1529
1570
  # unique within their template.
@@ -1604,20 +1645,22 @@ module Google
1604
1645
  # @param tag_template_field [::Google::Cloud::DataCatalog::V1::TagTemplateField, ::Hash]
1605
1646
  # Required. The template to update.
1606
1647
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1607
- # Optional. The field mask specifies the parts of the template to be updated.
1608
- # Allowed fields:
1648
+ # Optional. Names of fields whose values to overwrite on an individual field of a tag
1649
+ # template. The following fields are modifiable:
1609
1650
  #
1610
1651
  # * `display_name`
1611
1652
  # * `type.enum_type`
1612
1653
  # * `is_required`
1613
1654
  #
1614
- # If `update_mask` is not set or empty, all of the allowed fields above will
1615
- # be updated.
1655
+ # If this parameter is absent or empty, all modifiable fields
1656
+ # are overwritten. If such fields are non-required and omitted in the request
1657
+ # body, their values are emptied with one exception: when updating an enum
1658
+ # type, the provided values are merged with the existing values. Therefore,
1659
+ # enum values can only be added, existing enum values cannot be deleted or
1660
+ # renamed.
1616
1661
  #
1617
- # When updating an enum type, the provided values will be merged with the
1618
- # existing values. Therefore, enum values can only be added, existing enum
1619
- # values cannot be deleted nor renamed. Updating a template field from
1620
- # optional to required is NOT allowed.
1662
+ # Additionally, updating a template field from optional to required is
1663
+ # *not* allowed.
1621
1664
  #
1622
1665
  # @yield [response, operation] Access the result along with the RPC operation
1623
1666
  # @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplateField]
@@ -1691,8 +1734,7 @@ module Google
1691
1734
  #
1692
1735
  # * projects/\\{project_id}/locations/\\{location}/tagTemplates/\\{tag_template_id}/fields/\\{tag_template_field_id}
1693
1736
  # @param new_tag_template_field_id [::String]
1694
- # Required. The new ID of this tag template field. For example,
1695
- # `my_new_field`.
1737
+ # Required. The new ID of this tag template field. For example, `my_new_field`.
1696
1738
  #
1697
1739
  # @yield [response, operation] Access the result along with the RPC operation
1698
1740
  # @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplateField]
@@ -1739,6 +1781,77 @@ module Google
1739
1781
  raise ::Google::Cloud::Error.from_error(e)
1740
1782
  end
1741
1783
 
1784
+ ##
1785
+ # Renames an enum value in a tag template. The enum values have to be unique
1786
+ # within one enum field.
1787
+ #
1788
+ # @overload rename_tag_template_field_enum_value(request, options = nil)
1789
+ # Pass arguments to `rename_tag_template_field_enum_value` via a request object, either of type
1790
+ # {::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldEnumValueRequest} or an equivalent Hash.
1791
+ #
1792
+ # @param request [::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldEnumValueRequest, ::Hash]
1793
+ # A request object representing the call parameters. Required. To specify no
1794
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1795
+ # @param options [::Gapic::CallOptions, ::Hash]
1796
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1797
+ #
1798
+ # @overload rename_tag_template_field_enum_value(name: nil, new_enum_value_display_name: nil)
1799
+ # Pass arguments to `rename_tag_template_field_enum_value` via keyword arguments. Note that at
1800
+ # least one keyword argument is required. To specify no parameters, or to keep all
1801
+ # the default parameter values, pass an empty Hash as a request object (see above).
1802
+ #
1803
+ # @param name [::String]
1804
+ # Required. The name of the enum field value. Example:
1805
+ #
1806
+ # * projects/\\{project_id}/locations/\\{location}/tagTemplates/\\{tag_template_id}/fields/\\{tag_template_field_id}/enumValues/\\{enum_value_display_name}
1807
+ # @param new_enum_value_display_name [::String]
1808
+ # Required. The new display name of the enum value. For example, `my_new_enum_value`.
1809
+ #
1810
+ # @yield [response, operation] Access the result along with the RPC operation
1811
+ # @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplateField]
1812
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1813
+ #
1814
+ # @return [::Google::Cloud::DataCatalog::V1::TagTemplateField]
1815
+ #
1816
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1817
+ #
1818
+ def rename_tag_template_field_enum_value request, options = nil
1819
+ raise ::ArgumentError, "request must be provided" if request.nil?
1820
+
1821
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldEnumValueRequest
1822
+
1823
+ # Converts hash and nil to an options object
1824
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1825
+
1826
+ # Customize the options with defaults
1827
+ metadata = @config.rpcs.rename_tag_template_field_enum_value.metadata.to_h
1828
+
1829
+ # Set x-goog-api-client and x-goog-user-project headers
1830
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1831
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1832
+ gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1833
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1834
+
1835
+ header_params = {
1836
+ "name" => request.name
1837
+ }
1838
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1839
+ metadata[:"x-goog-request-params"] ||= request_params_header
1840
+
1841
+ options.apply_defaults timeout: @config.rpcs.rename_tag_template_field_enum_value.timeout,
1842
+ metadata: metadata,
1843
+ retry_policy: @config.rpcs.rename_tag_template_field_enum_value.retry_policy
1844
+ options.apply_defaults metadata: @config.metadata,
1845
+ retry_policy: @config.retry_policy
1846
+
1847
+ @data_catalog_stub.call_rpc :rename_tag_template_field_enum_value, request, options: options do |response, operation|
1848
+ yield response, operation if block_given?
1849
+ return response
1850
+ end
1851
+ rescue ::GRPC::BadStatus => e
1852
+ raise ::Google::Cloud::Error.from_error(e)
1853
+ end
1854
+
1742
1855
  ##
1743
1856
  # Deletes a field in a tag template and all uses of that field.
1744
1857
  # Users should enable the Data Catalog API in the project identified by
@@ -1840,13 +1953,13 @@ module Google
1840
1953
  # the default parameter values, pass an empty Hash as a request object (see above).
1841
1954
  #
1842
1955
  # @param parent [::String]
1843
- # Required. The name of the resource to attach this tag to. Tags can be
1844
- # attached to Entries. Example:
1956
+ # Required. The name of the resource to attach this tag to. Tags can be attached to
1957
+ # entries. An entry can have up to 1000 attached tags. Example:
1845
1958
  #
1846
- # * projects/\\{project_id}/locations/\\{location}/entryGroups/\\{entry_group_id}/entries/\\{entry_id}
1959
+ # `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
1847
1960
  #
1848
- # Note that this Tag and its child resources may not actually be stored in
1849
- # the location in this name.
1961
+ # Note: The tag and its child resources might not be stored in
1962
+ # the location specified in its name.
1850
1963
  # @param tag [::Google::Cloud::DataCatalog::V1::Tag, ::Hash]
1851
1964
  # Required. The tag to create.
1852
1965
  #
@@ -1916,8 +2029,12 @@ module Google
1916
2029
  # @param tag [::Google::Cloud::DataCatalog::V1::Tag, ::Hash]
1917
2030
  # Required. The updated tag. The "name" field must be set.
1918
2031
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1919
- # The fields to update on the Tag. If absent or empty, all modifiable fields
1920
- # are updated. Currently the only modifiable field is the field `fields`.
2032
+ # Names of fields whose values to overwrite on a tag. Currently, a tag has
2033
+ # the only modifiable field with the name `fields`.
2034
+ #
2035
+ # In general, if this parameter is absent or empty, all modifiable fields
2036
+ # are overwritten. If such fields are non-required and omitted in the
2037
+ # request body, their values are emptied.
1921
2038
  #
1922
2039
  # @yield [response, operation] Access the result along with the RPC operation
1923
2040
  # @yieldparam response [::Google::Cloud::DataCatalog::V1::Tag]
@@ -2051,8 +2168,8 @@ module Google
2051
2168
  # the default parameter values, pass an empty Hash as a request object (see above).
2052
2169
  #
2053
2170
  # @param parent [::String]
2054
- # Required. The name of the Data Catalog resource to list the tags of. The
2055
- # resource could be an {::Google::Cloud::DataCatalog::V1::Entry Entry} or an
2171
+ # Required. The name of the Data Catalog resource to list the tags of. The resource
2172
+ # could be an {::Google::Cloud::DataCatalog::V1::Entry Entry} or an
2056
2173
  # {::Google::Cloud::DataCatalog::V1::EntryGroup EntryGroup}.
2057
2174
  #
2058
2175
  # Examples:
@@ -2450,14 +2567,14 @@ module Google
2450
2567
 
2451
2568
  config_attr :endpoint, "datacatalog.googleapis.com", ::String
2452
2569
  config_attr :credentials, nil do |value|
2453
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2570
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2454
2571
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2455
2572
  allowed.any? { |klass| klass === value }
2456
2573
  end
2457
2574
  config_attr :scope, nil, ::String, ::Array, nil
2458
2575
  config_attr :lib_name, nil, ::String, nil
2459
2576
  config_attr :lib_version, nil, ::String, nil
2460
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
2577
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2461
2578
  config_attr :interceptors, nil, ::Array, nil
2462
2579
  config_attr :timeout, nil, ::Numeric, nil
2463
2580
  config_attr :metadata, nil, ::Hash, nil
@@ -2478,7 +2595,7 @@ module Google
2478
2595
  def rpcs
2479
2596
  @rpcs ||= begin
2480
2597
  parent_rpcs = nil
2481
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
2598
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2482
2599
  Rpcs.new parent_rpcs
2483
2600
  end
2484
2601
  end
@@ -2490,7 +2607,7 @@ module Google
2490
2607
  # Each configuration object is of type `Gapic::Config::Method` and includes
2491
2608
  # the following configuration fields:
2492
2609
  #
2493
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
2610
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2494
2611
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2495
2612
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2496
2613
  # include the following keys:
@@ -2597,6 +2714,11 @@ module Google
2597
2714
  #
2598
2715
  attr_reader :rename_tag_template_field
2599
2716
  ##
2717
+ # RPC-specific configuration for `rename_tag_template_field_enum_value`
2718
+ # @return [::Gapic::Config::Method]
2719
+ #
2720
+ attr_reader :rename_tag_template_field_enum_value
2721
+ ##
2600
2722
  # RPC-specific configuration for `delete_tag_template_field`
2601
2723
  # @return [::Gapic::Config::Method]
2602
2724
  #
@@ -2639,59 +2761,61 @@ module Google
2639
2761
 
2640
2762
  # @private
2641
2763
  def initialize parent_rpcs = nil
2642
- search_catalog_config = parent_rpcs&.search_catalog if parent_rpcs&.respond_to? :search_catalog
2764
+ search_catalog_config = parent_rpcs.search_catalog if parent_rpcs.respond_to? :search_catalog
2643
2765
  @search_catalog = ::Gapic::Config::Method.new search_catalog_config
2644
- create_entry_group_config = parent_rpcs&.create_entry_group if parent_rpcs&.respond_to? :create_entry_group
2766
+ create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group
2645
2767
  @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config
2646
- get_entry_group_config = parent_rpcs&.get_entry_group if parent_rpcs&.respond_to? :get_entry_group
2768
+ get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group
2647
2769
  @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config
2648
- update_entry_group_config = parent_rpcs&.update_entry_group if parent_rpcs&.respond_to? :update_entry_group
2770
+ update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group
2649
2771
  @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config
2650
- delete_entry_group_config = parent_rpcs&.delete_entry_group if parent_rpcs&.respond_to? :delete_entry_group
2772
+ delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group
2651
2773
  @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config
2652
- list_entry_groups_config = parent_rpcs&.list_entry_groups if parent_rpcs&.respond_to? :list_entry_groups
2774
+ list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups
2653
2775
  @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config
2654
- create_entry_config = parent_rpcs&.create_entry if parent_rpcs&.respond_to? :create_entry
2776
+ create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry
2655
2777
  @create_entry = ::Gapic::Config::Method.new create_entry_config
2656
- update_entry_config = parent_rpcs&.update_entry if parent_rpcs&.respond_to? :update_entry
2778
+ update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry
2657
2779
  @update_entry = ::Gapic::Config::Method.new update_entry_config
2658
- delete_entry_config = parent_rpcs&.delete_entry if parent_rpcs&.respond_to? :delete_entry
2780
+ delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry
2659
2781
  @delete_entry = ::Gapic::Config::Method.new delete_entry_config
2660
- get_entry_config = parent_rpcs&.get_entry if parent_rpcs&.respond_to? :get_entry
2782
+ get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry
2661
2783
  @get_entry = ::Gapic::Config::Method.new get_entry_config
2662
- lookup_entry_config = parent_rpcs&.lookup_entry if parent_rpcs&.respond_to? :lookup_entry
2784
+ lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry
2663
2785
  @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config
2664
- list_entries_config = parent_rpcs&.list_entries if parent_rpcs&.respond_to? :list_entries
2786
+ list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries
2665
2787
  @list_entries = ::Gapic::Config::Method.new list_entries_config
2666
- create_tag_template_config = parent_rpcs&.create_tag_template if parent_rpcs&.respond_to? :create_tag_template
2788
+ create_tag_template_config = parent_rpcs.create_tag_template if parent_rpcs.respond_to? :create_tag_template
2667
2789
  @create_tag_template = ::Gapic::Config::Method.new create_tag_template_config
2668
- get_tag_template_config = parent_rpcs&.get_tag_template if parent_rpcs&.respond_to? :get_tag_template
2790
+ get_tag_template_config = parent_rpcs.get_tag_template if parent_rpcs.respond_to? :get_tag_template
2669
2791
  @get_tag_template = ::Gapic::Config::Method.new get_tag_template_config
2670
- update_tag_template_config = parent_rpcs&.update_tag_template if parent_rpcs&.respond_to? :update_tag_template
2792
+ update_tag_template_config = parent_rpcs.update_tag_template if parent_rpcs.respond_to? :update_tag_template
2671
2793
  @update_tag_template = ::Gapic::Config::Method.new update_tag_template_config
2672
- delete_tag_template_config = parent_rpcs&.delete_tag_template if parent_rpcs&.respond_to? :delete_tag_template
2794
+ delete_tag_template_config = parent_rpcs.delete_tag_template if parent_rpcs.respond_to? :delete_tag_template
2673
2795
  @delete_tag_template = ::Gapic::Config::Method.new delete_tag_template_config
2674
- create_tag_template_field_config = parent_rpcs&.create_tag_template_field if parent_rpcs&.respond_to? :create_tag_template_field
2796
+ create_tag_template_field_config = parent_rpcs.create_tag_template_field if parent_rpcs.respond_to? :create_tag_template_field
2675
2797
  @create_tag_template_field = ::Gapic::Config::Method.new create_tag_template_field_config
2676
- update_tag_template_field_config = parent_rpcs&.update_tag_template_field if parent_rpcs&.respond_to? :update_tag_template_field
2798
+ update_tag_template_field_config = parent_rpcs.update_tag_template_field if parent_rpcs.respond_to? :update_tag_template_field
2677
2799
  @update_tag_template_field = ::Gapic::Config::Method.new update_tag_template_field_config
2678
- rename_tag_template_field_config = parent_rpcs&.rename_tag_template_field if parent_rpcs&.respond_to? :rename_tag_template_field
2800
+ rename_tag_template_field_config = parent_rpcs.rename_tag_template_field if parent_rpcs.respond_to? :rename_tag_template_field
2679
2801
  @rename_tag_template_field = ::Gapic::Config::Method.new rename_tag_template_field_config
2680
- delete_tag_template_field_config = parent_rpcs&.delete_tag_template_field if parent_rpcs&.respond_to? :delete_tag_template_field
2802
+ rename_tag_template_field_enum_value_config = parent_rpcs.rename_tag_template_field_enum_value if parent_rpcs.respond_to? :rename_tag_template_field_enum_value
2803
+ @rename_tag_template_field_enum_value = ::Gapic::Config::Method.new rename_tag_template_field_enum_value_config
2804
+ delete_tag_template_field_config = parent_rpcs.delete_tag_template_field if parent_rpcs.respond_to? :delete_tag_template_field
2681
2805
  @delete_tag_template_field = ::Gapic::Config::Method.new delete_tag_template_field_config
2682
- create_tag_config = parent_rpcs&.create_tag if parent_rpcs&.respond_to? :create_tag
2806
+ create_tag_config = parent_rpcs.create_tag if parent_rpcs.respond_to? :create_tag
2683
2807
  @create_tag = ::Gapic::Config::Method.new create_tag_config
2684
- update_tag_config = parent_rpcs&.update_tag if parent_rpcs&.respond_to? :update_tag
2808
+ update_tag_config = parent_rpcs.update_tag if parent_rpcs.respond_to? :update_tag
2685
2809
  @update_tag = ::Gapic::Config::Method.new update_tag_config
2686
- delete_tag_config = parent_rpcs&.delete_tag if parent_rpcs&.respond_to? :delete_tag
2810
+ delete_tag_config = parent_rpcs.delete_tag if parent_rpcs.respond_to? :delete_tag
2687
2811
  @delete_tag = ::Gapic::Config::Method.new delete_tag_config
2688
- list_tags_config = parent_rpcs&.list_tags if parent_rpcs&.respond_to? :list_tags
2812
+ list_tags_config = parent_rpcs.list_tags if parent_rpcs.respond_to? :list_tags
2689
2813
  @list_tags = ::Gapic::Config::Method.new list_tags_config
2690
- set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
2814
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
2691
2815
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
2692
- get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
2816
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
2693
2817
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
2694
- test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
2818
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
2695
2819
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
2696
2820
 
2697
2821
  yield self if block_given?