google-cloud-api_hub-v1 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/api_hub/v1/api_hub/paths.rb +21 -0
  3. data/lib/google/cloud/api_hub/v1/api_hub/rest/client.rb +497 -9
  4. data/lib/google/cloud/api_hub/v1/api_hub/rest/service_stub.rb +185 -0
  5. data/lib/google/cloud/api_hub/v1/api_hub_collect/credentials.rb +47 -0
  6. data/lib/google/cloud/api_hub/v1/api_hub_collect/paths.rb +218 -0
  7. data/lib/google/cloud/api_hub/v1/api_hub_collect/rest/client.rb +487 -0
  8. data/lib/google/cloud/api_hub/v1/api_hub_collect/rest/operations.rb +914 -0
  9. data/lib/google/cloud/api_hub/v1/api_hub_collect/rest/service_stub.rb +143 -0
  10. data/lib/google/cloud/api_hub/v1/api_hub_collect/rest.rb +56 -0
  11. data/lib/google/cloud/api_hub/v1/api_hub_collect.rb +50 -0
  12. data/lib/google/cloud/api_hub/v1/api_hub_curate/credentials.rb +47 -0
  13. data/lib/google/cloud/api_hub/v1/api_hub_curate/paths.rb +90 -0
  14. data/lib/google/cloud/api_hub/v1/api_hub_curate/rest/client.rb +869 -0
  15. data/lib/google/cloud/api_hub/v1/api_hub_curate/rest/service_stub.rb +388 -0
  16. data/lib/google/cloud/api_hub/v1/api_hub_curate/rest.rb +54 -0
  17. data/lib/google/cloud/api_hub/v1/api_hub_curate.rb +49 -0
  18. data/lib/google/cloud/api_hub/v1/api_hub_discovery/credentials.rb +47 -0
  19. data/lib/google/cloud/api_hub/v1/api_hub_discovery/paths.rb +90 -0
  20. data/lib/google/cloud/api_hub/v1/api_hub_discovery/rest/client.rb +750 -0
  21. data/lib/google/cloud/api_hub/v1/api_hub_discovery/rest/service_stub.rb +325 -0
  22. data/lib/google/cloud/api_hub/v1/api_hub_discovery/rest.rb +54 -0
  23. data/lib/google/cloud/api_hub/v1/api_hub_discovery.rb +49 -0
  24. data/lib/google/cloud/api_hub/v1/api_hub_plugin/paths.rb +74 -0
  25. data/lib/google/cloud/api_hub/v1/api_hub_plugin/rest/client.rb +1265 -98
  26. data/lib/google/cloud/api_hub/v1/api_hub_plugin/rest/operations.rb +914 -0
  27. data/lib/google/cloud/api_hub/v1/api_hub_plugin/rest/service_stub.rb +677 -0
  28. data/lib/google/cloud/api_hub/v1/api_hub_plugin/rest.rb +1 -0
  29. data/lib/google/cloud/api_hub/v1/bindings_override.rb +2 -29
  30. data/lib/google/cloud/api_hub/v1/provisioning/rest/client.rb +96 -0
  31. data/lib/google/cloud/api_hub/v1/provisioning/rest/service_stub.rb +61 -0
  32. data/lib/google/cloud/api_hub/v1/rest.rb +3 -0
  33. data/lib/google/cloud/api_hub/v1/version.rb +1 -1
  34. data/lib/google/cloud/api_hub/v1.rb +3 -0
  35. data/lib/google/cloud/apihub/v1/apihub_service_pb.rb +4 -1
  36. data/lib/google/cloud/apihub/v1/apihub_service_services_pb.rb +35 -2
  37. data/lib/google/cloud/apihub/v1/collect_service_pb.rb +60 -0
  38. data/lib/google/cloud/apihub/v1/collect_service_services_pb.rb +47 -0
  39. data/lib/google/cloud/apihub/v1/common_fields_pb.rb +34 -1
  40. data/lib/google/cloud/apihub/v1/curate_service_pb.rb +63 -0
  41. data/lib/google/cloud/apihub/v1/curate_service_services_pb.rb +64 -0
  42. data/lib/google/cloud/apihub/v1/discovery_service_pb.rb +54 -0
  43. data/lib/google/cloud/apihub/v1/discovery_service_services_pb.rb +55 -0
  44. data/lib/google/cloud/apihub/v1/plugin_service_pb.rb +44 -1
  45. data/lib/google/cloud/apihub/v1/plugin_service_services_pb.rb +43 -1
  46. data/lib/google/cloud/apihub/v1/provisioning_service_pb.rb +3 -1
  47. data/lib/google/cloud/apihub/v1/provisioning_service_services_pb.rb +2 -0
  48. data/proto_docs/google/cloud/apihub/v1/apihub_service.rb +251 -15
  49. data/proto_docs/google/cloud/apihub/v1/collect_service.rb +188 -0
  50. data/proto_docs/google/cloud/apihub/v1/common_fields.rb +819 -28
  51. data/proto_docs/google/cloud/apihub/v1/curate_service.rb +268 -0
  52. data/proto_docs/google/cloud/apihub/v1/discovery_service.rb +124 -0
  53. data/proto_docs/google/cloud/apihub/v1/linting_service.rb +10 -4
  54. data/proto_docs/google/cloud/apihub/v1/plugin_service.rb +799 -1
  55. data/proto_docs/google/cloud/apihub/v1/provisioning_service.rb +13 -0
  56. metadata +33 -4
