# 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::EventGrid::Mgmt::V2020_10_15_preview
  module Models
    #
    # The identity information for the resource.
    #
    class IdentityInfo

      include MsRestAzure

      # @return [IdentityType] The type of managed identity used. The type
      # 'SystemAssigned, UserAssigned' includes both an implicitly created
      # identity and a set of user-assigned identities. The type 'None' will
      # remove any identity. Possible values include: 'None', 'SystemAssigned',
      # 'UserAssigned', 'SystemAssigned, UserAssigned'
      attr_accessor :type

      # @return [String] The principal ID of resource identity.
      attr_accessor :principal_id

      # @return [String] The tenant ID of resource.
      attr_accessor :tenant_id

      # @return [Hash{String => UserIdentityProperties}] The list of user
      # identities associated with the resource. The user identity dictionary
      # key references will be ARM resource ids in the form:
      # '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
      # This property is currently not used and reserved for future usage.
      attr_accessor :user_assigned_identities


      #
      # Mapper for IdentityInfo class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'IdentityInfo',
          type: {
            name: 'Composite',
            class_name: 'IdentityInfo',
            model_properties: {
              type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              principal_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'principalId',
                type: {
                  name: 'String'
                }
              },
              tenant_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tenantId',
                type: {
                  name: 'String'
                }
              },
              user_assigned_identities: {
                client_side_validation: true,
                required: false,
                serialized_name: 'userAssignedIdentities',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'UserIdentityPropertiesElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'UserIdentityProperties'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
