# 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 Gaming
      module Allocationendpoint
        module V1alpha
          # @!attribute [rw] realm
          #   @return [::String]
          #     The required realm name in the following form:
          #     `{location}/{realm}`.
          # @!attribute [rw] default_game_server_deployment
          #   @return [::String]
          #     The default game server deployment name.
          #     This is used to increase the likelihood of a successful
          #     allocation.
          # @!attribute [rw] game_server_selectors
          #   @return [::Array<::Google::Cloud::Gaming::Allocationendpoint::V1alpha::GameServerSelector>]
          #     The ordered list of game server labels to match for allocations.
          #     If the first game server selector is not matched, the selection attempts
          #     the second game server selector, and so on.
          # @!attribute [rw] metadata
          #   @return [::Google::Cloud::Gaming::Allocationendpoint::V1alpha::MetaPatch]
          #     Metadata is optional custom metadata that is added to the game server at
          #     allocation. You can use this to tell the server necessary session data.
          class AllocationRequest
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] game_server_name
          #   @return [::String]
          #     The name of the allocated game server.
          # @!attribute [rw] ports
          #   @return [::Array<::Google::Cloud::Gaming::Allocationendpoint::V1alpha::AllocationResponse::GameServerStatusPort>]
          #     The allocated game server's port information.
          # @!attribute [rw] address
          #   @return [::String]
          #     The address of the allocated game server.
          # @!attribute [rw] node_name
          #   @return [::String]
          #     The node name of the allocated game server.
          # @!attribute [rw] game_server_cluster_name
          #   @return [::String]
          #     The game server cluster from which the game server was allocated.
          # @!attribute [rw] deployment_name
          #   @return [::String]
          #     The game server deployment from which the game server was allocated.
          class AllocationResponse
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods

            # The game server port info that is allocated.
            # @!attribute [rw] name
            #   @return [::String]
            # @!attribute [rw] port
            #   @return [::Integer]
            class GameServerStatusPort
              include ::Google::Protobuf::MessageExts
              extend ::Google::Protobuf::MessageExts::ClassMethods
            end
          end

          # MetaPatch is the metadata used to patch the Game Server metadata on
          # allocation. It behaves exactly as it does in OSS.
          # @!attribute [rw] labels
          #   @return [::Google::Protobuf::Map{::String => ::String}]
          # @!attribute [rw] annotations
          #   @return [::Google::Protobuf::Map{::String => ::String}]
          class MetaPatch
            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

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

          # GameServerSelector used for finding a GameServer with matching labels.
          # @!attribute [rw] match_labels
          #   @return [::Google::Protobuf::Map{::String => ::String}]
          #     Labels to match.
          class GameServerSelector
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods

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