google-cloud-service_management-v1 0.3.6 → 0.3.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08670dcd2436bd5ca038f3642bf032428700c9710456d0454d6e0a042c99d746'
4
- data.tar.gz: 1a200a5d2a56cd10c2b9c55f92d63349512bdca63b93f67456af50edfcd1263e
3
+ metadata.gz: a4a92f6582f903346c7e3547155696edf19537c79a35f94c76e98cea7dd4bf1e
4
+ data.tar.gz: f06b7281924b03ed8fed80168dd4ca321852c843b0ae1b99f2cfc9f4c530782f
5
5
  SHA512:
6
- metadata.gz: 86792cc0240a868dad3564ad3f0b1102a106a7032990732b95763458e0bbbd661efbea6d25573138f961681c3f00b3bfe4188948cd0c9c2ce5d59ead8720d8ff
7
- data.tar.gz: 997c0cc69166353387d8cece94783a7161f69af48ac1c319853cfb8c005f237547a9aff599a9055b737220d941e86f501ec1e514237241740b38ec102807b7b6
6
+ metadata.gz: 0c79d8cdc0a6feb0fd0470d699e1eb78ef11ff253b85107149505a8e251564b7413aab83af937f7c3331c5b078a544c8e3bbd684dbb09ae25bbff1b78468dd7b
7
+ data.tar.gz: c786b52cda3a07f09c3d0a205d0dc2ed8fd570925c1107e4d7eeed534d1a606d3431255372dca8514ca26a0ae8bc70946747206cafedb09291375fff3866134c
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new # (req
37
37
  response = client.list_services request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-service_management-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/service-infrastructure/docs/overview/)
@@ -1,17 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicemanagement/v1/resources.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/api/config_change_pb'
6
5
  require 'google/api/field_behavior_pb'
7
- require 'google/api/metric_pb'
8
- require 'google/api/quota_pb'
9
- require 'google/api/service_pb'
10
- require 'google/longrunning/operations_pb'
11
- require 'google/protobuf/any_pb'
12
- require 'google/protobuf/field_mask_pb'
13
6
  require 'google/protobuf/timestamp_pb'
14
- require 'google/rpc/status_pb'
15
7
  require 'google/protobuf'
16
8
 
17
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -8,8 +8,6 @@ require 'google/api/service_pb'
8
8
  require 'google/api/servicemanagement/v1/resources_pb'
9
9
  require 'google/longrunning/operations_pb'
10
10
  require 'google/protobuf/any_pb'
11
- require 'google/protobuf/field_mask_pb'
12
- require 'google/rpc/status_pb'
13
11
  require 'google/protobuf'
14
12
 
15
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -87,18 +85,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
87
85
  optional :service_name, :string, 1
88
86
  optional :rollout_id, :string, 2
89
87
  end
90
- add_message "google.api.servicemanagement.v1.EnableServiceRequest" do
91
- optional :service_name, :string, 1
92
- optional :consumer_id, :string, 2
93
- end
94
- add_message "google.api.servicemanagement.v1.EnableServiceResponse" do
95
- end
96
- add_message "google.api.servicemanagement.v1.DisableServiceRequest" do
97
- optional :service_name, :string, 1
98
- optional :consumer_id, :string, 2
99
- end
100
- add_message "google.api.servicemanagement.v1.DisableServiceResponse" do
101
- end
102
88
  add_message "google.api.servicemanagement.v1.GenerateConfigReportRequest" do
103
89
  optional :new_config, :message, 1, "google.protobuf.Any"
104
90
  optional :old_config, :message, 2, "google.protobuf.Any"
@@ -134,10 +120,6 @@ module Google
134
120
  ListServiceRolloutsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceRolloutsRequest").msgclass
135
121
  ListServiceRolloutsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceRolloutsResponse").msgclass
136
122
  GetServiceRolloutRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GetServiceRolloutRequest").msgclass
137
- EnableServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.EnableServiceRequest").msgclass
138
- EnableServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.EnableServiceResponse").msgclass
139
- DisableServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.DisableServiceRequest").msgclass
140
- DisableServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.DisableServiceResponse").msgclass
141
123
  GenerateConfigReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GenerateConfigReportRequest").msgclass
142
124
  GenerateConfigReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GenerateConfigReportResponse").msgclass
143
125
  end
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/api/servicemanagement/v1/servicemanager.proto for package 'Google.Cloud.ServiceManagement.V1'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2022 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@ module Google
24
24
  module ServiceManagement
25
25
  module V1
26
26
  module ServiceManager
27
- # [Google Service Management API](https://cloud.google.com/service-management/overview)
27
+ # [Google Service Management API](/service-management/overview)
28
28
  class Service
29
29
 
30
30
  include ::GRPC::GenericService
@@ -38,16 +38,19 @@ module Google
38
38
  # Returns all public services. For authenticated users, also returns all
39
39
  # services the calling user has "servicemanagement.services.get" permission
40
40
  # for.
