From 649ef2249bcbf8170ff9bfaf40a101f5e51673e2 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 21 May 2024 10:24:26 -0700 Subject: [PATCH] feat: Automated regeneration of networkconnectivity v1 client (#19202) Auto-created at 2024-05-19 10:37:11 +0000 using the toys pull request generator. --- api_names_out.yaml | 12 ++++ .../CHANGELOG.md | 5 ++ ...google-apis-networkconnectivity_v1.gemspec | 2 +- .../apis/networkconnectivity_v1/classes.rb | 72 +++++++++++++++++++ .../networkconnectivity_v1/gem_version.rb | 6 +- .../networkconnectivity_v1/representations.rb | 19 +++++ .../apis/networkconnectivity_v1/service.rb | 55 ++++++++++++++ 7 files changed, 167 insertions(+), 4 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 21189ba92e2..6f09f662e81 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -245095,6 +245095,9 @@ "/networkconnectivity:v1/AuditLogConfig/exemptedMembers": exempted_members "/networkconnectivity:v1/AuditLogConfig/exemptedMembers/exempted_member": exempted_member "/networkconnectivity:v1/AuditLogConfig/logType": log_type +"/networkconnectivity:v1/AutoAccept": auto_accept +"/networkconnectivity:v1/AutoAccept/autoAcceptProjects": auto_accept_projects +"/networkconnectivity:v1/AutoAccept/autoAcceptProjects/auto_accept_project": auto_accept_project "/networkconnectivity:v1/Binding": binding "/networkconnectivity:v1/Binding/condition": condition "/networkconnectivity:v1/Binding/members": members @@ -245156,20 +245159,25 @@ "/networkconnectivity:v1/GoogleRpcStatus/details/detail/detail": detail "/networkconnectivity:v1/GoogleRpcStatus/message": message "/networkconnectivity:v1/Group": group +"/networkconnectivity:v1/Group/autoAccept": auto_accept "/networkconnectivity:v1/Group/createTime": create_time "/networkconnectivity:v1/Group/description": description "/networkconnectivity:v1/Group/labels": labels "/networkconnectivity:v1/Group/labels/label": label "/networkconnectivity:v1/Group/name": name +"/networkconnectivity:v1/Group/routeTable": route_table "/networkconnectivity:v1/Group/state": state "/networkconnectivity:v1/Group/uid": uid "/networkconnectivity:v1/Group/updateTime": update_time "/networkconnectivity:v1/Hub": hub "/networkconnectivity:v1/Hub/createTime": create_time "/networkconnectivity:v1/Hub/description": description +"/networkconnectivity:v1/Hub/exportPsc": export_psc "/networkconnectivity:v1/Hub/labels": labels "/networkconnectivity:v1/Hub/labels/label": label "/networkconnectivity:v1/Hub/name": name +"/networkconnectivity:v1/Hub/policyMode": policy_mode +"/networkconnectivity:v1/Hub/presetTopology": preset_topology "/networkconnectivity:v1/Hub/routeTables": route_tables "/networkconnectivity:v1/Hub/routeTables/route_table": route_table "/networkconnectivity:v1/Hub/routingVpcs": routing_vpcs @@ -245553,6 +245561,10 @@ "/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.list/pageSize": page_size "/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.list/pageToken": page_token "/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.list/parent": parent +"/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.patch": patch_project_location_global_hub_group +"/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.patch/name": name +"/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.patch/requestId": request_id +"/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.patch/updateMask": update_mask "/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.setIamPolicy": set_group_iam_policy "/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.setIamPolicy/resource": resource "/networkconnectivity:v1/networkconnectivity.projects.locations.global.hubs.groups.testIamPermissions": test_group_iam_permissions diff --git a/generated/google-apis-networkconnectivity_v1/CHANGELOG.md b/generated/google-apis-networkconnectivity_v1/CHANGELOG.md index 9b990616cce..d773dbd4811 100644 --- a/generated/google-apis-networkconnectivity_v1/CHANGELOG.md +++ b/generated/google-apis-networkconnectivity_v1/CHANGELOG.md @@ -1,5 +1,10 @@ # Release history for google-apis-networkconnectivity_v1 +### v0.41.0 (2024-05-19) + +* Regenerated from discovery document revision 20240506 +* Regenerated using generator version 0.15.0 + ### v0.40.0 (2024-04-28) * Regenerated from discovery document revision 20240423 diff --git a/generated/google-apis-networkconnectivity_v1/google-apis-networkconnectivity_v1.gemspec b/generated/google-apis-networkconnectivity_v1/google-apis-networkconnectivity_v1.gemspec index 08b0abc997a..4cf87754597 100644 --- a/generated/google-apis-networkconnectivity_v1/google-apis-networkconnectivity_v1.gemspec +++ b/generated/google-apis-networkconnectivity_v1/google-apis-networkconnectivity_v1.gemspec @@ -29,5 +29,5 @@ Gem::Specification.new do |gem| gem.require_paths = ["lib"] gem.required_ruby_version = '>= 2.7' - gem.add_runtime_dependency "google-apis-core", ">= 0.14.0", "< 2.a" + gem.add_runtime_dependency "google-apis-core", ">= 0.15.0", "< 2.a" end diff --git a/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/classes.rb b/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/classes.rb index ad7ee6aca44..d8083ef5528 100644 --- a/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/classes.rb +++ b/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/classes.rb @@ -151,6 +151,32 @@ def update!(**args) end end + # The auto-accept setting for a group controls whether proposed spokes are + # automatically attached to the hub. If auto-accept is enabled, the spoke + # immediately is attached to the hub and becomes part of the group. In this case, + # the new spoke is in the ACTIVE state. If auto-accept is disabled, the spoke + # goes to the INACTIVE state, and it must be reviewed and accepted by a hub + # administrator. + class AutoAccept + include Google::Apis::Core::Hashable + + # A list of project ids or project numbers for which you want to enable auto- + # accept. The auto-accept setting is applied to spokes being created or updated + # in these projects. + # Corresponds to the JSON property `autoAcceptProjects` + # @return [Array] + attr_accessor :auto_accept_projects + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_accept_projects = args[:auto_accept_projects] if args.key?(:auto_accept_projects) + end + end + # Associates `members`, or principals, with a `role`. class Binding include Google::Apis::Core::Hashable @@ -719,6 +745,16 @@ def update!(**args) class Group include Google::Apis::Core::Hashable + # The auto-accept setting for a group controls whether proposed spokes are + # automatically attached to the hub. If auto-accept is enabled, the spoke + # immediately is attached to the hub and becomes part of the group. In this case, + # the new spoke is in the ACTIVE state. If auto-accept is disabled, the spoke + # goes to the INACTIVE state, and it must be reviewed and accepted by a hub + # administrator. + # Corresponds to the JSON property `autoAccept` + # @return [Google::Apis::NetworkconnectivityV1::AutoAccept] + attr_accessor :auto_accept + # Output only. The time the group was created. # Corresponds to the JSON property `createTime` # @return [String] @@ -743,6 +779,13 @@ class Group # @return [String] attr_accessor :name + # Output only. The name of the route table that corresponds to this group. They + # use the following form: `projects/`project_number`/locations/global/hubs/` + # hub_id`/routeTables/`route_table_id`` + # Corresponds to the JSON property `routeTable` + # @return [String] + attr_accessor :route_table + # Output only. The current lifecycle state of this group. # Corresponds to the JSON property `state` # @return [String] @@ -766,10 +809,12 @@ def initialize(**args) # Update properties of this object def update!(**args) + @auto_accept = args[:auto_accept] if args.key?(:auto_accept) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) + @route_table = args[:route_table] if args.key?(:route_table) @state = args[:state] if args.key?(:state) @uid = args[:uid] if args.key?(:uid) @update_time = args[:update_time] if args.key?(:update_time) @@ -795,6 +840,15 @@ class Hub # @return [String] attr_accessor :description + # Optional. Whether Private Service Connect transitivity is enabled for the hub. + # If true, Private Service Connect endpoints in VPC spokes attached to the hub + # are made accessible to other VPC spokes attached to the hub. The default value + # is false. + # Corresponds to the JSON property `exportPsc` + # @return [Boolean] + attr_accessor :export_psc + alias_method :export_psc?, :export_psc + # Optional labels in key-value pair format. For more information about labels, # see [Requirements for labels](https://cloud.google.com/resource-manager/docs/ # creating-managing-labels#requirements). @@ -808,6 +862,21 @@ class Hub # @return [String] attr_accessor :name + # Optional. The policy mode of this hub. This field can be either PRESET or + # CUSTOM. If unspecified, the policy_mode defaults to PRESET. + # Corresponds to the JSON property `policyMode` + # @return [String] + attr_accessor :policy_mode + + # Optional. The topology implemented in this hub. Currently, this field is only + # used when policy_mode = PRESET. The available preset topologies are MESH and + # STAR. If preset_topology is unspecified and policy_mode = PRESET, the + # preset_topology defaults to MESH. When policy_mode = CUSTOM, the + # preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. + # Corresponds to the JSON property `presetTopology` + # @return [String] + attr_accessor :preset_topology + # Output only. The route tables that belong to this hub. They use the following # form: `projects/`project_number`/locations/global/hubs/`hub_id`/routeTables/` # route_table_id`` This field is read-only. Network Connectivity Center @@ -856,8 +925,11 @@ def initialize(**args) def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) + @export_psc = args[:export_psc] if args.key?(:export_psc) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) + @policy_mode = args[:policy_mode] if args.key?(:policy_mode) + @preset_topology = args[:preset_topology] if args.key?(:preset_topology) @route_tables = args[:route_tables] if args.key?(:route_tables) @routing_vpcs = args[:routing_vpcs] if args.key?(:routing_vpcs) @spoke_summary = args[:spoke_summary] if args.key?(:spoke_summary) diff --git a/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/gem_version.rb b/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/gem_version.rb index d6235324982..5f0e293fa35 100644 --- a/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/gem_version.rb +++ b/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/gem_version.rb @@ -16,13 +16,13 @@ module Google module Apis module NetworkconnectivityV1 # Version of the google-apis-networkconnectivity_v1 gem - GEM_VERSION = "0.40.0" + GEM_VERSION = "0.41.0" # Version of the code generator used to generate this client - GENERATOR_VERSION = "0.14.0" + GENERATOR_VERSION = "0.15.0" # Revision of the discovery document this client was generated from - REVISION = "20240423" + REVISION = "20240506" end end end diff --git a/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/representations.rb b/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/representations.rb index e4f55c01158..a74d98726f7 100644 --- a/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/representations.rb +++ b/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/representations.rb @@ -46,6 +46,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class AutoAccept + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Binding class Representation < Google::Apis::Core::JsonRepresentation; end @@ -463,6 +469,13 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class AutoAccept + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :auto_accept_projects, as: 'autoAcceptProjects' + end + end + class Binding # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -579,10 +592,13 @@ class Representation < Google::Apis::Core::JsonRepresentation class Group # @private class Representation < Google::Apis::Core::JsonRepresentation + property :auto_accept, as: 'autoAccept', class: Google::Apis::NetworkconnectivityV1::AutoAccept, decorator: Google::Apis::NetworkconnectivityV1::AutoAccept::Representation + property :create_time, as: 'createTime' property :description, as: 'description' hash :labels, as: 'labels' property :name, as: 'name' + property :route_table, as: 'routeTable' property :state, as: 'state' property :uid, as: 'uid' property :update_time, as: 'updateTime' @@ -594,8 +610,11 @@ class Hub class Representation < Google::Apis::Core::JsonRepresentation property :create_time, as: 'createTime' property :description, as: 'description' + property :export_psc, as: 'exportPsc' hash :labels, as: 'labels' property :name, as: 'name' + property :policy_mode, as: 'policyMode' + property :preset_topology, as: 'presetTopology' collection :route_tables, as: 'routeTables' collection :routing_vpcs, as: 'routingVpcs', class: Google::Apis::NetworkconnectivityV1::RoutingVpc, decorator: Google::Apis::NetworkconnectivityV1::RoutingVpc::Representation diff --git a/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/service.rb b/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/service.rb index 4ffe6eb02a2..675a5f2f3af 100644 --- a/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/service.rb +++ b/generated/google-apis-networkconnectivity_v1/lib/google/apis/networkconnectivity_v1/service.rb @@ -705,6 +705,61 @@ def list_project_location_global_hub_groups(parent, filter: nil, order_by: nil, execute_or_queue_command(command, &block) end + # Updates the parameters of a Network Connectivity Center group. + # @param [String] name + # Immutable. The name of the group. Group names must be unique. They use the + # following form: `projects/`project_number`/locations/global/hubs/`hub`/groups/` + # group_id`` + # @param [Google::Apis::NetworkconnectivityV1::Group] group_object + # @param [String] request_id + # Optional. A request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server knows to ignore the request if + # it has already been completed. The server guarantees that a request doesn't + # result in creation of duplicate commitments for at least 60 minutes. For + # example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check to see whether the original operation was received. If it was, + # the server ignores the second request. This behavior prevents clients from + # mistakenly creating duplicate commitments. The request ID must be a valid UUID, + # with the exception that zero UUID is not supported (00000000-0000-0000-0000- + # 000000000000). + # @param [String] update_mask + # Optional. In the case of an update to an existing group, field mask is used to + # specify the fields to be overwritten. The fields specified in the update_mask + # are relative to the resource, not the full request. A field is overwritten if + # it is in the mask. If the user does not provide a mask, then all fields are + # overwritten. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_global_hub_group(name, group_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::NetworkconnectivityV1::Group::Representation + command.request_object = group_object + command.response_representation = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::NetworkconnectivityV1::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['requestId'] = request_id unless request_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Sets the access control policy on the specified resource. Replaces any # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` # PERMISSION_DENIED` errors.