google-cloud-os_config-v1 0.1.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,3 +33,6 @@ module Google
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
38
+ require "google/cloud/os_config/v1/_helpers" if ::File.file? helper_path
@@ -63,7 +63,7 @@ module Google
63
63
  parent_config = while namespace.any?
64
64
  parent_name = namespace.join "::"
65
65
  parent_const = const_get parent_name
66
- break parent_const.configure if parent_const&.respond_to? :configure
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
67
  namespace.pop
68
68
  end
69
69
  default_config = Client::Configuration.new parent_config
@@ -71,9 +71,9 @@ module Google
71
71
  default_config.timeout = 60.0
72
72
  default_config.retry_policy = {
73
73
  initial_delay: 1.0,
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
@@ -137,7 +137,13 @@ module Google
137
137
 
138
138
  # Create credentials
139
139
  credentials = @config.credentials
140
- credentials ||= Credentials.default scope: @config.scope
140
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
141
+ # but only if the default endpoint does not have a region prefix.
142
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
143
+ @config.endpoint == Client.configure.endpoint &&
144
+ !@config.endpoint.split(".").first.include?("-")
145
+ credentials ||= Credentials.default scope: @config.scope,
146
+ enable_self_signed_jwt: enable_self_signed_jwt
141
147
  if credentials.is_a?(String) || credentials.is_a?(Hash)
142
148
  credentials = Credentials.new credentials, scope: @config.scope
143
149
  end
@@ -168,7 +174,7 @@ module Google
168
174
  # @param options [::Gapic::CallOptions, ::Hash]
169
175
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
170
176
  #
171
- # @overload execute_patch_job(parent: nil, description: nil, instance_filter: nil, patch_config: nil, duration: nil, dry_run: nil, display_name: nil)
177
+ # @overload execute_patch_job(parent: nil, description: nil, instance_filter: nil, patch_config: nil, duration: nil, dry_run: nil, display_name: nil, rollout: nil)
172
178
  # Pass arguments to `execute_patch_job` via keyword arguments. Note that at
173
179
  # least one keyword argument is required. To specify no parameters, or to keep all
174
180
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -179,8 +185,8 @@ module Google
179
185
  # Description of the patch job. Length of the description is limited
180
186
  # to 1024 characters.
181
187
  # @param instance_filter [::Google::Cloud::OsConfig::V1::PatchInstanceFilter, ::Hash]
182
- # Required. Instances to patch, either explicitly or filtered by some criteria such
183
- # as zone or labels.
188
+ # Required. Instances to patch, either explicitly or filtered by some
189
+ # criteria such as zone or labels.
184
190
  # @param patch_config [::Google::Cloud::OsConfig::V1::PatchConfig, ::Hash]
185
191
  # Patch configuration being applied. If omitted, instances are
186
192
  # patched using the default configurations.
@@ -192,6 +198,8 @@ module Google
192
198
  # will do nothing.
193
199
  # @param display_name [::String]
194
200
  # Display name for this patch job. This does not have to be unique.
201
+ # @param rollout [::Google::Cloud::OsConfig::V1::PatchRollout, ::Hash]
202
+ # Rollout strategy of the patch job.
195
203
  #
196
204
  # @yield [response, operation] Access the result along with the RPC operation
197
205
  # @yieldparam response [::Google::Cloud::OsConfig::V1::PatchJob]
@@ -467,7 +475,8 @@ module Google
467
475
  # the default parameter values, pass an empty Hash as a request object (see above).
468
476
  #
469
477
  # @param parent [::String]
470
- # Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.
478
+ # Required. The parent for the instances are in the form of
479
+ # `projects/*/patchJobs/*`.
471
480
  # @param page_size [::Integer]
472
481
  # The maximum number of instance details records to return. Default is 100.
473
482
  # @param page_token [::String]
@@ -543,10 +552,11 @@ module Google
543
552
  # the default parameter values, pass an empty Hash as a request object (see above).
544
553
  #
545
554
  # @param parent [::String]
546
- # Required. The project to apply this patch deployment to in the form `projects/*`.
555
+ # Required. The project to apply this patch deployment to in the form
556
+ # `projects/*`.
547
557
  # @param patch_deployment_id [::String]
548
- # Required. A name for the patch deployment in the project. When creating a name
549
- # the following rules apply:
558
+ # Required. A name for the patch deployment in the project. When creating a
559
+ # name the following rules apply:
550
560
  # * Must contain only lowercase letters, numbers, and hyphens.
551
561
  # * Must start with a letter.
552
562
  # * Must be between 1-63 characters.
@@ -688,10 +698,12 @@ module Google
688
698
  # @param parent [::String]
689
699
  # Required. The resource name of the parent in the form `projects/*`.
690
700
  # @param page_size [::Integer]
691
- # Optional. The maximum number of patch deployments to return. Default is 100.
701
+ # Optional. The maximum number of patch deployments to return. Default is
702
+ # 100.
692
703
  # @param page_token [::String]
693
- # Optional. A pagination token returned from a previous call to ListPatchDeployments
694
- # that indicates where this listing should continue from.
704
+ # Optional. A pagination token returned from a previous call to
705
+ # ListPatchDeployments that indicates where this listing should continue
706
+ # from.
695
707
  #
696
708
  # @yield [response, operation] Access the result along with the RPC operation
697
709
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::PatchDeployment>]
@@ -891,14 +903,14 @@ module Google
891
903
 