41
- #
42
- # **BETA:** If the caller specifies the `consumer_id`, it returns only the
43
- # services enabled on the consumer. The `consumer_id` must have the format
44
- # of "project:{PROJECT-ID}".
45
41
  rpc :ListServices, ::Google::Cloud::ServiceManagement::V1::ListServicesRequest, ::Google::Cloud::ServiceManagement::V1::ListServicesResponse
46
42
  # Gets a managed service. Authentication is required unless the service is
47
43
  # public.
48
44
  rpc :GetService, ::Google::Cloud::ServiceManagement::V1::GetServiceRequest, ::Google::Cloud::ServiceManagement::V1::ManagedService
49
45
  # Creates a new managed service.
50
- # Please note one producer project can own no more than 20 services.
46
+ #
47
+ # A managed service is immutable, and is subject to mandatory 30-day
48
+ # data retention. You cannot move a service or recreate it within 30 days
49
+ # after deletion.
50
+ #
51
+ # One producer project can own no more than 500 services. For security and
52
+ # reliability purposes, a production service should be hosted in a
53
+ # dedicated producer project.
51
54
  #
52
55
  # Operation<response: ManagedService>
53
56
  rpc :CreateService, ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, ::Google::Longrunning::Operation
@@ -125,19 +128,6 @@ module Google
125
128
  # will compare GenerateConfigReportRequest.new_value with the last pushed
126
129
  # service configuration.
127
130
  rpc :GenerateConfigReport, ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse
128
- # Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used
129
- # for the project. See
130
- # [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for
131
- # more information.
132
- #
133
- # Operation<response: EnableServiceResponse>
134
- rpc :EnableService, ::Google::Cloud::ServiceManagement::V1::EnableServiceRequest, ::Google::Longrunning::Operation
135
- # Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be
136
- # be used for the project. It prevents accidental usage that may cause
137
- # unexpected billing charges or security leaks.
138
- #
139
- # Operation<response: DisableServiceResponse>
140
- rpc :DisableService, ::Google::Cloud::ServiceManagement::V1::DisableServiceRequest, ::Google::Longrunning::Operation
141
131
  end
142
132
 
143
133
  Stub = Service.rpc_stub_class
@@ -27,7 +27,7 @@ module Google
27
27
  ##
28
28
  # Client for the ServiceManager service.
29
29
  #
30
- # [Google Service Management API](https://cloud.google.com/service-management/overview)
30
+ # [Google Service Management API](/service-management/overview)
31
31
  #
32
32
  class Client
33
33
  # @private
@@ -62,6 +62,8 @@ module Google
62
62
  end
63
63
  default_config = Client::Configuration.new parent_config
64
64
 
65
+ default_config.timeout = 10.0
66
+
65
67
  default_config
66
68
  end
67
69
  yield @configure if block_given?
@@ -162,10 +164,6 @@ module Google
162
164
  # services the calling user has "servicemanagement.services.get" permission
163
165
  # for.
164
166
  #
165
- # **BETA:** If the caller specifies the `consumer_id`, it returns only the
166
- # services enabled on the consumer. The `consumer_id` must have the format
167
- # of "project:\\{PROJECT-ID}".
168
- #
169
167
  # @overload list_services(request, options = nil)
170
168
  # Pass arguments to `list_services` via a request object, either of type
171
169
  # {::Google::Cloud::ServiceManagement::V1::ListServicesRequest} or an equivalent Hash.
@@ -348,7 +346,14 @@ module Google
348
346
 
349
347
  ##
350
348
  # Creates a new managed service.
351
- # Please note one producer project can own no more than 20 services.
349
+ #
350
+ # A managed service is immutable, and is subject to mandatory 30-day
351
+ # data retention. You cannot move a service or recreate it within 30 days
352
+ # after deletion.
353
+ #
354
+ # One producer project can own no more than 500 services. For security and
355
+ # reliability purposes, a production service should be hosted in a
356
+ # dedicated producer project.
352
357
  #
353
358
  # Operation<response: ManagedService>
354
359
  #
@@ -458,7 +463,7 @@ module Google
458
463
  # the default parameter values, pass an empty Hash as a request object (see above).
459
464
  #
460
465
  # @param service_name [::String]
461
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
466
+ # Required. The name of the service. See the [overview](/service-management/overview)
462
467
  # for naming requirements. For example: `example.googleapis.com`.
463
468
  #
464
469
  # @yield [response, operation] Access the result along with the RPC operation
@@ -557,7 +562,7 @@ module Google
557
562
  # the default parameter values, pass an empty Hash as a request object (see above).
558
563
  #
559
564
  # @param service_name [::String]
560
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
565
+ # Required. The name of the service. See the [overview](/service-management/overview)
561
566
  # for naming requirements. For example: `example.googleapis.com`.
562
567
  #
563
568
  # @yield [response, operation] Access the result along with the RPC operation
@@ -652,7 +657,7 @@ module Google
652
657
  # the default parameter values, pass an empty Hash as a request object (see above).