@@ -87,7 +87,7 @@ module Google
87
87
 
88
88
  default_config.rpcs.update_api.timeout = 60.0
89
89
 
90
- default_config.rpcs.delete_api.timeout = 60.0
90
+ default_config.rpcs.delete_api.timeout = 300.0
91
91
 
92
92
  default_config.rpcs.create_version.timeout = 60.0
93
93
 
@@ -103,7 +103,7 @@ module Google
103
103
 
104
104
  default_config.rpcs.update_version.timeout = 60.0
105
105
 
106
- default_config.rpcs.delete_version.timeout = 60.0
106
+ default_config.rpcs.delete_version.timeout = 300.0
107
107
 
108
108
  default_config.rpcs.create_spec.timeout = 60.0
109
109
 
@@ -124,7 +124,7 @@ module Google
124
124
 
125
125
  default_config.rpcs.update_spec.timeout = 60.0
126
126
 
127
- default_config.rpcs.delete_spec.timeout = 60.0
127
+ default_config.rpcs.delete_spec.timeout = 300.0
128
128
 
129
129
  default_config.rpcs.get_api_operation.timeout = 60.0
130
130
  default_config.rpcs.get_api_operation.retry_policy = {
@@ -553,6 +553,37 @@ module Google
553
553
  # * `api_style.enum_values.values.display_name` - The allowed value display
554
554
  # name of the api style attribute associated with the ApiResource. Allowed
555
555
  # comparison operator is `:`.
556
+ # * `attributes.projects/test-project-id/locations/test-location-id/
557
+ # attributes/user-defined-attribute-id.enum_values.values.id` - The
558
+ # allowed value id of the user defined enum attribute associated with the
559
+ # Resource. Allowed comparison operator is `:`. Here
560
+ # user-defined-attribute-enum-id is a placeholder that can be replaced with
561
+ # any user defined enum attribute name.
562
+ # * `attributes.projects/test-project-id/locations/test-location-id/
563
+ # attributes/user-defined-attribute-id.enum_values.values.display_name`
564
+ # - The allowed value display name of the user defined enum attribute
565
+ # associated with the Resource. Allowed comparison operator is `:`. Here
566
+ # user-defined-attribute-enum-display-name is a placeholder that can be
567
+ # replaced with any user defined enum attribute enum name.
568
+ # * `attributes.projects/test-project-id/locations/test-location-id/
569
+ # attributes/user-defined-attribute-id.string_values.values` - The
570
+ # allowed value of the user defined string attribute associated with the
571
+ # Resource. Allowed comparison operator is `:`. Here
572
+ # user-defined-attribute-string is a placeholder that can be replaced with
573
+ # any user defined string attribute name.
574
+ # * `attributes.projects/test-project-id/locations/test-location-id/
575
+ # attributes/user-defined-attribute-id.json_values.values` - The
576
+ # allowed value of the user defined JSON attribute associated with the
577
+ # Resource. Allowed comparison operator is `:`. Here
578
+ # user-defined-attribute-json is a placeholder that can be replaced with
579
+ # any user defined JSON attribute name.
580
+ #
581
+ # A filter function is also supported in the filter string. The filter
582
+ # function is `id(name)`. The `id(name)` function returns the id of the
583
+ # resource name. For example, `id(name) = \"api-1\"` is equivalent to
584
+ # `name = \"projects/test-project-id/locations/test-location-id/apis/api-1\"`
585
+ # provided the parent is
586
+ # `projects/test-project-id/locations/test-location-id`.
556
587
  #
557
588
  # Expressions are combined with either `AND` logic operator or `OR` logical
558
589
  # operator but not both of them together i.e. only one of the `AND` or `OR`
@@ -578,6 +609,16 @@ module Google
578
609
  # specifies the APIs where the owner team email is _apihub@google.com_ or
579
610
  # the display name of the allowed value associated with the team attribute
580
611
  # is `ApiHub Team`.
612
+ # * `owner.email = \"apihub@google.com\" AND
613
+ # attributes.projects/test-project-id/locations/test-location-id/
614
+ # attributes/17650f90-4a29-4971-b3c0-d5532da3764b.enum_values.values.id:
615
+ # test_enum_id AND
616
+ # attributes.projects/test-project-id/locations/test-location-id/
617
+ # attributes/1765\0f90-4a29-5431-b3d0-d5532da3764c.string_values.values:
618
+ # test_string_value` - The filter string specifies the APIs where the
619
+ # owner team email is _apihub@google.com_ and the id of the allowed value
620
+ # associated with the user defined attribute of type enum is _test_enum_id_
621
+ # and the value of the user defined attribute of type string is _test_..
581
622
  # @param page_size [::Integer]
582
623
  # Optional. The maximum number of API resources to return. The service may
583
624
  # return fewer than this value. If unspecified, at most 50 Apis will be
@@ -655,7 +696,7 @@ module Google
655
696
 
656
697
  ##
657
698
  # Update an API resource in the API hub. The following fields in the
658
- # [API][] can be updated:
699
+ # {::Google::Cloud::ApiHub::V1::Api API} can be updated:
659
700
  #
660
701
  # * {::Google::Cloud::ApiHub::V1::Api#display_name display_name}
661
702
  # * {::Google::Cloud::ApiHub::V1::Api#description description}
@@ -665,6 +706,7 @@ module Google
665
706
  # * {::Google::Cloud::ApiHub::V1::Api#team team}
666
707
  # * {::Google::Cloud::ApiHub::V1::Api#business_unit business_unit}
667
708
  # * {::Google::Cloud::ApiHub::V1::Api#maturity_level maturity_level}
709
+ # * {::Google::Cloud::ApiHub::V1::Api#api_style api_style}
668
710
  # * {::Google::Cloud::ApiHub::V1::Api#attributes attributes}
669
711
  #
670
712
  # The
@@ -867,8 +909,11 @@ module Google
867
909
  # the specified id is already used by another version in the API resource.
868
910
  # * If not provided, a system generated id will be used.
869
911
  #
870
- # This value should be 4-500 characters, and valid characters
871
- # are /[a-z][A-Z][0-9]-_/.
912
+ # This value should be 4-500 characters, overall resource name which will be
913
+ # of format
914
+ # `projects/{project}/locations/{location}/apis/{api}/versions/{version}`,
915
+ # its length is limited to 700 characters and valid characters are
916
+ # /[a-z][A-Z][0-9]-_/.
872
917
  # @param version [::Google::Cloud::ApiHub::V1::Version, ::Hash]
873
918
  # Required. The version to create.
874
919
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -1065,6 +1110,30 @@ module Google
1065
1110
  # * `accreditation.enum_values.values.display_name` - The allowed value
1066
1111
  # display name of the accreditations attribute associated with the Version.
1067
1112
  # Allowed comparison operators: `:`.
1113
+ # * `attributes.projects/test-project-id/locations/test-location-id/
1114
+ # attributes/user-defined-attribute-id.enum_values.values.id` - The
1115
+ # allowed value id of the user defined enum attribute associated with the
1116
+ # Resource. Allowed comparison operator is `:`. Here
1117
+ # user-defined-attribute-enum-id is a placeholder that can be replaced with
1118
+ # any user defined enum attribute name.
1119
+ # * `attributes.projects/test-project-id/locations/test-location-id/
1120
+ # attributes/user-defined-attribute-id.enum_values.values.display_name`
1121
+ # - The allowed value display name of the user defined enum attribute
1122
+ # associated with the Resource. Allowed comparison operator is `:`. Here
1123
+ # user-defined-attribute-enum-display-name is a placeholder that can be
1124
+ # replaced with any user defined enum attribute enum name.
1125
+ # * `attributes.projects/test-project-id/locations/test-location-id/
1126
+ # attributes/user-defined-attribute-id.string_values.values` - The
1127
+ # allowed value of the user defined string attribute associated with the
1128
+ # Resource. Allowed comparison operator is `:`. Here
1129
+ # user-defined-attribute-string is a placeholder that can be replaced with
1130
+ # any user defined string attribute name.
1131
+ # * `attributes.projects/test-project-id/locations/test-location-id/
1132
+ # attributes/user-defined-attribute-id.json_values.values` - The
1133
+ # allowed value of the user defined JSON attribute associated with the
1134
+ # Resource. Allowed comparison operator is `:`. Here
1135
+ # user-defined-attribute-json is a placeholder that can be replaced with
1136
+ # any user defined JSON attribute name.
1068
1137
  #
1069
1138
  # Expressions are combined with either `AND` logic operator or `OR` logical
1070
1139
  # operator but not both of them together i.e. only one of the `AND` or `OR`
@@ -1092,6 +1161,12 @@ module Google
1092
1161
  # compliance.enum_values.values.id: pci-dss-id`
1093
1162
  # - The id of the allowed value associated with the compliance attribute is
1094
1163
  # _gdpr-id_ or _pci-dss-id_.
1164
+ # * `lifecycle.enum_values.values.id: preview-id AND
1165
+ # attributes.projects/test-project-id/locations/test-location-id/
1166
+ # attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values:
1167
+ # test` - The filter string specifies that the id of the allowed value
1168
+ # associated with the lifecycle attribute of the Version is _preview-id_
1169
+ # and the value of the user defined attribute of type string is _test_.
1095
1170
  # @param page_size [::Integer]
1096
1171
  # Optional. The maximum number of versions to return. The service may return
1097
1172
  # fewer than this value. If unspecified, at most 50 versions will be
@@ -1400,8 +1475,11 @@ module Google
1400
1475
  # resource.
1401
1476
  # * If not provided, a system generated id will be used.
1402
1477
  #
1403
- # This value should be 4-500 characters, and valid characters
1404
- # are /[a-z][A-Z][0-9]-_/.
1478
+ # This value should be 4-500 characters, overall resource name which will be
1479
+ # of format
1480
+ # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`,
1481
+ # its length is limited to 1000 characters and valid characters are
1482
+ # /[a-z][A-Z][0-9]-_/.
1405
1483
  # @param spec [::Google::Cloud::ApiHub::V1::Spec, ::Hash]
1406
1484
  # Required. The spec to create.
1407
1485
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -1673,6 +1751,30 @@ module Google
1673
1751
  # operators: `:`.
1674
1752
  # * `mime_type` - The MIME type of the Spec. Allowed comparison
1675
1753
  # operators: `=`.
1754
+ # * `attributes.projects/test-project-id/locations/test-location-id/
1755
+ # attributes/user-defined-attribute-id.enum_values.values.id` - The
1756
+ # allowed value id of the user defined enum attribute associated with the
1757
+ # Resource. Allowed comparison operator is `:`. Here
1758
+ # user-defined-attribute-enum-id is a placeholder that can be replaced with
1759
+ # any user defined enum attribute name.
1760
+ # * `attributes.projects/test-project-id/locations/test-location-id/
1761
+ # attributes/user-defined-attribute-id.enum_values.values.display_name`
1762
+ # - The allowed value display name of the user defined enum attribute
1763
+ # associated with the Resource. Allowed comparison operator is `:`. Here
1764
+ # user-defined-attribute-enum-display-name is a placeholder that can be
1765
+ # replaced with any user defined enum attribute enum name.
1766
+ # * `attributes.projects/test-project-id/locations/test-location-id/
1767
+ # attributes/user-defined-attribute-id.string_values.values` - The
1768
+ # allowed value of the user defined string attribute associated with the
1769
+ # Resource. Allowed comparison operator is `:`. Here
1770
+ # user-defined-attribute-string is a placeholder that can be replaced with
1771
+ # any user defined string attribute name.
1772
+ # * `attributes.projects/test-project-id/locations/test-location-id/
1773
+ # attributes/user-defined-attribute-id.json_values.values` - The
1774
+ # allowed value of the user defined JSON attribute associated with the
1775
+ # Resource. Allowed comparison operator is `:`. Here
1776
+ # user-defined-attribute-json is a placeholder that can be replaced with
1777
+ # any user defined JSON attribute name.
1676
1778
  #
1677
1779
  # Expressions are combined with either `AND` logic operator or `OR` logical
1678
1780
  # operator but not both of them together i.e. only one of the `AND` or `OR`
@@ -1699,6 +1801,13 @@ module Google
1699
1801
  # spec_type.enum_values.values.id: grpc-id`
1700
1802
  # - The id of the allowed value associated with the spec_type attribute is
1701
1803
  # _rest-id_ or _grpc-id_.
1804
+ # * `spec_type.enum_values.values.id: rest-id AND
1805
+ # attributes.projects/test-project-id/locations/test-location-id/
1806
+ # attributes/17650f90-4a29-4971-b3c0-d5532da3764b.enum_values.values.id:
1807
+ # test` - The filter string specifies that the id of the allowed value
1808
+ # associated with the spec_type attribute is _rest-id_ and the id of the
1809
+ # allowed value associated with the user defined attribute of type enum is
1810
+ # _test_.
1702
1811
  # @param page_size [::Integer]
1703
1812
  # Optional. The maximum number of specs to return. The service may return
1704
1813
  # fewer than this value. If unspecified, at most 50 specs will be
@@ -1961,6 +2070,104 @@ module Google
1961
2070
  raise ::Google::Cloud::Error.from_error(e)
1962
2071
  end
1963
2072
 
2073
+ ##
2074
+ # Create an apiOperation in an API version.
2075
+ # An apiOperation can be created only if the version has no apiOperations
2076
+ # which were created by parsing a spec.
2077
+ #
2078
+ # @overload create_api_operation(request, options = nil)
2079
+ # Pass arguments to `create_api_operation` via a request object, either of type
2080
+ # {::Google::Cloud::ApiHub::V1::CreateApiOperationRequest} or an equivalent Hash.
2081
+ #
2082
+ # @param request [::Google::Cloud::ApiHub::V1::CreateApiOperationRequest, ::Hash]
2083
+ # A request object representing the call parameters. Required. To specify no
2084
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2085
+ # @param options [::Gapic::CallOptions, ::Hash]
2086
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2087
+ #
2088
+ # @overload create_api_operation(parent: nil, api_operation_id: nil, api_operation: nil)
2089
+ # Pass arguments to `create_api_operation` via keyword arguments. Note that at
2090
+ # least one keyword argument is required. To specify no parameters, or to keep all
2091
+ # the default parameter values, pass an empty Hash as a request object (see above).
2092
+ #
2093
+ # @param parent [::String]
2094
+ # Required. The parent resource for the operation resource.
2095
+ # Format:
2096
+ # `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
2097
+ # @param api_operation_id [::String]
2098
+ # Optional. The ID to use for the operation resource, which will become the
2099
+ # final component of the operation's resource name. This field is optional.
2100
+ #
2101
+ # * If provided, the same will be used. The service will throw an error if
2102
+ # the specified id is already used by another operation resource in the API
2103
+ # hub.
2104
+ # * If not provided, a system generated id will be used.
2105
+ #
2106
+ # This value should be 4-500 characters, overall resource name which
2107
+ # will be of format
2108
+ # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
2109
+ # its length is limited to 700 characters, and valid characters are
2110
+ # /[a-z][A-Z][0-9]-_/.
2111
+ # @param api_operation [::Google::Cloud::ApiHub::V1::ApiOperation, ::Hash]
2112
+ # Required. The operation resource to create.
2113
+ # @yield [result, operation] Access the result along with the TransportOperation object
2114
+ # @yieldparam result [::Google::Cloud::ApiHub::V1::ApiOperation]
2115
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2116
+ #
2117
+ # @return [::Google::Cloud::ApiHub::V1::ApiOperation]
2118
+ #
2119
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2120
+ #
2121
+ # @example Basic example
2122
+ # require "google/cloud/api_hub/v1"
2123
+ #
2124
+ # # Create a client object. The client can be reused for multiple calls.
2125
+ # client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new
2126
+ #
2127
+ # # Create a request. To set request fields, pass in keyword arguments.
2128
+ # request = Google::Cloud::ApiHub::V1::CreateApiOperationRequest.new
2129
+ #
2130
+ # # Call the create_api_operation method.
2131
+ # result = client.create_api_operation request
2132
+ #
2133
+ # # The returned object is of type Google::Cloud::ApiHub::V1::ApiOperation.
2134
+ # p result
2135
+ #
2136
+ def create_api_operation request, options = nil
2137
+ raise ::ArgumentError, "request must be provided" if request.nil?
2138
+
2139
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApiHub::V1::CreateApiOperationRequest
2140
+
2141
+ # Converts hash and nil to an options object
2142
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2143
+
2144
+ # Customize the options with defaults
2145
+ call_metadata = @config.rpcs.create_api_operation.metadata.to_h
2146
+
2147
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2148
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2149
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2150
+ gapic_version: ::Google::Cloud::ApiHub::V1::VERSION,
2151
+ transports_version_send: [:rest]
2152
+
2153
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2154
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2155
+
2156
+ options.apply_defaults timeout: @config.rpcs.create_api_operation.timeout,
2157
+ metadata: call_metadata,
2158
+ retry_policy: @config.rpcs.create_api_operation.retry_policy
2159
+
2160
+ options.apply_defaults timeout: @config.timeout,
2161
+ metadata: @config.metadata,
2162
+ retry_policy: @config.retry_policy
2163
+
2164
+ @api_hub_stub.create_api_operation request, options do |result, operation|
2165
+ yield result, operation if block_given?
2166
+ end
2167
+ rescue ::Gapic::Rest::Error => e
2168
+ raise ::Google::Cloud::Error.from_error(e)
2169
+ end
2170
+
1964
2171
  ##
1965
2172
  # Get details about a particular operation in API version.
1966
2173
  #
@@ -2085,6 +2292,30 @@ module Google
2085
2292
  # * `create_time` - The time at which the ApiOperation was created. The
2086
2293
  # value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339]
2087
2294
  # format. Allowed comparison operators: `>` and `<`.
2295
+ # * `attributes.projects/test-project-id/locations/test-location-id/
2296
+ # attributes/user-defined-attribute-id.enum_values.values.id` - The
2297
+ # allowed value id of the user defined enum attribute associated with the
2298
+ # Resource. Allowed comparison operator is `:`. Here
2299
+ # user-defined-attribute-enum-id is a placeholder that can be replaced with
2300
+ # any user defined enum attribute name.
2301
+ # * `attributes.projects/test-project-id/locations/test-location-id/
2302
+ # attributes/user-defined-attribute-id.enum_values.values.display_name`
2303
+ # - The allowed value display name of the user defined enum attribute
2304
+ # associated with the Resource. Allowed comparison operator is `:`. Here
2305
+ # user-defined-attribute-enum-display-name is a placeholder that can be
2306
+ # replaced with any user defined enum attribute enum name.
2307
+ # * `attributes.projects/test-project-id/locations/test-location-id/
2308
+ # attributes/user-defined-attribute-id.string_values.values` - The
2309
+ # allowed value of the user defined string attribute associated with the
2310
+ # Resource. Allowed comparison operator is `:`. Here
2311
+ # user-defined-attribute-string is a placeholder that can be replaced with
2312
+ # any user defined string attribute name.
2313
+ # * `attributes.projects/test-project-id/locations/test-location-id/
2314
+ # attributes/user-defined-attribute-id.json_values.values` - The
2315
+ # allowed value of the user defined JSON attribute associated with the
2316
+ # Resource. Allowed comparison operator is `:`. Here
2317
+ # user-defined-attribute-json is a placeholder that can be replaced with
2318
+ # any user defined JSON attribute name.
2088
2319
  #
2089
2320
  # Expressions are combined with either `AND` logic operator or `OR` logical
2090
2321
  # operator but not both of them together i.e. only one of the `AND` or `OR`
@@ -2104,6 +2335,11 @@ module Google
2104
2335
  # * `details.http_operation.method = GET OR details.http_operation.method =
2105
2336
  # POST`. - The http operation of the method of ApiOperation is _GET_ or
2106
2337
  # _POST_.
2338
+ # * `details.deprecated = True AND
2339
+ # attributes.projects/test-project-id/locations/test-location-id/
2340
+ # attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values:
2341
+ # test` - The filter string specifies that the ApiOperation is deprecated
2342
+ # and the value of the user defined attribute of type string is _test_.
2107
2343
  # @param page_size [::Integer]
2108
2344
  # Optional. The maximum number of operations to return. The service may
2109
2345
  # return fewer than this value. If unspecified, at most 50 operations will be
@@ -2179,6 +2415,191 @@ module Google
2179
2415
  raise ::Google::Cloud::Error.from_error(e)
2180
2416
  end
2181
2417
 
2418
+ ##
2419
+ # Update an operation in an API version. The following fields in the
2420
+ # {::Google::Cloud::ApiHub::V1::ApiOperation ApiOperation resource} can be
2421
+ # updated:
2422
+ #
2423
+ # * [details.description][ApiOperation.details.description]
2424
+ # * [details.documentation][ApiOperation.details.documentation]
2425
+ # * [details.http_operation.path][ApiOperation.details.http_operation.path.path]
2426
+ # * [details.http_operation.method][ApiOperation.details.http_operation.method]
2427
+ # * [details.deprecated][ApiOperation.details.deprecated]
2428
+ # * {::Google::Cloud::ApiHub::V1::ApiOperation#attributes attributes}
2429
+ #
2430
+ # The
2431
+ # {::Google::Cloud::ApiHub::V1::UpdateApiOperationRequest#update_mask update_mask}
2432
+ # should be used to specify the fields being updated.
2433
+ #
2434
+ # An operation can be updated only if the operation was created via
2435
+ # {::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client#create_api_operation CreateApiOperation} API.
2436
+ # If the operation was created by parsing the spec, then it can be edited by
2437
+ # updating the spec.
2438
+ #
2439
+ # @overload update_api_operation(request, options = nil)
2440
+ # Pass arguments to `update_api_operation` via a request object, either of type
2441
+ # {::Google::Cloud::ApiHub::V1::UpdateApiOperationRequest} or an equivalent Hash.
2442
+ #
2443
+ # @param request [::Google::Cloud::ApiHub::V1::UpdateApiOperationRequest, ::Hash]
2444
+ # A request object representing the call parameters. Required. To specify no
2445
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2446
+ # @param options [::Gapic::CallOptions, ::Hash]
2447
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2448
+ #
2449
+ # @overload update_api_operation(api_operation: nil, update_mask: nil)
2450
+ # Pass arguments to `update_api_operation` via keyword arguments. Note that at
2451
+ # least one keyword argument is required. To specify no parameters, or to keep all
2452
+ # the default parameter values, pass an empty Hash as a request object (see above).
2453
+ #
2454
+ # @param api_operation [::Google::Cloud::ApiHub::V1::ApiOperation, ::Hash]
2455
+ # Required. The apiOperation resource to update.
2456
+ #
2457
+ # The operation resource's `name` field is used to identify the operation
2458
+ # resource to update.
2459
+ # Format:
2460
+ # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
2461
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2462
+ # Required. The list of fields to update.
2463
+ # @yield [result, operation] Access the result along with the TransportOperation object
2464
+ # @yieldparam result [::Google::Cloud::ApiHub::V1::ApiOperation]
2465
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2466
+ #
2467
+ # @return [::Google::Cloud::ApiHub::V1::ApiOperation]
2468
+ #
2469
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2470
+ #
2471
+ # @example Basic example
2472
+ # require "google/cloud/api_hub/v1"
2473
+ #
2474
+ # # Create a client object. The client can be reused for multiple calls.
2475
+ # client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new
2476
+ #
2477
+ # # Create a request. To set request fields, pass in keyword arguments.
2478
+ # request = Google::Cloud::ApiHub::V1::UpdateApiOperationRequest.new
2479
+ #
2480
+ # # Call the update_api_operation method.
2481
+ # result = client.update_api_operation request
2482
+ #
2483
+ # # The returned object is of type Google::Cloud::ApiHub::V1::ApiOperation.
2484
+ # p result
2485
+ #
2486
+ def update_api_operation request, options = nil
2487
+ raise ::ArgumentError, "request must be provided" if request.nil?
2488
+
2489
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApiHub::V1::UpdateApiOperationRequest
2490
+
2491
+ # Converts hash and nil to an options object
2492
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2493
+
2494
+ # Customize the options with defaults
2495
+ call_metadata = @config.rpcs.update_api_operation.metadata.to_h
2496
+
2497
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2498
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2499
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2500
+ gapic_version: ::Google::Cloud::ApiHub::V1::VERSION,
2501
+ transports_version_send: [:rest]
2502
+
2503
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2504
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2505
+
2506
+ options.apply_defaults timeout: @config.rpcs.update_api_operation.timeout,
2507
+ metadata: call_metadata,
2508
+ retry_policy: @config.rpcs.update_api_operation.retry_policy
2509
+
2510
+ options.apply_defaults timeout: @config.timeout,
2511
+ metadata: @config.metadata,
2512
+ retry_policy: @config.retry_policy
2513
+
2514
+ @api_hub_stub.update_api_operation request, options do |result, operation|
2515
+ yield result, operation if block_given?
2516
+ end
2517
+ rescue ::Gapic::Rest::Error => e
2518
+ raise ::Google::Cloud::Error.from_error(e)
2519
+ end
2520
+
2521
+ ##
2522
+ # Delete an operation in an API version and we can delete only the
2523
+ # operations created via create API. If the operation was created by parsing
2524
+ # the spec, then it can be deleted by editing or deleting the spec.
2525
+ #
2526
+ # @overload delete_api_operation(request, options = nil)
2527
+ # Pass arguments to `delete_api_operation` via a request object, either of type
2528
+ # {::Google::Cloud::ApiHub::V1::DeleteApiOperationRequest} or an equivalent Hash.
2529
+ #
2530
+ # @param request [::Google::Cloud::ApiHub::V1::DeleteApiOperationRequest, ::Hash]
2531
+ # A request object representing the call parameters. Required. To specify no
2532
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2533
+ # @param options [::Gapic::CallOptions, ::Hash]
2534
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2535
+ #
2536
+ # @overload delete_api_operation(name: nil)
2537
+ # Pass arguments to `delete_api_operation` via keyword arguments. Note that at
2538
+ # least one keyword argument is required. To specify no parameters, or to keep all
2539
+ # the default parameter values, pass an empty Hash as a request object (see above).
2540
+ #
2541
+ # @param name [::String]
2542
+ # Required. The name of the operation resource to delete.
2543
+ # Format:
2544
+ # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
2545
+ # @yield [result, operation] Access the result along with the TransportOperation object
2546
+ # @yieldparam result [::Google::Protobuf::Empty]
2547
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2548
+ #
2549
+ # @return [::Google::Protobuf::Empty]
2550
+ #
2551
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2552
+ #
2553
+ # @example Basic example
2554
+ # require "google/cloud/api_hub/v1"
2555
+ #
2556
+ # # Create a client object. The client can be reused for multiple calls.
2557
+ # client = Google::Cloud::ApiHub::V1::ApiHub::Rest::Client.new
2558
+ #
2559
+ # # Create a request. To set request fields, pass in keyword arguments.
2560
+ # request = Google::Cloud::ApiHub::V1::DeleteApiOperationRequest.new
2561
+ #
2562
+ # # Call the delete_api_operation method.
2563
+ # result = client.delete_api_operation request
2564
+ #
2565
+ # # The returned object is of type Google::Protobuf::Empty.
2566
+ # p result
2567
+ #
2568
+ def delete_api_operation request, options = nil
2569
+ raise ::ArgumentError, "request must be provided" if request.nil?
2570
+
2571
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApiHub::V1::DeleteApiOperationRequest
2572
+
2573
+ # Converts hash and nil to an options object
2574
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2575
+
2576
+ # Customize the options with defaults
2577
+ call_metadata = @config.rpcs.delete_api_operation.metadata.to_h
2578
+
2579
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2580
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2581
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2582
+ gapic_version: ::Google::Cloud::ApiHub::V1::VERSION,
2583
+ transports_version_send: [:rest]
2584
+
2585
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2586
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2587
+
2588
+ options.apply_defaults timeout: @config.rpcs.delete_api_operation.timeout,
2589
+ metadata: call_metadata,
2590
+ retry_policy: @config.rpcs.delete_api_operation.retry_policy
2591
+
2592
+ options.apply_defaults timeout: @config.timeout,
2593
+ metadata: @config.metadata,
2594
+ retry_policy: @config.retry_policy
2595
+
2596
+ @api_hub_stub.delete_api_operation request, options do |result, operation|
2597
+ yield result, operation if block_given?
2598
+ end
2599
+ rescue ::Gapic::Rest::Error => e
2600
+ raise ::Google::Cloud::Error.from_error(e)
2601
+ end
2602
+
2182
2603
  ##
2183
2604
  # Get details about a definition in an API version.
2184
2605
  #
@@ -2472,6 +2893,10 @@ module Google
2472
2893
  # comparison operators: `=`.
2473
2894
  # * `api_versions` - The API versions linked to this deployment. Allowed
2474
2895
  # comparison operators: `:`.
2896
+ # * `source_project` - The project/organization at source for the
2897
+ # deployment. Allowed comparison operators: `=`.
2898
+ # * `source_environment` - The environment at source for the
2899
+ # deployment. Allowed comparison operators: `=`.
2475
2900
  # * `deployment_type.enum_values.values.id` - The allowed value id of the
2476
2901
  # deployment_type attribute associated with the Deployment. Allowed
2477
2902
  # comparison operators: `:`.
@@ -2487,6 +2912,38 @@ module Google
2487
2912
  # * `environment.enum_values.values.display_name` - The allowed value
2488
2913
  # display name of the environment attribute associated with the deployment.
2489
2914
  # Allowed comparison operators: `:`.
2915
+ # * `attributes.projects/test-project-id/locations/test-location-id/
2916
+ # attributes/user-defined-attribute-id.enum_values.values.id` - The
2917
+ # allowed value id of the user defined enum attribute associated with the
2918
+ # Resource. Allowed comparison operator is `:`. Here
2919
+ # user-defined-attribute-enum-id is a placeholder that can be replaced with
2920
+ # any user defined enum attribute name.
2921
+ # * `attributes.projects/test-project-id/locations/test-location-id/
2922
+ # attributes/user-defined-attribute-id.enum_values.values.display_name`
2923
+ # - The allowed value display name of the user defined enum attribute
2924
+ # associated with the Resource. Allowed comparison operator is `:`. Here
2925
+ # user-defined-attribute-enum-display-name is a placeholder that can be
2926
+ # replaced with any user defined enum attribute enum name.
2927
+ # * `attributes.projects/test-project-id/locations/test-location-id/
2928
+ # attributes/user-defined-attribute-id.string_values.values` - The
2929
+ # allowed value of the user defined string attribute associated with the
2930
+ # Resource. Allowed comparison operator is `:`. Here
2931
+ # user-defined-attribute-string is a placeholder that can be replaced with
2932
+ # any user defined string attribute name.
2933
+ # * `attributes.projects/test-project-id/locations/test-location-id/
2934
+ # attributes/user-defined-attribute-id.json_values.values` - The
2935
+ # allowed value of the user defined JSON attribute associated with the
2936
+ # Resource. Allowed comparison operator is `:`. Here
2937
+ # user-defined-attribute-json is a placeholder that can be replaced with
2938
+ # any user defined JSON attribute name.
2939
+ #
2940
+ # A filter function is also supported in the filter string. The filter
2941
+ # function is `id(name)`. The `id(name)` function returns the id of the
2942
+ # resource name. For example, `id(name) = \"deployment-1\"` is equivalent to
2943
+ # `name =
2944
+ # \"projects/test-project-id/locations/test-location-id/deployments/deployment-1\"`
2945
+ # provided the parent is
2946
+ # `projects/test-project-id/locations/test-location-id`.
2490
2947
  #
2491
2948
  # Expressions are combined with either `AND` logic operator or `OR` logical
2492
2949
  # operator but not both of them together i.e. only one of the `AND` or `OR`
@@ -2512,6 +2969,12 @@ module Google
2512
2969
  # slo.string_values.values: \"99.99%\"`
2513
2970
  # - The allowed value id of the environment attribute Deployment is
2514
2971
  # _production-id_ or string value of the slo attribute is _99.99%_.
2972
+ # * `environment.enum_values.values.id: staging-id AND
2973
+ # attributes.projects/test-project-id/locations/test-location-id/
2974
+ # attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values:
2975
+ # test` - The filter string specifies that the allowed value id of the
2976
+ # environment attribute associated with the Deployment is _staging-id_ and
2977
+ # the value of the user defined attribute of type string is _test_.
2515
2978
  # @param page_size [::Integer]
2516
2979
  # Optional. The maximum number of deployment resources to return. The service
2517
2980
  # may return fewer than this value. If unspecified, at most 50 deployments
@@ -2601,7 +3064,11 @@ module Google
2601
3064
  # * {::Google::Cloud::ApiHub::V1::Deployment#slo slo}
2602
3065
  # * {::Google::Cloud::ApiHub::V1::Deployment#environment environment}
2603
3066
  # * {::Google::Cloud::ApiHub::V1::Deployment#attributes attributes}
2604
- #
3067
+ # * [source_project] [google.cloud.apihub.v1.Deployment.source_project]
3068
+ # * [source_environment]
3069
+ # [google.cloud.apihub.v1.Deployment.source_environment]
3070
+ # * {::Google::Cloud::ApiHub::V1::Deployment#management_url management_url}
3071
+ # * {::Google::Cloud::ApiHub::V1::Deployment#source_uri source_uri}
2605
3072
  # The
2606
3073
  # {::Google::Cloud::ApiHub::V1::UpdateDeploymentRequest#update_mask update_mask}
2607
3074
  # should be used to specify the fields being updated.
@@ -4077,6 +4544,11 @@ module Google
4077
4544
  #
4078
4545
  attr_reader :delete_spec
4079
4546
  ##
4547
+ # RPC-specific configuration for `create_api_operation`
4548
+ # @return [::Gapic::Config::Method]
4549
+ #
4550
+ attr_reader :create_api_operation
4551
+ ##
4080
4552
  # RPC-specific configuration for `get_api_operation`
4081
4553
  # @return [::Gapic::Config::Method]
4082
4554
  #
@@ -4087,6 +4559,16 @@ module Google
4087
4559
  #
4088
4560
  attr_reader :list_api_operations
4089
4561
  ##
4562
+ # RPC-specific configuration for `update_api_operation`
4563
+ # @return [::Gapic::Config::Method]
4564
+ #
4565
+ attr_reader :update_api_operation
4566
+ ##
4567
+ # RPC-specific configuration for `delete_api_operation`
4568
+ # @return [::Gapic::Config::Method]
4569
+ #
4570
+ attr_reader :delete_api_operation
4571
+ ##
4090
4572
  # RPC-specific configuration for `get_definition`
4091
4573
  # @return [::Gapic::Config::Method]
4092
4574
  #
@@ -4206,10 +4688,16 @@ module Google
4206
4688
  @update_spec = ::Gapic::Config::Method.new update_spec_config
4207
4689
  delete_spec_config = parent_rpcs.delete_spec if parent_rpcs.respond_to? :delete_spec
4208
4690
  @delete_spec = ::Gapic::Config::Method.new delete_spec_config
4691
+ create_api_operation_config = parent_rpcs.create_api_operation if parent_rpcs.respond_to? :create_api_operation
4692
+ @create_api_operation = ::Gapic::Config::Method.new create_api_operation_config
4209
4693
  get_api_operation_config = parent_rpcs.get_api_operation if parent_rpcs.respond_to? :get_api_operation
4210
4694
  @get_api_operation = ::Gapic::Config::Method.new get_api_operation_config
4211
4695
  list_api_operations_config = parent_rpcs.list_api_operations if parent_rpcs.respond_to? :list_api_operations
4212
4696
  @list_api_operations = ::Gapic::Config::Method.new list_api_operations_config
4697
+ update_api_operation_config = parent_rpcs.update_api_operation if parent_rpcs.respond_to? :update_api_operation
4698
+ @update_api_operation = ::Gapic::Config::Method.new update_api_operation_config
4699
+ delete_api_operation_config = parent_rpcs.delete_api_operation if parent_rpcs.respond_to? :delete_api_operation
4700
+ @delete_api_operation = ::Gapic::Config::Method.new delete_api_operation_config
4213
4701
  get_definition_config = parent_rpcs.get_definition if parent_rpcs.respond_to? :get_definition
4214
4702
  @get_definition = ::Gapic::Config::Method.new get_definition_config
4215
4703
  create_deployment_config = parent_rpcs.create_deployment if parent_rpcs.respond_to? :create_deployment