Skip to content

Commit

Permalink
feat: Automated regeneration of networkconnectivity v1 client (#19202)
Browse files Browse the repository at this point in the history
Auto-created at 2024-05-19 10:37:11 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot committed May 21, 2024
1 parent 16744a4 commit 649ef22
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 4 deletions.
12 changes: 12 additions & 0 deletions api_names_out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions generated/google-apis-networkconnectivity_v1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>]
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
Expand Down Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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)
Expand All @@ -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).
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 649ef22

Please sign in to comment.