892
904
  config_attr :endpoint, "osconfig.googleapis.com", ::String
893
905
  config_attr :credentials, nil do |value|
894
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
906
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
895
907
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
896
908
  allowed.any? { |klass| klass === value }
897
909
  end
898
910
  config_attr :scope, nil, ::String, ::Array, nil
899
911
  config_attr :lib_name, nil, ::String, nil
900
912
  config_attr :lib_version, nil, ::String, nil
901
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
913
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
902
914
  config_attr :interceptors, nil, ::Array, nil
903
915
  config_attr :timeout, nil, ::Numeric, nil
904
916
  config_attr :metadata, nil, ::Hash, nil
@@ -919,7 +931,7 @@ module Google
919
931
  def rpcs
920
932
  @rpcs ||= begin
921
933
  parent_rpcs = nil
922
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
934
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
923
935
  Rpcs.new parent_rpcs
924
936
  end
925
937
  end
@@ -931,7 +943,7 @@ module Google
931
943
  # Each configuration object is of type `Gapic::Config::Method` and includes
932
944
  # the following configuration fields:
933
945
  #
934
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
946
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
935
947
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
936
948
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
937
949
  # include the following keys:
@@ -990,23 +1002,23 @@ module Google
990
1002
 
991
1003
  # @private
992
1004
  def initialize parent_rpcs = nil
993
- execute_patch_job_config = parent_rpcs&.execute_patch_job if parent_rpcs&.respond_to? :execute_patch_job
1005
+ execute_patch_job_config = parent_rpcs.execute_patch_job if parent_rpcs.respond_to? :execute_patch_job
994
1006
  @execute_patch_job = ::Gapic::Config::Method.new execute_patch_job_config
995
- get_patch_job_config = parent_rpcs&.get_patch_job if parent_rpcs&.respond_to? :get_patch_job
1007
+ get_patch_job_config = parent_rpcs.get_patch_job if parent_rpcs.respond_to? :get_patch_job
996
1008
  @get_patch_job = ::Gapic::Config::Method.new get_patch_job_config
997
- cancel_patch_job_config = parent_rpcs&.cancel_patch_job if parent_rpcs&.respond_to? :cancel_patch_job
1009
+ cancel_patch_job_config = parent_rpcs.cancel_patch_job if parent_rpcs.respond_to? :cancel_patch_job
998
1010
  @cancel_patch_job = ::Gapic::Config::Method.new cancel_patch_job_config
