# 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::ServiceFabric::V6_4_0_36
  module Models
    #
    # Information about a Service Fabric service replica deployed on a node.
    #
    class DeployedServiceReplicaDetailInfo

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["Stateful"] = "DeployedStatefulServiceReplicaDetailInfo"
      @@discriminatorMap["Stateless"] = "DeployedStatelessServiceInstanceDetailInfo"

      def initialize
        @ServiceKind = "DeployedServiceReplicaDetailInfo"
      end

      attr_accessor :ServiceKind

      # @return [String] Full hierarchical name of the service in URI format
      # starting with `fabric:`.
      attr_accessor :service_name

      # @return An internal ID used by Service Fabric to uniquely identify a
      # partition. This is a randomly generated GUID when the service was
      # created. The partition ID is unique and does not change for the
      # lifetime of the service. If the same service was deleted and recreated
      # the IDs of its partitions would be different.
      attr_accessor :partition_id

      # @return [ServiceOperationName] Specifies the current active life-cycle
      # operation on a stateful service replica or stateless service instance.
      # Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole',
      # 'Close', 'Abort'
      attr_accessor :current_service_operation

      # @return [DateTime] The start time of the current service operation in
      # UTC format.
      attr_accessor :current_service_operation_start_time_utc

      # @return [Array<LoadMetricReportInfo>] List of load reported by replica.
      attr_accessor :reported_load


      #
      # Mapper for DeployedServiceReplicaDetailInfo class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DeployedServiceReplicaDetailInfo',
          type: {
            name: 'Composite',
            polymorphic_discriminator: 'ServiceKind',
            uber_parent: 'DeployedServiceReplicaDetailInfo',
            class_name: 'DeployedServiceReplicaDetailInfo',
            model_properties: {
              service_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ServiceName',
                type: {
                  name: 'String'
                }
              },
              partition_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'PartitionId',
                type: {
                  name: 'String'
                }
              },
              current_service_operation: {
                client_side_validation: true,
                required: false,
                serialized_name: 'CurrentServiceOperation',
                type: {
                  name: 'String'
                }
              },
              current_service_operation_start_time_utc: {
                client_side_validation: true,
                required: false,
                serialized_name: 'CurrentServiceOperationStartTimeUtc',
                type: {
                  name: 'DateTime'
                }
              },
              reported_load: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ReportedLoad',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'LoadMetricReportInfoElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'LoadMetricReportInfo'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