653
658
  #
654
659
  # @param service_name [::String]
655
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
660
+ # Required. The name of the service. See the [overview](/service-management/overview)
656
661
  # for naming requirements. For example: `example.googleapis.com`.
657
662
  # @param page_token [::String]
658
663
  # The token of the page to retrieve.
@@ -750,7 +755,7 @@ module Google
750
755
  # the default parameter values, pass an empty Hash as a request object (see above).
751
756
  #
752
757
  # @param service_name [::String]
753
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
758
+ # Required. The name of the service. See the [overview](/service-management/overview)
754
759
  # for naming requirements. For example: `example.googleapis.com`.
755
760
  # @param config_id [::String]
756
761
  # Required. The id of the service configuration resource.
@@ -854,7 +859,7 @@ module Google
854
859
  # the default parameter values, pass an empty Hash as a request object (see above).
855
860
  #
856
861
  # @param service_name [::String]
857
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
862
+ # Required. The name of the service. See the [overview](/service-management/overview)
858
863
  # for naming requirements. For example: `example.googleapis.com`.
859
864
  # @param service_config [::Google::Api::Service, ::Hash]
860
865
  # Required. The service configuration resource.
@@ -954,7 +959,7 @@ module Google
954
959
  # the default parameter values, pass an empty Hash as a request object (see above).
955
960
  #
956
961
  # @param service_name [::String]
957
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
962
+ # Required. The name of the service. See the [overview](/service-management/overview)
958
963
  # for naming requirements. For example: `example.googleapis.com`.
959
964
  # @param config_source [::Google::Cloud::ServiceManagement::V1::ConfigSource, ::Hash]
960
965
  # Required. The source configuration for the service.
@@ -1055,7 +1060,7 @@ module Google
1055
1060
  # the default parameter values, pass an empty Hash as a request object (see above).
1056
1061
  #
1057
1062
  # @param service_name [::String]
1058
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
1063
+ # Required. The name of the service. See the [overview](/service-management/overview)
1059
1064
  # for naming requirements. For example: `example.googleapis.com`.
1060
1065
  # @param page_token [::String]
1061
1066
  # The token of the page to retrieve.
@@ -1066,10 +1071,10 @@ module Google
1066
1071
  # Required. Use `filter` to return subset of rollouts.
1067
1072
  # The following filters are supported:
1068
1073
  # -- To limit the results to only those in
1069
- # status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
1074
+ # [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
1070
1075
  # use filter='status=SUCCESS'
1071
1076
  # -- To limit the results to those in
1072
- # status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
1077
+ # [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
1073
1078
  # or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
1074
1079
  #
1075
1080
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1162,7 +1167,7 @@ module Google
1162
1167
  # the default parameter values, pass an empty Hash as a request object (see above).
1163
1168
  #
1164
1169
  # @param service_name [::String]
1165
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
1170
+ # Required. The name of the service. See the [overview](/service-management/overview)
1166
1171
  # for naming requirements. For example: `example.googleapis.com`.
1167
1172
  # @param rollout_id [::String]
1168
1173
  # Required. The id of the rollout resource.
@@ -1266,7 +1271,7 @@ module Google
1266
1271
  # the default parameter values, pass an empty Hash as a request object (see above).
1267
1272
  #
1268
1273
  # @param service_name [::String]
1269
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
1274
+ # Required. The name of the service. See the [overview](/service-management/overview)
1270
1275
  # for naming requirements. For example: `example.googleapis.com`.
1271
1276
  # @param rollout [::Google::Cloud::ServiceManagement::V1::Rollout, ::Hash]
1272
1277
  # Required. The rollout resource. The `service_name` field is output only.
@@ -1440,227 +1445,6 @@ module Google
1440
1445
  raise ::Google::Cloud::Error.from_error(e)
1441
1446
  end
1442
1447
 
