# frozen_string_literal: true

# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!


module Google
  module Cloud
    module NetworkConnectivity
      module V1
        # A hub is a collection of spokes. A single hub can contain spokes from
        # multiple regions. However, if any of a hub's spokes use the data transfer
        # feature, the resources associated with those spokes must all reside in the
        # same VPC network. Spokes that do not use data transfer can be associated
        # with any VPC network in your project.
        # @!attribute [rw] name
        #   @return [::String]
        #     Immutable. The name of the hub. Hub names must be unique. They use the
        #     following form:
        #         `projects/{project_number}/locations/global/hubs/{hub_id}`
        # @!attribute [r] create_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The time the hub was created.
        # @!attribute [r] update_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The time the hub was last updated.
        # @!attribute [rw] labels
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Optional labels in key:value format. For more information about labels, see
        #     [Requirements for
        #     labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
        # @!attribute [rw] description
        #   @return [::String]
        #     An optional description of the hub.
        # @!attribute [r] unique_id
        #   @return [::String]
        #     Output only. The Google-generated UUID for the hub. This value is unique across all hub
        #     resources. If a hub is deleted and another with the same name is created,
        #     the new hub is assigned a different unique_id.
        # @!attribute [r] state
        #   @return [::Google::Cloud::NetworkConnectivity::V1::State]
        #     Output only. The current lifecycle state of this hub.
        # @!attribute [rw] routing_vpcs
        #   @return [::Array<::Google::Cloud::NetworkConnectivity::V1::RoutingVPC>]
        #     The VPC networks associated with this hub's spokes.
        #
        #     This field is read-only. Network Connectivity Center automatically
        #     populates it based on the set of spokes attached to the hub.
        class Hub
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class LabelsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end

        # RoutingVPC contains information about the VPC networks that are associated
        # with a hub's spokes.
        # @!attribute [rw] uri
        #   @return [::String]
        #     The URI of the VPC network.
        # @!attribute [r] required_for_new_site_to_site_data_transfer_spokes
        #   @return [::Boolean]
        #     Output only. If true, indicates that this VPC network is currently associated with
        #     spokes that use the data transfer feature (spokes where the
        #     site_to_site_data_transfer field is set to true). If you create new spokes
        #     that use data transfer, they must be associated with this VPC network. At
        #     most, one VPC network will have this field set to true.
        class RoutingVPC
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # A spoke represents a connection between your Google Cloud network resources
        # and a non-Google-Cloud network.
        #
        # When you create a spoke, you associate it with a hub. You must also identify
        # a value for exactly one of the following fields:
        #
        # * linked_vpn_tunnels
        # * linked_interconnect_attachments
        # * linked_router_appliance_instances
        # @!attribute [rw] name
        #   @return [::String]
        #     Immutable. The name of the spoke. Spoke names must be unique. They use the
        #     following form:
        #         `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
        # @!attribute [r] create_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The time the spoke was created.
        # @!attribute [r] update_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The time the spoke was last updated.
        # @!attribute [rw] labels
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Optional labels in key:value format. For more information about labels, see
        #     [Requirements for
        #     labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
        # @!attribute [rw] description
        #   @return [::String]
        #     An optional description of the spoke.
        # @!attribute [rw] hub
        #   @return [::String]
        #     Immutable. The name of the hub that this spoke is attached to.
        # @!attribute [rw] linked_vpn_tunnels
        #   @return [::Google::Cloud::NetworkConnectivity::V1::LinkedVpnTunnels]
        #     VPN tunnels that are associated with the spoke.
        # @!attribute [rw] linked_interconnect_attachments
        #   @return [::Google::Cloud::NetworkConnectivity::V1::LinkedInterconnectAttachments]
        #     VLAN attachments that are associated with the spoke.
        # @!attribute [rw] linked_router_appliance_instances
        #   @return [::Google::Cloud::NetworkConnectivity::V1::LinkedRouterApplianceInstances]
        #     Router appliance instances that are associated with the spoke.
        # @!attribute [r] unique_id
        #   @return [::String]
        #     Output only. The Google-generated UUID for the spoke. This value is unique across all
        #     spoke resources. If a spoke is deleted and another with the same name is
        #     created, the new spoke is assigned a different unique_id.
        # @!attribute [r] state
        #   @return [::Google::Cloud::NetworkConnectivity::V1::State]
        #     Output only. The current lifecycle state of this spoke.
        class Spoke
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class LabelsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end

        # Request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#list_hubs HubService.ListHubs} method.
        # @!attribute [rw] parent
        #   @return [::String]
        #     Required. The parent resource's name.
        # @!attribute [rw] page_size
        #   @return [::Integer]
        #     The maximum number of results per page that should be returned.
        # @!attribute [rw] page_token
        #   @return [::String]
        #     The page token.
        # @!attribute [rw] filter
        #   @return [::String]
        #     An expression that filters the results listed in the response.
        # @!attribute [rw] order_by
        #   @return [::String]
        #     Sort the results by a certain order.
        class ListHubsRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Response for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#list_hubs HubService.ListHubs} method.
        # @!attribute [rw] hubs
        #   @return [::Array<::Google::Cloud::NetworkConnectivity::V1::Hub>]
        #     The requested hubs.
        # @!attribute [rw] next_page_token
        #   @return [::String]
        #     The next pagination token in the List response. It should be used as
        #     page_token for the following request. An empty value means no more result.
        # @!attribute [rw] unreachable
        #   @return [::Array<::String>]
        #     Locations that could not be reached.
        class ListHubsResponse
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#get_hub HubService.GetHub} method.
        # @!attribute [rw] name
        #   @return [::String]
        #     Required. The name of the hub resource to get.
        class GetHubRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#create_hub HubService.CreateHub} method.
        # @!attribute [rw] parent
        #   @return [::String]
        #     Required. The parent resource.
        # @!attribute [rw] hub_id
        #   @return [::String]
        #     Required. A unique identifier for the hub.
        # @!attribute [rw] hub
        #   @return [::Google::Cloud::NetworkConnectivity::V1::Hub]
        #     Required. The initial values for a new hub.
        # @!attribute [rw] request_id
        #   @return [::String]
        #     Optional. A unique request ID (optional). If you specify this ID, you can use it
        #     in cases when you need to retry your request. When you need to retry, this
        #     ID lets the server know that it can ignore the request if it has already
        #     been completed. The server guarantees that for at least 60 minutes after
        #     the first request.
        #
        #     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).
        class CreateHubRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#update_hub HubService.UpdateHub} method.
        # @!attribute [rw] update_mask
        #   @return [::Google::Protobuf::FieldMask]
        #     Optional. In the case of an update to an existing hub, 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.
        # @!attribute [rw] hub
        #   @return [::Google::Cloud::NetworkConnectivity::V1::Hub]
        #     Required. The state that the hub should be in after the update.
        # @!attribute [rw] request_id
        #   @return [::String]
        #     Optional. A unique request ID (optional). If you specify this ID, you can use it
        #     in cases when you need to retry your request. When you need to retry, this
        #     ID lets the server know that it can ignore the request if it has already
        #     been completed. The server guarantees that for at least 60 minutes after
        #     the first request.
        #
        #     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).
        class UpdateHubRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#delete_hub HubService.DeleteHub}.
        # @!attribute [rw] name
        #   @return [::String]
        #     Required. The name of the hub to delete.
        # @!attribute [rw] request_id
        #   @return [::String]
        #     Optional. A unique request ID (optional). If you specify this ID, you can use it
        #     in cases when you need to retry your request. When you need to retry, this
        #     ID lets the server know that it can ignore the request if it has already
        #     been completed. The server guarantees that for at least 60 minutes after
        #     the first request.
        #
        #     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).
        class DeleteHubRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#list_spokes HubService.ListSpokes}.
        # @!attribute [rw] parent
        #   @return [::String]
        #     Required. The parent resource.
        # @!attribute [rw] page_size
        #   @return [::Integer]
        #     The maximum number of results per page that should be returned.
        # @!attribute [rw] page_token
        #   @return [::String]
        #     The page token.
        # @!attribute [rw] filter
        #   @return [::String]
        #     An expression that filters the results listed in the response.
        # @!attribute [rw] order_by
        #   @return [::String]
        #     Sort the results by a certain order.
        class ListSpokesRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The response for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#list_spokes HubService.ListSpokes}.
        # @!attribute [rw] spokes
        #   @return [::Array<::Google::Cloud::NetworkConnectivity::V1::Spoke>]
        #     The requested spokes.
        # @!attribute [rw] next_page_token
        #   @return [::String]
        #     The next pagination token in the List response. It should be used as
        #     page_token for the following request. An empty value means no more result.
        # @!attribute [rw] unreachable
        #   @return [::Array<::String>]
        #     Locations that could not be reached.
        class ListSpokesResponse
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#get_spoke HubService.GetSpoke}.
        # @!attribute [rw] name
        #   @return [::String]
        #     Required. The name of the spoke resource.
        class GetSpokeRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#create_spoke HubService.CreateSpoke}.
        # @!attribute [rw] parent
        #   @return [::String]
        #     Required. The parent resource.
        # @!attribute [rw] spoke_id
        #   @return [::String]
        #     Required. Unique id for the spoke to create.
        # @!attribute [rw] spoke
        #   @return [::Google::Cloud::NetworkConnectivity::V1::Spoke]
        #     Required. The initial values for a new spoke.
        # @!attribute [rw] request_id
        #   @return [::String]
        #     Optional. A unique request ID (optional). If you specify this ID, you can use it
        #     in cases when you need to retry your request. When you need to retry, this
        #     ID lets the server know that it can ignore the request if it has already
        #     been completed. The server guarantees that for at least 60 minutes after
        #     the first request.
        #
        #     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).
        class CreateSpokeRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#update_spoke HubService.UpdateSpoke} method.
        # @!attribute [rw] update_mask
        #   @return [::Google::Protobuf::FieldMask]
        #     Optional. In the case of an update to an existing spoke, 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.
        # @!attribute [rw] spoke
        #   @return [::Google::Cloud::NetworkConnectivity::V1::Spoke]
        #     Required. The state that the spoke should be in after the update.
        # @!attribute [rw] request_id
        #   @return [::String]
        #     Optional. A unique request ID (optional). If you specify this ID, you can use it
        #     in cases when you need to retry your request. When you need to retry, this
        #     ID lets the server know that it can ignore the request if it has already
        #     been completed. The server guarantees that for at least 60 minutes after
        #     the first request.
        #
        #     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).
        class UpdateSpokeRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The request for {::Google::Cloud::NetworkConnectivity::V1::HubService::Client#delete_spoke HubService.DeleteSpoke}.
        # @!attribute [rw] name
        #   @return [::String]
        #     Required. The name of the spoke to delete.
        # @!attribute [rw] request_id
        #   @return [::String]
        #     Optional. A unique request ID (optional). If you specify this ID, you can use it
        #     in cases when you need to retry your request. When you need to retry, this
        #     ID lets the server know that it can ignore the request if it has already
        #     been completed. The server guarantees that for at least 60 minutes after
        #     the first request.
        #
        #     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).
        class DeleteSpokeRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # A collection of Cloud VPN tunnel resources. These resources should be
        # redundant HA VPN tunnels that all advertise the same prefixes to Google
        # Cloud. Alternatively, in a passive/active configuration, all tunnels
        # should be capable of advertising the same prefixes.
        # @!attribute [rw] uris
        #   @return [::Array<::String>]
        #     The URIs of linked VPN tunnel resources.
        # @!attribute [rw] site_to_site_data_transfer
        #   @return [::Boolean]
        #     A value that controls whether site-to-site data transfer is enabled for
        #     these resources. Data transfer is available only in [supported
        #     locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
        class LinkedVpnTunnels
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # A collection of VLAN attachment resources. These resources should
        # be redundant attachments that all advertise the same prefixes to Google
        # Cloud. Alternatively, in active/passive configurations, all attachments
        # should be capable of advertising the same prefixes.
        # @!attribute [rw] uris
        #   @return [::Array<::String>]
        #     The URIs of linked interconnect attachment resources
        # @!attribute [rw] site_to_site_data_transfer
        #   @return [::Boolean]
        #     A value that controls whether site-to-site data transfer is enabled for
        #     these resources. Data transfer is available only in [supported
        #     locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
        class LinkedInterconnectAttachments
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # A collection of router appliance instances. If you configure multiple router
        # appliance instances to receive data from the same set of sites outside of
        # Google Cloud, we recommend that you associate those instances with the same
        # spoke.
        # @!attribute [rw] instances
        #   @return [::Array<::Google::Cloud::NetworkConnectivity::V1::RouterApplianceInstance>]
        #     The list of router appliance instances.
        # @!attribute [rw] site_to_site_data_transfer
        #   @return [::Boolean]
        #     A value that controls whether site-to-site data transfer is enabled for
        #     these resources. Data transfer is available only in [supported
        #     locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
        class LinkedRouterApplianceInstances
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # A router appliance instance is a Compute Engine virtual machine (VM) instance
        # that acts as a BGP speaker. A router appliance instance is specified by the
        # URI of the VM and the internal IP address of one of the VM's network
        # interfaces.
        # @!attribute [rw] virtual_machine
        #   @return [::String]
        #     The URI of the VM.
        # @!attribute [rw] ip_address
        #   @return [::String]
        #     The IP address on the VM to use for peering.
        class RouterApplianceInstance
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Metadata about locations
        # @!attribute [rw] location_features
        #   @return [::Array<::Google::Cloud::NetworkConnectivity::V1::LocationFeature>]
        #     List of supported features
        class LocationMetadata
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The State enum represents the lifecycle stage of a Network Connectivity
        # Center resource.
        module State
          # No state information available
          STATE_UNSPECIFIED = 0

          # The resource's create operation is in progress
          CREATING = 1

          # The resource is active
          ACTIVE = 2

          # The resource's Delete operation is in progress
          DELETING = 3
        end

        # Supported features for a location
        module LocationFeature
          # No publicly supported feature in this location
          LOCATION_FEATURE_UNSPECIFIED = 0

          # Site-to-cloud spokes are supported in this location
          SITE_TO_CLOUD_SPOKES = 1

          # Site-to-site spokes are supported in this location
          SITE_TO_SITE_SPOKES = 2
        end
      end
    end
  end
end