999
- list_patch_jobs_config = parent_rpcs&.list_patch_jobs if parent_rpcs&.respond_to? :list_patch_jobs
1011
+ list_patch_jobs_config = parent_rpcs.list_patch_jobs if parent_rpcs.respond_to? :list_patch_jobs
1000
1012
  @list_patch_jobs = ::Gapic::Config::Method.new list_patch_jobs_config
1001
- list_patch_job_instance_details_config = parent_rpcs&.list_patch_job_instance_details if parent_rpcs&.respond_to? :list_patch_job_instance_details
1013
+ list_patch_job_instance_details_config = parent_rpcs.list_patch_job_instance_details if parent_rpcs.respond_to? :list_patch_job_instance_details
1002
1014
  @list_patch_job_instance_details = ::Gapic::Config::Method.new list_patch_job_instance_details_config
1003
- create_patch_deployment_config = parent_rpcs&.create_patch_deployment if parent_rpcs&.respond_to? :create_patch_deployment
1015
+ create_patch_deployment_config = parent_rpcs.create_patch_deployment if parent_rpcs.respond_to? :create_patch_deployment
1004
1016
  @create_patch_deployment = ::Gapic::Config::Method.new create_patch_deployment_config
1005
- get_patch_deployment_config = parent_rpcs&.get_patch_deployment if parent_rpcs&.respond_to? :get_patch_deployment
1017
+ get_patch_deployment_config = parent_rpcs.get_patch_deployment if parent_rpcs.respond_to? :get_patch_deployment
1006
1018
  @get_patch_deployment = ::Gapic::Config::Method.new get_patch_deployment_config
1007
- list_patch_deployments_config = parent_rpcs&.list_patch_deployments if parent_rpcs&.respond_to? :list_patch_deployments
1019
+ list_patch_deployments_config = parent_rpcs.list_patch_deployments if parent_rpcs.respond_to? :list_patch_deployments
1008
1020
  @list_patch_deployments = ::Gapic::Config::Method.new list_patch_deployments_config
1009
- delete_patch_deployment_config = parent_rpcs&.delete_patch_deployment if parent_rpcs&.respond_to? :delete_patch_deployment
1021
+ delete_patch_deployment_config = parent_rpcs.delete_patch_deployment if parent_rpcs.respond_to? :delete_patch_deployment
1010
1022
  @delete_patch_deployment = ::Gapic::Config::Method.new delete_patch_deployment_config
1011
1023
 
1012
1024
  yield self if block_given?
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module OsConfig
23
23
  module V1