1443
- ##
1444
- # Enables a {::Google::Cloud::ServiceManagement::V1::ManagedService service} for a project, so it can be used
1445
- # for the project. See
1446
- # [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for
1447
- # more information.
1448
- #
1449
- # Operation<response: EnableServiceResponse>
1450
- #
1451
- # @deprecated This method is deprecated and may be removed in the next major version update.
1452
- #
1453
- # @overload enable_service(request, options = nil)
1454
- # Pass arguments to `enable_service` via a request object, either of type
1455
- # {::Google::Cloud::ServiceManagement::V1::EnableServiceRequest} or an equivalent Hash.
1456
- #
1457
- # @param request [::Google::Cloud::ServiceManagement::V1::EnableServiceRequest, ::Hash]
1458
- # A request object representing the call parameters. Required. To specify no
1459
- # parameters, or to keep all the default parameter values, pass an empty Hash.
1460
- # @param options [::Gapic::CallOptions, ::Hash]
1461
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1462
- #
1463
- # @overload enable_service(service_name: nil, consumer_id: nil)
1464
- # Pass arguments to `enable_service` via keyword arguments. Note that at
1465
- # least one keyword argument is required. To specify no parameters, or to keep all
1466
- # the default parameter values, pass an empty Hash as a request object (see above).
1467
- #
1468
- # @param service_name [::String]
1469
- # Required. Name of the service to enable. Specifying an unknown service name will
1470
- # cause the request to fail.
1471
- # @param consumer_id [::String]
1472
- # Required. The identity of consumer resource which service enablement will be
1473
- # applied to.
1474
- #
1475
- # The Google Service Management implementation accepts the following
1476
- # forms:
1477
- # - "project:<project_id>"
1478
- #
1479
- # Note: this is made compatible with
1480
- # google.api.servicecontrol.v1.Operation.consumer_id.
1481
- #
1482
- # @yield [response, operation] Access the result along with the RPC operation
1483
- # @yieldparam response [::Gapic::Operation]
1484
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
1485
- #
1486
- # @return [::Gapic::Operation]
1487
- #
1488
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
1489
- #
1490
- # @example Basic example
1491
- # require "google/cloud/service_management/v1"
1492
- #
1493
- # # Create a client object. The client can be reused for multiple calls.
1494
- # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
1495
- #
1496
- # # Create a request. To set request fields, pass in keyword arguments.
1497
- # request = Google::Cloud::ServiceManagement::V1::EnableServiceRequest.new
1498
- #
1499
- # # Call the enable_service method.
1500
- # result = client.enable_service request
1501
- #
1502
- # # The returned object is of type Gapic::Operation. You can use this
1503
- # # object to check the status of an operation, cancel it, or wait
1504
- # # for results. Here is how to block until completion:
1505
- # result.wait_until_done! timeout: 60
1506
- # if result.response?
1507
- # p result.response
1508
- # else
1509
- # puts "Error!"
1510
- # end
1511
- #
1512
- def enable_service request, options = nil
1513
- raise ::ArgumentError, "request must be provided" if request.nil?
1514
-
1515
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::EnableServiceRequest
1516
-
1517
- # Converts hash and nil to an options object
1518
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1519
-
1520
- # Customize the options with defaults
1521
- metadata = @config.rpcs.enable_service.metadata.to_h
1522
-
1523
- # Set x-goog-api-client and x-goog-user-project headers
1524
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1525
- lib_name: @config.lib_name, lib_version: @config.lib_version,
1526
- gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
1527
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1528
-
1529
- header_params = {}
1530
- if request.service_name
1531
- header_params["service_name"] = request.service_name
1532
- end
1533
-
1534
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1535
- metadata[:"x-goog-request-params"] ||= request_params_header
1536
-
1537
- options.apply_defaults timeout: @config.rpcs.enable_service.timeout,
1538
- metadata: metadata,
1539
- retry_policy: @config.rpcs.enable_service.retry_policy
1540
-
1541
- options.apply_defaults timeout: @config.timeout,
1542
- metadata: @config.metadata,
1543
- retry_policy: @config.retry_policy
1544
-
1545
- @service_manager_stub.call_rpc :enable_service, request, options: options do |response, operation|
1546
- response = ::Gapic::Operation.new response, @operations_client, options: options
1547
- yield response, operation if block_given?
1548
- return response
1549
- end
1550
- rescue ::GRPC::BadStatus => e
1551
- raise ::Google::Cloud::Error.from_error(e)
1552
- end
1553
-
1554
- ##
1555
- # Disables a {::Google::Cloud::ServiceManagement::V1::ManagedService service} for a project, so it can no longer be
1556
- # be used for the project. It prevents accidental usage that may cause
1557
- # unexpected billing charges or security leaks.
1558
- #
1559
- # Operation<response: DisableServiceResponse>
1560
- #
1561
- # @deprecated This method is deprecated and may be removed in the next major version update.
1562
- #
1563
- # @overload disable_service(request, options = nil)
1564
- # Pass arguments to `disable_service` via a request object, either of type
1565
- # {::Google::Cloud::ServiceManagement::V1::DisableServiceRequest} or an equivalent Hash.
1566
- #
1567
- # @param request [::Google::Cloud::ServiceManagement::V1::DisableServiceRequest, ::Hash]
1568
- # A request object representing the call parameters. Required. To specify no
1569
- # parameters, or to keep all the default parameter values, pass an empty Hash.
1570
- # @param options [::Gapic::CallOptions, ::Hash]
1571
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1572
- #
1573
- # @overload disable_service(service_name: nil, consumer_id: nil)
1574
- # Pass arguments to `disable_service` via keyword arguments. Note that at
1575
- # least one keyword argument is required. To specify no parameters, or to keep all
1576
- # the default parameter values, pass an empty Hash as a request object (see above).
1577
- #
1578
- # @param service_name [::String]
1579
- # Required. Name of the service to disable. Specifying an unknown service name
1580
- # will cause the request to fail.
1581
- # @param consumer_id [::String]
1582
- # Required. The identity of consumer resource which service disablement will be
1583
- # applied to.
1584
- #
1585
- # The Google Service Management implementation accepts the following
1586
- # forms:
1587
- # - "project:<project_id>"
1588
- #
1589
- # Note: this is made compatible with
1590
- # google.api.servicecontrol.v1.Operation.consumer_id.
1591
- #
1592
- # @yield [response, operation] Access the result along with the RPC operation
1593
- # @yieldparam response [::Gapic::Operation]
1594
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
1595
- #
1596
- # @return [::Gapic::Operation]
1597
- #
1598
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
1599
- #
1600
- # @example Basic example
1601
- # require "google/cloud/service_management/v1"
1602
- #
1603
- # # Create a client object. The client can be reused for multiple calls.
1604
- # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new
1605
- #
1606
- # # Create a request. To set request fields, pass in keyword arguments.
1607
- # request = Google::Cloud::ServiceManagement::V1::DisableServiceRequest.new
1608
- #
1609
- # # Call the disable_service method.
1610
- # result = client.disable_service request
1611
- #
1612
- # # The returned object is of type Gapic::Operation. You can use this
1613
- # # object to check the status of an operation, cancel it, or wait
1614
- # # for results. Here is how to block until completion:
1615
- # result.wait_until_done! timeout: 60
1616
- # if result.response?
1617
- # p result.response
1618
- # else
1619
- # puts "Error!"
1620
- # end
1621
- #
1622
- def disable_service request, options = nil
1623
- raise ::ArgumentError, "request must be provided" if request.nil?
1624
-
1625
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::DisableServiceRequest
1626
-
1627
- # Converts hash and nil to an options object
1628
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1629
-
1630
- # Customize the options with defaults
1631
- metadata = @config.rpcs.disable_service.metadata.to_h
1632
-
1633
- # Set x-goog-api-client and x-goog-user-project headers
1634
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1635
- lib_name: @config.lib_name, lib_version: @config.lib_version,
1636
- gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
1637
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1638
-
1639
- header_params = {}
1640
- if request.service_name
1641
- header_params["service_name"] = request.service_name
1642
- end
1643
-
1644
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1645
- metadata[:"x-goog-request-params"] ||= request_params_header
1646
-
1647
- options.apply_defaults timeout: @config.rpcs.disable_service.timeout,
1648
- metadata: metadata,
1649
- retry_policy: @config.rpcs.disable_service.retry_policy
1650
-
1651
- options.apply_defaults timeout: @config.timeout,
1652
- metadata: @config.metadata,
1653
- retry_policy: @config.retry_policy
1654
-
1655
- @service_manager_stub.call_rpc :disable_service, request, options: options do |response, operation|
1656
- response = ::Gapic::Operation.new response, @operations_client, options: options
1657
- yield response, operation if block_given?
1658
- return response
1659
- end
1660
- rescue ::GRPC::BadStatus => e
1661
- raise ::Google::Cloud::Error.from_error(e)
1662
- end
1663
-
1664
1448
  ##
