# 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::MixedReality::Mgmt::V2020_04_06_preview
  module Models
    #
    # The resource model definition containing the full set of allowed
    # properties for a resource. Except properties bag, there cannot be a top
    # level property outside of this set.
    #
    class ResourceModelWithAllowedPropertySet

      include MsRestAzure

      # @return [String] Fully qualified resource Id for the resource. Ex -
      # /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
      attr_accessor :id

      # @return [String] The name of the resource
      attr_accessor :name

      # @return [String] The type of the resource. Ex-
      # Microsoft.Compute/virtualMachines or
      # Microsoft.Storage/storageAccounts..
      attr_accessor :type

      # @return [String] The geo-location where the resource lives
      attr_accessor :location

      # @return [String] The  fully qualified resource ID of the resource that
      # manages this resource. Indicates if this resource is managed by another
      # azure resource. If this is present, complete mode deployment will not
      # delete the resource if it is removed from the template since it is
      # managed by another resource.
      attr_accessor :managed_by

      # @return [String] Metadata used by portal/tooling/etc to render
      # different UX experiences for resources of the same type; e.g. ApiApps
      # are a kind of Microsoft.Web/sites type.  If supported, the resource
      # provider must validate and persist this value.
      attr_accessor :kind

      # @return [String] The etag field is *not* required. If it is provided in
      # the response body, it must also be provided as a header per the normal
      # etag convention.  Entity tags are used for comparing two or more
      # entities from the same requested resource. HTTP/1.1 uses entity tags in
      # the etag (section 14.19), If-Match (section 14.24), If-None-Match
      # (section 14.26), and If-Range (section 14.27) header fields.
      attr_accessor :etag

      # @return [Hash{String => String}] Resource tags.
      attr_accessor :tags

      # @return [ResourceModelWithAllowedPropertySetIdentity]
      attr_accessor :identity

      # @return [ResourceModelWithAllowedPropertySetSku]
      attr_accessor :sku

      # @return [ResourceModelWithAllowedPropertySetPlan]
      attr_accessor :plan


      #
      # Mapper for ResourceModelWithAllowedPropertySet class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ResourceModelWithAllowedPropertySet',
          type: {
            name: 'Composite',
            class_name: 'ResourceModelWithAllowedPropertySet',
            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'
                }
              },
              location: {
                client_side_validation: true,
                required: false,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              },
              managed_by: {
                client_side_validation: true,
                required: false,
                serialized_name: 'managedBy',
                type: {
                  name: 'String'
                }
              },
              kind: {
                client_side_validation: true,
                required: false,
                serialized_name: 'kind',
                constraints: {
                  Pattern: '^[-\w\._,\(\)]+$'
                },
                type: {
                  name: 'String'
                }
              },
              etag: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'etag',
                type: {
                  name: 'String'
                }
              },
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              identity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'identity',
                type: {
                  name: 'Composite',
                  class_name: 'ResourceModelWithAllowedPropertySetIdentity'
                }
              },
              sku: {
                client_side_validation: true,
                required: false,
                serialized_name: 'sku',
                type: {
                  name: 'Composite',
                  class_name: 'ResourceModelWithAllowedPropertySetSku'
                }
              },
              plan: {
                client_side_validation: true,
                required: false,
                serialized_name: 'plan',
                type: {
                  name: 'Composite',
                  class_name: 'ResourceModelWithAllowedPropertySetPlan'
                }
              }
            }
          }
        }
      end
    end
  end
end