24
- VERSION = "0.1.3"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -0,0 +1,108 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/osconfig/v1/inventory.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/timestamp_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("google/cloud/osconfig/v1/inventory.proto", :syntax => :proto3) do
9
+ add_message "google.cloud.osconfig.v1.Inventory" do
10
+ optional :os_info, :message, 1, "google.cloud.osconfig.v1.Inventory.OsInfo"
11
+ map :items, :string, :message, 2, "google.cloud.osconfig.v1.Inventory.Item"
12
+ end
13
+ add_message "google.cloud.osconfig.v1.Inventory.OsInfo" do
14
+ optional :hostname, :string, 9
15
+ optional :long_name, :string, 2
16
+ optional :short_name, :string, 3
17
+ optional :version, :string, 4
18
+ optional :architecture, :string, 5
19
+ optional :kernel_version, :string, 6
20
+ optional :kernel_release, :string, 7
21
+ optional :osconfig_agent_version, :string, 8
22
+ end
23
+ add_message "google.cloud.osconfig.v1.Inventory.Item" do
24
+ optional :id, :string, 1
25
+ optional :origin_type, :enum, 2, "google.cloud.osconfig.v1.Inventory.Item.OriginType"
26
+ optional :create_time, :message, 8, "google.protobuf.Timestamp"
27
+ optional :update_time, :message, 9, "google.protobuf.Timestamp"
28
+ optional :type, :enum, 5, "google.cloud.osconfig.v1.Inventory.Item.Type"
29
+ oneof :details do
30
+ optional :installed_package, :message, 6, "google.cloud.osconfig.v1.Inventory.SoftwarePackage"
31
+ optional :available_package, :message, 7, "google.cloud.osconfig.v1.Inventory.SoftwarePackage"
32
+ end
33
+ end
34
+ add_enum "google.cloud.osconfig.v1.Inventory.Item.OriginType" do
35
+ value :ORIGIN_TYPE_UNSPECIFIED, 0
36
+ value :INVENTORY_REPORT, 1
37
+ end
38
+ add_enum "google.cloud.osconfig.v1.Inventory.Item.Type" do
39
+ value :TYPE_UNSPECIFIED, 0
40
+ value :INSTALLED_PACKAGE, 1
41
+ value :AVAILABLE_PACKAGE, 2
42
+ end
43
+ add_message "google.cloud.osconfig.v1.Inventory.SoftwarePackage" do
44
+ oneof :details do
45
+ optional :yum_package, :message, 1, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
46
+ optional :apt_package, :message, 2, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
47
+ optional :zypper_package, :message, 3, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
48
+ optional :googet_package, :message, 4, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
49
+ optional :zypper_patch, :message, 5, "google.cloud.osconfig.v1.Inventory.ZypperPatch"
50
+ optional :wua_package, :message, 6, "google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage"
51
+ optional :qfe_package, :message, 7, "google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage"
52
+ optional :cos_package, :message, 8, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
53
+ end
54
+ end
55
+ add_message "google.cloud.osconfig.v1.Inventory.VersionedPackage" do
56
+ optional :package_name, :string, 4
57
+ optional :architecture, :string, 2
58
+ optional :version, :string, 3
59
+ end
60
+ add_message "google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage" do
61
+ optional :title, :string, 1
62
+ optional :description, :string, 2
63
+ repeated :categories, :message, 3, "google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory"
64
+ repeated :kb_article_ids, :string, 4
65
+ optional :support_url, :string, 11
66
+ repeated :more_info_urls, :string, 5
67
+ optional :update_id, :string, 6
68
+ optional :revision_number, :int32, 7
69
+ optional :last_deployment_change_time, :message, 10, "google.protobuf.Timestamp"
70
+ end
71
+ add_message "google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory" do
72
+ optional :id, :string, 1
73
+ optional :name, :string, 2
74
+ end
75
+ add_message "google.cloud.osconfig.v1.Inventory.ZypperPatch" do
76
+ optional :patch_name, :string, 5
77
+ optional :category, :string, 2
78
+ optional :severity, :string, 3
79
+ optional :summary, :string, 4
80
+ end
81
+ add_message "google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage" do
82
+ optional :caption, :string, 1
83
+ optional :description, :string, 2
84
+ optional :hot_fix_id, :string, 3
85
+ optional :install_time, :message, 5, "google.protobuf.Timestamp"
86
+ end
87
+ end
88
+ end
89
+
90
+ module Google
91
+ module Cloud
92
+ module OsConfig
93
+ module V1
94
+ Inventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory").msgclass
95
+ Inventory::OsInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.OsInfo").msgclass
96
+ Inventory::Item = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.Item").msgclass
97
+ Inventory::Item::OriginType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.Item.OriginType").enummodule
98
+ Inventory::Item::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.Item.Type").enummodule
99
+ Inventory::SoftwarePackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.SoftwarePackage").msgclass
100
+ Inventory::VersionedPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.VersionedPackage").msgclass
101
+ Inventory::WindowsUpdatePackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage").msgclass
102
+ Inventory::WindowsUpdatePackage::WindowsUpdateCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory").msgclass
103
+ Inventory::ZypperPatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.ZypperPatch").msgclass
104
+ Inventory::WindowsQuickFixEngineeringPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage").msgclass
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,25 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/osconfig/v1/osconfig_common.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("google/cloud/osconfig/v1/osconfig_common.proto", :syntax => :proto3) do
8
+ add_message "google.cloud.osconfig.v1.FixedOrPercent" do
9
+ oneof :mode do
10
+ optional :fixed, :int32, 1
11
+ optional :percent, :int32, 2
12
+ end
13
+ end
14
+ end
15
+ end
16
+
17
+ module Google
18
+ module Cloud
19
+ module OsConfig
20
+ module V1
21
+ FixedOrPercent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.FixedOrPercent").msgclass
22
+ end
23
+ end
24
+ end
25
+ end
@@ -37,25 +37,25 @@ module Google
37
37
  self.service_name = 'google.cloud.osconfig.v1.OsConfigService'