1665
1449
  # Configuration class for the ServiceManager API.
1666
1450
  #
@@ -1861,16 +1645,6 @@ module Google
1861
1645
  # @return [::Gapic::Config::Method]
1862
1646
  #
1863
1647
  attr_reader :generate_config_report
1864
- ##
1865
- # RPC-specific configuration for `enable_service`
1866
- # @return [::Gapic::Config::Method]
1867
- #
1868
- attr_reader :enable_service
1869
- ##
1870
- # RPC-specific configuration for `disable_service`
1871
- # @return [::Gapic::Config::Method]
1872
- #
1873
- attr_reader :disable_service
1874
1648
 
1875
1649
  # @private
1876
1650
  def initialize parent_rpcs = nil
@@ -1900,10 +1674,6 @@ module Google
1900
1674
  @create_service_rollout = ::Gapic::Config::Method.new create_service_rollout_config
1901
1675
  generate_config_report_config = parent_rpcs.generate_config_report if parent_rpcs.respond_to? :generate_config_report
1902
1676
  @generate_config_report = ::Gapic::Config::Method.new generate_config_report_config
1903
- enable_service_config = parent_rpcs.enable_service if parent_rpcs.respond_to? :enable_service
1904
- @enable_service = ::Gapic::Config::Method.new enable_service_config
1905
- disable_service_config = parent_rpcs.disable_service if parent_rpcs.respond_to? :disable_service
1906
- @disable_service = ::Gapic::Config::Method.new disable_service_config
1907
1677
 
1908
1678
  yield self if block_given?
1909
1679
  end
@@ -31,7 +31,7 @@ module Google
31
31
  module ServiceManagement
32
32
  module V1
33
33
  ##
34
- # [Google Service Management API](https://cloud.google.com/service-management/overview)
34
+ # [Google Service Management API](/service-management/overview)
35
35
  #
36
36
  # To load this service and instantiate a client:
37
37
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ServiceManagement
23
23
  module V1
24
- VERSION = "0.3.6"
24
+ VERSION = "0.3.7"
25
25
  end
