# 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::ApiManagement::Mgmt::V2016_10_10
  module Models
    #
    # Parameters supplied to the Update subscription operation.
    #
    class SubscriptionUpdateParameters

      include MsRestAzure

      # @return [String] User identifier path: /users/{uid}
      attr_accessor :user_id

      # @return [String] Product identifier path: /products/{productId}
      attr_accessor :product_id

      # @return [DateTime] New subscription expiration date.
      attr_accessor :expiration_date

      # @return [String] Subscription name.
      attr_accessor :name

      # @return [String] Primary subscription key.
      attr_accessor :primary_key

      # @return [String] Secondary subscription key.
      attr_accessor :secondary_key

      # @return [SubscriptionStateContract] Subscription state. Possible states
      # are * active – the subscription is active, * suspended – the
      # subscription is blocked, and the subscriber cannot call any APIs of the
      # product, * submitted – the subscription request has been made by the
      # developer, but has not yet been approved or rejected, * rejected – the
      # subscription request has been denied by an administrator, * cancelled –
      # the subscription has been cancelled by the developer or administrator,
      # * expired – the subscription reached its expiration date and was
      # deactivated. Possible values include: 'Suspended', 'Active', 'Expired',
      # 'Submitted', 'Rejected', 'Cancelled'
      attr_accessor :state

      # @return [String] Comments describing subscription state change by the
      # administrator.
      attr_accessor :state_comment


      #
      # Mapper for SubscriptionUpdateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'SubscriptionUpdateParameters',
          type: {
            name: 'Composite',
            class_name: 'SubscriptionUpdateParameters',
            model_properties: {
              user_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'userId',
                type: {
                  name: 'String'
                }
              },
              product_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'productId',
                type: {
                  name: 'String'
                }
              },
              expiration_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'expirationDate',
                type: {
                  name: 'DateTime'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              primary_key: {
                client_side_validation: true,
                required: false,
                serialized_name: 'primaryKey',
                constraints: {
                  MaxLength: 256,
                  MinLength: 1
                },
                type: {
                  name: 'String'
                }
              },
              secondary_key: {
                client_side_validation: true,
                required: false,
                serialized_name: 'secondaryKey',
                constraints: {
                  MaxLength: 256,
                  MinLength: 1
                },
                type: {
                  name: 'String'
                }
              },
              state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'state',
                type: {
                  name: 'Enum',
                  module: 'SubscriptionStateContract'
                }
              },
              state_comment: {
                client_side_validation: true,
                required: false,
                serialized_name: 'stateComment',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
