# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::Redis::Mgmt::V2017_02_01
  module Models
    #
    # Response to put/get linked server (with properties) for Redis cache.
    #
    class RedisLinkedServerWithProperties

      include MsRestAzure

      # @return [String] Resource ID.
      attr_accessor :id

      # @return [String] Resource name.
      attr_accessor :name

      # @return [String] Resource type.
      attr_accessor :type

      # @return [String] Fully qualified resourceId of the linked redis cache.
      attr_accessor :linked_redis_cache_id

      # @return [String] Location of the linked redis cache.
      attr_accessor :linked_redis_cache_location

      # @return [ReplicationRole] Role of the linked server. Possible values
      # include: 'Primary', 'Secondary'
      attr_accessor :server_role

      # @return [String] Terminal state of the link between primary and
      # secondary redis cache.
      attr_accessor :provisioning_state


      #
      # Mapper for RedisLinkedServerWithProperties class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'RedisLinkedServerWithProperties',
          type: {
            name: 'Composite',
            class_name: 'RedisLinkedServerWithProperties',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              linked_redis_cache_id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.linkedRedisCacheId',
                type: {
                  name: 'String'
                }
              },
              linked_redis_cache_location: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.linkedRedisCacheLocation',
                type: {
                  name: 'String'
                }
              },
              server_role: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.serverRole',
                type: {
                  name: 'Enum',
                  module: 'ReplicationRole'
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