26
26
  end
27
27
  end
@@ -25,7 +25,7 @@ module Google
25
25
  # Google Service Management.
26
26
  # @!attribute [rw] service_name
27
27
  # @return [::String]
28
- # The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
28
+ # The name of the service. See the [overview](/service-management/overview)
29
29
  # for naming requirements.
30
30
  # @!attribute [rw] producer_project_id
31
31
  # @return [::String]
@@ -79,7 +79,7 @@ module Google
79
79
  # Request message for DeleteService method.
80
80
  # @!attribute [rw] service_name
81
81
  # @return [::String]
82
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
82
+ # Required. The name of the service. See the [overview](/service-management/overview)
83
83
  # for naming requirements. For example: `example.googleapis.com`.
84
84
  class DeleteServiceRequest
85
85
  include ::Google::Protobuf::MessageExts
@@ -89,7 +89,7 @@ module Google
89
89
  # Request message for UndeleteService method.
90
90
  # @!attribute [rw] service_name
91
91
  # @return [::String]
92
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
92
+ # Required. The name of the service. See the [overview](/service-management/overview)
93
93
  # for naming requirements. For example: `example.googleapis.com`.
94
94
  class UndeleteServiceRequest
95
95
  include ::Google::Protobuf::MessageExts
@@ -108,7 +108,7 @@ module Google
108
108
  # Request message for GetServiceConfig method.
109
109
  # @!attribute [rw] service_name
110
110
  # @return [::String]
111
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
111
+ # Required. The name of the service. See the [overview](/service-management/overview)
112
112
  # for naming requirements. For example: `example.googleapis.com`.
113
113
  # @!attribute [rw] config_id
114
114
  # @return [::String]
@@ -139,7 +139,7 @@ module Google
139
139
  # Request message for ListServiceConfigs method.
140
140
  # @!attribute [rw] service_name
141
141
  # @return [::String]
142
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
142
+ # Required. The name of the service. See the [overview](/service-management/overview)
143
143
  # for naming requirements. For example: `example.googleapis.com`.
144
144
  # @!attribute [rw] page_token
145
145
  # @return [::String]
@@ -168,7 +168,7 @@ module Google
168
168
  # Request message for CreateServiceConfig method.
169
169
  # @!attribute [rw] service_name
170
170
  # @return [::String]
171
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
171
+ # Required. The name of the service. See the [overview](/service-management/overview)
172
172
  # for naming requirements. For example: `example.googleapis.com`.
173
173
  # @!attribute [rw] service_config
174
174
  # @return [::Google::Api::Service]
@@ -181,7 +181,7 @@ module Google
181
181
  # Request message for SubmitConfigSource method.
182
182
  # @!attribute [rw] service_name
183
183
  # @return [::String]
184
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
184
+ # Required. The name of the service. See the [overview](/service-management/overview)
185
185
  # for naming requirements. For example: `example.googleapis.com`.
186
186
  # @!attribute [rw] config_source
187
187
  # @return [::Google::Cloud::ServiceManagement::V1::ConfigSource]
@@ -208,7 +208,7 @@ module Google
208
208
  # Request message for 'CreateServiceRollout'
209
209
  # @!attribute [rw] service_name
210
210
  # @return [::String]
211
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
211
+ # Required. The name of the service. See the [overview](/service-management/overview)
212
212
  # for naming requirements. For example: `example.googleapis.com`.
213
213
  # @!attribute [rw] rollout
214
214
  # @return [::Google::Cloud::ServiceManagement::V1::Rollout]
@@ -221,7 +221,7 @@ module Google
221
221
  # Request message for 'ListServiceRollouts'
222
222
  # @!attribute [rw] service_name
223
223
  # @return [::String]
224
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
224
+ # Required. The name of the service. See the [overview](/service-management/overview)
225
225
  # for naming requirements. For example: `example.googleapis.com`.
226
226
  # @!attribute [rw] page_token
227
227
  # @return [::String]
@@ -235,10 +235,10 @@ module Google
235
235
  # Required. Use `filter` to return subset of rollouts.
236
236
  # The following filters are supported:
237
237
  # -- To limit the results to only those in
238
- # status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
238
+ # [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
239
239
  # use filter='status=SUCCESS'
240
240
  # -- To limit the results to those in
241
- # status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
241
+ # [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
242
242
  # or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
243
243
  class ListServiceRolloutsRequest
244
244
  include ::Google::Protobuf::MessageExts
@@ -260,7 +260,7 @@ module Google
260
260
  # Request message for GetServiceRollout method.
261
261
  # @!attribute [rw] service_name
262
262
  # @return [::String]
263
- # Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
263
+ # Required. The name of the service. See the [overview](/service-management/overview)
264
264
  # for naming requirements. For example: `example.googleapis.com`.
265
265
  # @!attribute [rw] rollout_id
266
266
  # @return [::String]
@@ -270,60 +270,6 @@ module Google
270
270
  extend ::Google::Protobuf::MessageExts::ClassMethods