38
38
 
39
39
  # Patch VM instances by creating and running a patch job.
40
- rpc :ExecutePatchJob, Google::Cloud::OsConfig::V1::ExecutePatchJobRequest, Google::Cloud::OsConfig::V1::PatchJob
40
+ rpc :ExecutePatchJob, ::Google::Cloud::OsConfig::V1::ExecutePatchJobRequest, ::Google::Cloud::OsConfig::V1::PatchJob
41
41
  # Get the patch job. This can be used to track the progress of an
42
42
  # ongoing patch job or review the details of completed jobs.
43
- rpc :GetPatchJob, Google::Cloud::OsConfig::V1::GetPatchJobRequest, Google::Cloud::OsConfig::V1::PatchJob
43
+ rpc :GetPatchJob, ::Google::Cloud::OsConfig::V1::GetPatchJobRequest, ::Google::Cloud::OsConfig::V1::PatchJob
44
44
  # Cancel a patch job. The patch job must be active. Canceled patch jobs
45
45
  # cannot be restarted.
46
- rpc :CancelPatchJob, Google::Cloud::OsConfig::V1::CancelPatchJobRequest, Google::Cloud::OsConfig::V1::PatchJob
46
+ rpc :CancelPatchJob, ::Google::Cloud::OsConfig::V1::CancelPatchJobRequest, ::Google::Cloud::OsConfig::V1::PatchJob
47
47
  # Get a list of patch jobs.
48
- rpc :ListPatchJobs, Google::Cloud::OsConfig::V1::ListPatchJobsRequest, Google::Cloud::OsConfig::V1::ListPatchJobsResponse
48
+ rpc :ListPatchJobs, ::Google::Cloud::OsConfig::V1::ListPatchJobsRequest, ::Google::Cloud::OsConfig::V1::ListPatchJobsResponse
49
49
  # Get a list of instance details for a given patch job.
50
- rpc :ListPatchJobInstanceDetails, Google::Cloud::OsConfig::V1::ListPatchJobInstanceDetailsRequest, Google::Cloud::OsConfig::V1::ListPatchJobInstanceDetailsResponse
50
+ rpc :ListPatchJobInstanceDetails, ::Google::Cloud::OsConfig::V1::ListPatchJobInstanceDetailsRequest, ::Google::Cloud::OsConfig::V1::ListPatchJobInstanceDetailsResponse
51
51
  # Create an OS Config patch deployment.
52
- rpc :CreatePatchDeployment, Google::Cloud::OsConfig::V1::CreatePatchDeploymentRequest, Google::Cloud::OsConfig::V1::PatchDeployment
52
+ rpc :CreatePatchDeployment, ::Google::Cloud::OsConfig::V1::CreatePatchDeploymentRequest, ::Google::Cloud::OsConfig::V1::PatchDeployment
53
53
  # Get an OS Config patch deployment.
54
- rpc :GetPatchDeployment, Google::Cloud::OsConfig::V1::GetPatchDeploymentRequest, Google::Cloud::OsConfig::V1::PatchDeployment
54
+ rpc :GetPatchDeployment, ::Google::Cloud::OsConfig::V1::GetPatchDeploymentRequest, ::Google::Cloud::OsConfig::V1::PatchDeployment
55
55
  # Get a page of OS Config patch deployments.
