# 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::RecoveryServicesSiteRecovery::Mgmt::V2016_08_10
  module Models
    #
    # Replication protected item custom data details.
    #
    class ReplicationProtectedItemProperties

      include MsRestAzure

      # @return [String] The name.
      attr_accessor :friendly_name

      # @return [String] The type of protected item type.
      attr_accessor :protected_item_type

      # @return [String] The protected item ARM Id.
      attr_accessor :protectable_item_id

      # @return [String] The recovery provider ARM Id.
      attr_accessor :recovery_services_provider_id

      # @return [String] The friendly name of the primary fabric.
      attr_accessor :primary_fabric_friendly_name

      # @return [String] The friendly name of recovery fabric.
      attr_accessor :recovery_fabric_friendly_name

      # @return [String] The Arm Id of recovery fabric.
      attr_accessor :recovery_fabric_id

      # @return [String] The name of primary protection container friendly
      # name.
      attr_accessor :primary_protection_container_friendly_name

      # @return [String] The name of recovery container friendly name.
      attr_accessor :recovery_protection_container_friendly_name

      # @return [String] The protection status.
      attr_accessor :protection_state

      # @return [String] The protection state description.
      attr_accessor :protection_state_description

      # @return [String] The Current active location of the PE.
      attr_accessor :active_location

      # @return [String] The Test failover state.
      attr_accessor :test_failover_state

      # @return [String] The Test failover state description.
      attr_accessor :test_failover_state_description

      # @return [Array<String>] The allowed operations on the Replication
      # protected item.
      attr_accessor :allowed_operations

      # @return [String] The consolidated protection health for the VM taking
      # any issues with SRS as well as all the replication units associated
      # with the VM's replication group into account. This is a string
      # representation of the ProtectionHealth enumeration.
      attr_accessor :replication_health

      # @return [String] The consolidated failover health for the VM.
      attr_accessor :failover_health

      # @return [Array<HealthError>] List of replication health errors.
      attr_accessor :replication_health_errors

      # @return [Array<HealthError>] List of failover health errors.
      attr_accessor :failover_health_errors

      # @return [String] The ID of Policy governing this PE.
      attr_accessor :policy_id

      # @return [String] The name of Policy governing this PE.
      attr_accessor :policy_friendly_name

      # @return [DateTime] The Last successful failover time.
      attr_accessor :last_successful_failover_time

      # @return [DateTime] The Last successful test failover time.
      attr_accessor :last_successful_test_failover_time

      # @return [CurrentScenarioDetails] The current scenario.
      attr_accessor :current_scenario

      # @return [String] The recovery point ARM Id to which the Vm was failed
      # over.
      attr_accessor :failover_recovery_point_id

      # @return [ReplicationProviderSpecificSettings] The Replication provider
      # custom settings.
      attr_accessor :provider_specific_details

      # @return [String] The recovery container Id.
      attr_accessor :recovery_container_id


      #
      # Mapper for ReplicationProtectedItemProperties class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ReplicationProtectedItemProperties',
          type: {
            name: 'Composite',
            class_name: 'ReplicationProtectedItemProperties',
            model_properties: {
              friendly_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'friendlyName',
                type: {
                  name: 'String'
                }
              },
              protected_item_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'protectedItemType',
                type: {
                  name: 'String'
                }
              },
              protectable_item_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'protectableItemId',
                type: {
                  name: 'String'
                }
              },
              recovery_services_provider_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'recoveryServicesProviderId',
                type: {
                  name: 'String'
                }
              },
              primary_fabric_friendly_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'primaryFabricFriendlyName',
                type: {
                  name: 'String'
                }
              },
              recovery_fabric_friendly_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'recoveryFabricFriendlyName',
                type: {
                  name: 'String'
                }
              },
              recovery_fabric_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'recoveryFabricId',
                type: {
                  name: 'String'
                }
              },
              primary_protection_container_friendly_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'primaryProtectionContainerFriendlyName',
                type: {
                  name: 'String'
                }
              },
              recovery_protection_container_friendly_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'recoveryProtectionContainerFriendlyName',
                type: {
                  name: 'String'
                }
              },
              protection_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'protectionState',
                type: {
                  name: 'String'
                }
              },
              protection_state_description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'protectionStateDescription',
                type: {
                  name: 'String'
                }
              },
              active_location: {
                client_side_validation: true,
                required: false,
                serialized_name: 'activeLocation',
                type: {
                  name: 'String'
                }
              },
              test_failover_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'testFailoverState',
                type: {
                  name: 'String'
                }
              },
              test_failover_state_description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'testFailoverStateDescription',
                type: {
                  name: 'String'
                }
              },
              allowed_operations: {
                client_side_validation: true,
                required: false,
                serialized_name: 'allowedOperations',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              replication_health: {
                client_side_validation: true,
                required: false,
                serialized_name: 'replicationHealth',
                type: {
                  name: 'String'
                }
              },
              failover_health: {
                client_side_validation: true,
                required: false,
                serialized_name: 'failoverHealth',
                type: {
                  name: 'String'
                }
              },
              replication_health_errors: {
                client_side_validation: true,
                required: false,
                serialized_name: 'replicationHealthErrors',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'HealthErrorElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'HealthError'
                      }
                  }
                }
              },
              failover_health_errors: {
                client_side_validation: true,
                required: false,
                serialized_name: 'failoverHealthErrors',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'HealthErrorElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'HealthError'
                      }
                  }
                }
              },
              policy_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'policyId',
                type: {
                  name: 'String'
                }
              },
              policy_friendly_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'policyFriendlyName',
                type: {
                  name: 'String'
                }
              },
              last_successful_failover_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'lastSuccessfulFailoverTime',
                type: {
                  name: 'DateTime'
                }
              },
              last_successful_test_failover_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'lastSuccessfulTestFailoverTime',
                type: {
                  name: 'DateTime'
                }
              },
              current_scenario: {
                client_side_validation: true,
                required: false,
                serialized_name: 'currentScenario',
                type: {
                  name: 'Composite',
                  class_name: 'CurrentScenarioDetails'
                }
              },
              failover_recovery_point_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'failoverRecoveryPointId',
                type: {
                  name: 'String'
                }
              },
              provider_specific_details: {
                client_side_validation: true,
                required: false,
                serialized_name: 'providerSpecificDetails',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'instanceType',
                  uber_parent: 'ReplicationProviderSpecificSettings',
                  class_name: 'ReplicationProviderSpecificSettings'
                }
              },
              recovery_container_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'recoveryContainerId',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