271
271
  end
272
272
 
273
- # Request message for EnableService method.
274
- # @!attribute [rw] service_name
275
- # @return [::String]
276
- # Required. Name of the service to enable. Specifying an unknown service name will
277
- # cause the request to fail.
278
- # @!attribute [rw] consumer_id
279
- # @return [::String]
280
- # Required. The identity of consumer resource which service enablement will be
281
- # applied to.
282
- #
283
- # The Google Service Management implementation accepts the following
284
- # forms:
285
- # - "project:<project_id>"
286
- #
287
- # Note: this is made compatible with
288
- # google.api.servicecontrol.v1.Operation.consumer_id.
289
- class EnableServiceRequest
290
- include ::Google::Protobuf::MessageExts
291
- extend ::Google::Protobuf::MessageExts::ClassMethods
292
- end
293
-
294
- # Operation payload for EnableService method.
295
- class EnableServiceResponse
296
- include ::Google::Protobuf::MessageExts
297
- extend ::Google::Protobuf::MessageExts::ClassMethods
298
- end
299
-
300
- # Request message for DisableService method.
301
- # @!attribute [rw] service_name
302
- # @return [::String]
303
- # Required. Name of the service to disable. Specifying an unknown service name
304
- # will cause the request to fail.
305
- # @!attribute [rw] consumer_id
306
- # @return [::String]
307
- # Required. The identity of consumer resource which service disablement will be
308
- # applied to.
309
- #
310
- # The Google Service Management implementation accepts the following
311
- # forms:
312
- # - "project:<project_id>"
313
- #
314
- # Note: this is made compatible with
315
- # google.api.servicecontrol.v1.Operation.consumer_id.
316
- class DisableServiceRequest
317
- include ::Google::Protobuf::MessageExts
318
- extend ::Google::Protobuf::MessageExts::ClassMethods
319
- end
320
-
321
- # Operation payload for DisableService method.
322
- class DisableServiceResponse
323
- include ::Google::Protobuf::MessageExts
324
- extend ::Google::Protobuf::MessageExts::ClassMethods
325
- end
326
-
327
273
  # Request message for GenerateConfigReport method.
328
274
  # @!attribute [rw] new_config
329
275
  # @return [::Google::Protobuf::Any]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-service_management-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-11 00:00:00.000000000 Z
11
+ date: 2022-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -210,7 +210,6 @@ files:
210
210
  - proto_docs/google/protobuf/api.rb
211
211
  - proto_docs/google/protobuf/duration.rb
212
212
  - proto_docs/google/protobuf/empty.rb
213
- - proto_docs/google/protobuf/field_mask.rb
214
213
  - proto_docs/google/protobuf/source_context.rb
215
214
  - proto_docs/google/protobuf/struct.rb
216
215
  - proto_docs/google/protobuf/timestamp.rb
@@ -236,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
235
  - !ruby/object:Gem::Version
237
236
  version: '0'
238
237
  requirements: []
239
- rubygems_version: 3.3.4
238
+ rubygems_version: 3.3.5
240
239
  signing_key:
241
240
  specification_version: 4
242
241
  summary: API Client library for the Service Management API V1 API
