# 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::CustomerInsights::Mgmt::V2017_04_26
  module Models
    #
    # The link resource format.
    #
    class LinkResourceFormat < ProxyResource

      include MsRestAzure

      # @return [String] The hub name.
      attr_accessor :tenant_id

      # @return [String] The link name.
      attr_accessor :link_name

      # @return [EntityType] Type of source entity. Possible values include:
      # 'None', 'Profile', 'Interaction', 'Relationship'
      attr_accessor :source_entity_type

      # @return [EntityType] Type of target entity. Possible values include:
      # 'None', 'Profile', 'Interaction', 'Relationship'
      attr_accessor :target_entity_type

      # @return [String] Name of the source Entity Type.
      attr_accessor :source_entity_type_name

      # @return [String] Name of the target Entity Type.
      attr_accessor :target_entity_type_name

      # @return [Hash{String => String}] Localized display name for the Link.
      attr_accessor :display_name

      # @return [Hash{String => String}] Localized descriptions for the Link.
      attr_accessor :description

      # @return [Array<TypePropertiesMapping>] The set of properties mappings
      # between the source and target Types.
      attr_accessor :mappings

      # @return [Array<ParticipantPropertyReference>] The properties that
      # represent the participating profile.
      attr_accessor :participant_property_references

      # @return [ProvisioningStates] Provisioning state. Possible values
      # include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting',
      # 'HumanIntervention', 'Failed'
      attr_accessor :provisioning_state

      # @return [Boolean] Indicating whether the link is reference only link.
      # This flag is ingored if the Mappings are defined. If the mappings are
      # not defined and it is set to true, links processing will not create or
      # update profiles.
      attr_accessor :reference_only

      # @return [InstanceOperationType] Determines whether this link is
      # supposed to create or delete instances if Link is NOT Reference Only.
      # Possible values include: 'Upsert', 'Delete'
      attr_accessor :operation_type


      #
      # Mapper for LinkResourceFormat class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'LinkResourceFormat',
          type: {
            name: 'Composite',
            class_name: 'LinkResourceFormat',
            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'
                }
              },
              tenant_id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.tenantId',
                type: {
                  name: 'String'
                }
              },
              link_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.linkName',
                type: {
                  name: 'String'
                }
              },
              source_entity_type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.sourceEntityType',
                type: {
                  name: 'Enum',
                  module: 'EntityType'
                }
              },
              target_entity_type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.targetEntityType',
                type: {
                  name: 'Enum',
                  module: 'EntityType'
                }
              },
              source_entity_type_name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.sourceEntityTypeName',
                type: {
                  name: 'String'
                }
              },
              target_entity_type_name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.targetEntityTypeName',
                type: {
                  name: 'String'
                }
              },
              display_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.displayName',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.description',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              mappings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.mappings',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'TypePropertiesMappingElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'TypePropertiesMapping'
                      }
                  }
                }
              },
              participant_property_references: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.participantPropertyReferences',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ParticipantPropertyReferenceElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ParticipantPropertyReference'
                      }
                  }
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              },
              reference_only: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.referenceOnly',
                type: {
                  name: 'Boolean'
                }
              },
              operation_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.operationType',
                type: {
                  name: 'Enum',
                  module: 'InstanceOperationType'
                }
              }
            }
          }
        }
      end
    end
  end
end
