Class: Azure::ApiManagement::Mgmt::V2017_03_01::Models::SubscriptionContract

Inherits:
Resource
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb

Overview

Subscription details.

Instance Attribute Summary collapse

Attributes inherited from Resource

#id, #name, #type

Class Method Summary collapse

Methods inherited from Resource

#resource_group

Instance Attribute Details

#created_dateDateTime

following format: ‘yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.

Returns:

  • (DateTime)

    Subscription creation date. The date conforms to the



45
46
47
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 45

def created_date
  @created_date
end

#display_nameString

subscription has no name.

Returns:

  • (String)

    The name of the subscription, or null if the



27
28
29
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 27

def display_name
  @display_name
end

#end_dateDateTime

setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the ‘state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.

Returns:

  • (DateTime)

    Date when subscription was cancelled or expired. The



69
70
71
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 69

def end_date
  @end_date
end

#expiration_dateDateTime

audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the ‘state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.

Returns:

  • (DateTime)

    Subscription expiration date. The setting is for



61
62
63
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 61

def expiration_date
  @expiration_date
end

#notification_dateDateTime

The date conforms to the following format: ‘yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.

Returns:

  • (DateTime)

    Upcoming subscription expiration notification date.



75
76
77
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 75

def notification_date
  @notification_date
end

#primary_keyString

Returns Subscription primary key.

Returns:

  • (String)

    Subscription primary key.



78
79
80
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 78

def primary_key
  @primary_key
end

#product_idString

product. The value is a valid relative URL in the format of /products/productId where productId is a product identifier.

Returns:

  • (String)

    The product resource identifier of the subscribed



23
24
25
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 23

def product_id
  @product_id
end

#secondary_keyString

Returns Subscription secondary key.

Returns:

  • (String)

    Subscription secondary key.



81
82
83
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 81

def secondary_key
  @secondary_key
end

#start_dateDateTime

audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the ‘state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.

Returns:

  • (DateTime)

    Subscription activation date. The setting is for



53
54
55
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 53

def start_date
  @start_date
end

#stateSubscriptionState

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’

Returns:



39
40
41
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 39

def state
  @state
end

#state_commentString

administrator.

Returns:

  • (String)

    Optional subscription comment added by an



85
86
87
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 85

def state_comment
  @state_comment
end

#user_idString

owner. The value is a valid relative URL in the format of /users/uid where uid is a user identifier.

Returns:

  • (String)

    The user resource identifier of the subscription



18
19
20
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 18

def user_id
  @user_id
end

Class Method Details

.mapperObject

Mapper for SubscriptionContract class as Ruby Hash. This will be used for serialization/deserialization.



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb', line 92

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'SubscriptionContract',
    type: {
      name: 'Composite',
      class_name: 'SubscriptionContract',
      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'
          }
        },
        user_id: {
          client_side_validation: true,
          required: true,
          serialized_name: 'properties.userId',
          type: {
            name: 'String'
          }
        },
        product_id: {
          client_side_validation: true,
          required: true,
          serialized_name: 'properties.productId',
          type: {
            name: 'String'
          }
        },
        display_name: {
          client_side_validation: true,
          required: false,
          serialized_name: 'properties.displayName',
          constraints: {
            MaxLength: 100,
            MinLength: 0
          },
          type: {
            name: 'String'
          }
        },
        state: {
          client_side_validation: true,
          required: true,
          serialized_name: 'properties.state',
          type: {
            name: 'Enum',
            module: 'SubscriptionState'
          }
        },
        created_date: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'properties.createdDate',
          type: {
            name: 'DateTime'
          }
        },
        start_date: {
          client_side_validation: true,
          required: false,
          serialized_name: 'properties.startDate',
          type: {
            name: 'DateTime'
          }
        },
        expiration_date: {
          client_side_validation: true,
          required: false,
          serialized_name: 'properties.expirationDate',
          type: {
            name: 'DateTime'
          }
        },
        end_date: {
          client_side_validation: true,
          required: false,
          serialized_name: 'properties.endDate',
          type: {
            name: 'DateTime'
          }
        },
        notification_date: {
          client_side_validation: true,
          required: false,
          serialized_name: 'properties.notificationDate',
          type: {
            name: 'DateTime'
          }
        },
        primary_key: {
          client_side_validation: true,
          required: true,
          serialized_name: 'properties.primaryKey',
          constraints: {
            MaxLength: 256,
            MinLength: 1
          },
          type: {
            name: 'String'
          }
        },
        secondary_key: {
          client_side_validation: true,
          required: true,
          serialized_name: 'properties.secondaryKey',
          constraints: {
            MaxLength: 256,
            MinLength: 1
          },
          type: {
            name: 'String'
          }
        },
        state_comment: {
          client_side_validation: true,
          required: false,
          serialized_name: 'properties.stateComment',
          type: {
            name: 'String'
          }
        }
      }
    }
  }
end