@@ -1,229 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2020 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
- # `FieldMask` represents a set of symbolic field paths, for example:
23
- #
24
- # paths: "f.a"
25
- # paths: "f.b.d"
26
- #
27
- # Here `f` represents a field in some root message, `a` and `b`
28
- # fields in the message found in `f`, and `d` a field found in the
29
- # message in `f.b`.
30
- #
31
- # Field masks are used to specify a subset of fields that should be
32
- # returned by a get operation or modified by an update operation.
33
- # Field masks also have a custom JSON encoding (see below).
34
- #
35
- # # Field Masks in Projections
36
- #
37
- # When used in the context of a projection, a response message or
38
- # sub-message is filtered by the API to only contain those fields as
39
- # specified in the mask. For example, if the mask in the previous
40
- # example is applied to a response message as follows:
41
- #
42
- # f {
43
- # a : 22
44
- # b {
45
- # d : 1
46
- # x : 2
47
- # }
48
- # y : 13
49
- # }
50
- # z: 8
51
- #
52
- # The result will not contain specific values for fields x,y and z
53
- # (their value will be set to the default, and omitted in proto text
54
- # output):
55
- #
56
- #
57
- # f {
58
- # a : 22
59
- # b {
60
- # d : 1
61
- # }
62
- # }
63
- #
64
- # A repeated field is not allowed except at the last position of a
65
- # paths string.
66
- #
67
- # If a FieldMask object is not present in a get operation, the
68
- # operation applies to all fields (as if a FieldMask of all fields
69
- # had been specified).
70
- #
71
- # Note that a field mask does not necessarily apply to the
72
- # top-level response message. In case of a REST get operation, the
73
- # field mask applies directly to the response, but in case of a REST
74
- # list operation, the mask instead applies to each individual message
75
- # in the returned resource list. In case of a REST custom method,
76
- # other definitions may be used. Where the mask applies will be
77
- # clearly documented together with its declaration in the API. In
78
- # any case, the effect on the returned resource/resources is required
79
- # behavior for APIs.
80
- #
81
- # # Field Masks in Update Operations
82
- #
83
- # A field mask in update operations specifies which fields of the
84
- # targeted resource are going to be updated. The API is required
85
- # to only change the values of the fields as specified in the mask
86
- # and leave the others untouched. If a resource is passed in to
87
- # describe the updated values, the API ignores the values of all
88
- # fields not covered by the mask.
89
- #
90
- # If a repeated field is specified for an update operation, new values will
91
- # be appended to the existing repeated field in the target resource. Note that
92
- # a repeated field is only allowed in the last position of a `paths` string.
93
- #
94
- # If a sub-message is specified in the last position of the field mask for an
95
- # update operation, then new value will be merged into the existing sub-message
96
- # in the target resource.
97
- #
98
- # For example, given the target message:
99
- #
100
- # f {
101
- # b {
102
- # d: 1
103
- # x: 2
104
- # }
105
- # c: [1]
106
- # }
107
- #
108
- # And an update message:
109
- #
110
- # f {
111
- # b {
112
- # d: 10
113
- # }
114
- # c: [2]
115
- # }
116
- #
117
- # then if the field mask is:
118
- #
119
- # paths: ["f.b", "f.c"]
120
- #
121
- # then the result will be:
122
- #
123
- # f {
124
- # b {
125
- # d: 10
126
- # x: 2
127
- # }
128
- # c: [1, 2]
129
- # }
130
- #
131
- # An implementation may provide options to override this default behavior for
132
- # repeated and message fields.
133
- #
134
- # In order to reset a field's value to the default, the field must
135
- # be in the mask and set to the default value in the provided resource.
136
- # Hence, in order to reset all fields of a resource, provide a default
137
- # instance of the resource and set all fields in the mask, or do
138
- # not provide a mask as described below.
139
- #
140
- # If a field mask is not present on update, the operation applies to
141
- # all fields (as if a field mask of all fields has been specified).
142
- # Note that in the presence of schema evolution, this may mean that
143
- # fields the client does not know and has therefore not filled into
144
- # the request will be reset to their default. If this is unwanted
145
- # behavior, a specific service may require a client to always specify
146
- # a field mask, producing an error if not.
147
- #
148
- # As with get operations, the location of the resource which
149
- # describes the updated values in the request message depends on the
150
- # operation kind. In any case, the effect of the field mask is
151
- # required to be honored by the API.
152
- #
153
- # ## Considerations for HTTP REST
154
- #
155
- # The HTTP kind of an update operation which uses a field mask must
156
- # be set to PATCH instead of PUT in order to satisfy HTTP semantics
157
- # (PUT must only be used for full updates).
158
- #
159
- # # JSON Encoding of Field Masks
160
- #
161
- # In JSON, a field mask is encoded as a single string where paths are
162
- # separated by a comma. Fields name in each path are converted
163
- # to/from lower-camel naming conventions.
164
- #
165
- # As an example, consider the following message declarations:
166
- #
167
- # message Profile {
168
- # User user = 1;
169
- # Photo photo = 2;
170
- # }
171
- # message User {
172
- # string display_name = 1;
173
- # string address = 2;
174
- # }
175
- #
176
- # In proto a field mask for `Profile` may look as such:
177
- #
178
- # mask {
179
- # paths: "user.display_name"
180
- # paths: "photo"
181
- # }
182
- #
183
- # In JSON, the same mask is represented as below:
184
- #
185
- # {
186
- # mask: "user.displayName,photo"
187
- # }
188
- #
189
- # # Field Masks and Oneof Fields
190
- #
191
- # Field masks treat fields in oneofs just as regular fields. Consider the
192
- # following message:
193
- #
194
- # message SampleMessage {
195
- # oneof test_oneof {
196
- # string name = 4;
197
- # SubMessage sub_message = 9;
198
- # }
199
- # }
200
- #
201
- # The field mask can be:
202
- #
203
- # mask {
204
- # paths: "name"
205
- # }
206
- #
207
- # Or:
208
- #
209
- # mask {
210
- # paths: "sub_message"
211
- # }
212
- #
213
- # Note that oneof type names ("test_oneof" in this case) cannot be used in
214
- # paths.
215
- #
216
- # ## Field Mask Verification
217
- #
218
- # The implementation of any API method which has a FieldMask type field in the
219
- # request should verify the included field paths, and return an
220
- # `INVALID_ARGUMENT` error if any path is unmappable.
221
- # @!attribute [rw] paths
222
- # @return [::Array<::String>]
223
- # The set of field mask paths.
224
- class FieldMask
225
- include ::Google::Protobuf::MessageExts
226
- extend ::Google::Protobuf::MessageExts::ClassMethods
227
- end
228
- end
229
- end