56
- rpc :ListPatchDeployments, Google::Cloud::OsConfig::V1::ListPatchDeploymentsRequest, Google::Cloud::OsConfig::V1::ListPatchDeploymentsResponse
56
+ rpc :ListPatchDeployments, ::Google::Cloud::OsConfig::V1::ListPatchDeploymentsRequest, ::Google::Cloud::OsConfig::V1::ListPatchDeploymentsResponse
57
57
  # Delete an OS Config patch deployment.
58
- rpc :DeletePatchDeployment, Google::Cloud::OsConfig::V1::DeletePatchDeploymentRequest, Google::Protobuf::Empty
58
+ rpc :DeletePatchDeployment, ::Google::Cloud::OsConfig::V1::DeletePatchDeploymentRequest, ::Google::Protobuf::Empty
59
59
  end
60
60
 
61
61
  Stub = Service.rpc_stub_class
@@ -22,6 +22,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
22
22
  optional :create_time, :message, 8, "google.protobuf.Timestamp"
23
23
  optional :update_time, :message, 9, "google.protobuf.Timestamp"
24
24
  optional :last_execute_time, :message, 10, "google.protobuf.Timestamp"
25
+ optional :rollout, :message, 11, "google.cloud.osconfig.v1.PatchRollout"
25
26
  oneof :schedule do
26
27
  optional :one_time_schedule, :message, 6, "google.cloud.osconfig.v1.OneTimeSchedule"
27
28
  optional :recurring_schedule, :message, 7, "google.cloud.osconfig.v1.RecurringSchedule"
@@ -5,6 +5,7 @@ require 'google/protobuf'
5
5
 
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
+ require 'google/cloud/osconfig/v1/osconfig_common_pb'
8
9
  require 'google/protobuf/duration_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -17,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
18
  optional :duration, :message, 5, "google.protobuf.Duration"
18
19
  optional :dry_run, :bool, 6
19
20
  optional :display_name, :string, 8
21
+ optional :rollout, :message, 9, "google.cloud.osconfig.v1.PatchRollout"
20
22
  end
21
23
  add_message "google.cloud.osconfig.v1.GetPatchJobRequest" do
22
24
  optional :name, :string, 1
@@ -63,6 +65,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
63
65
  optional :error_message, :string, 11
64
66
  optional :percent_complete, :double, 12
65
67
  optional :patch_deployment, :string, 15
68
+ optional :rollout, :message, 16, "google.cloud.osconfig.v1.PatchRollout"
66
69
  end
67
70
  add_message "google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary" do
68
71
  optional :pending_instance_count, :int64, 1
@@ -205,6 +208,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
205
208
  add_message "google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel" do
206
209
  map :labels, :string, :string, 1
207
210
  end
211
+ add_message "google.cloud.osconfig.v1.PatchRollout" do
212
+ optional :mode, :enum, 1, "google.cloud.osconfig.v1.PatchRollout.Mode"
213
+ optional :disruption_budget, :message, 2, "google.cloud.osconfig.v1.FixedOrPercent"
214
+ end
215
+ add_enum "google.cloud.osconfig.v1.PatchRollout.Mode" do
216
+ value :MODE_UNSPECIFIED, 0
217
+ value :ZONE_BY_ZONE, 1
218
+ value :CONCURRENT_ZONES, 2
219
+ end
208
220
  end
209
221
  end
210
222
 
@@ -240,6 +252,8 @@ module Google
240
252
  GcsObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.GcsObject").msgclass
241
253
  PatchInstanceFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.PatchInstanceFilter").msgclass
242
254
  PatchInstanceFilter::GroupLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel").msgclass
255
+ PatchRollout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.PatchRollout").msgclass
256
+ PatchRollout::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.PatchRollout.Mode").enummodule
243
257
  end
244
258
  end
245
259
  end
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods