Class: Azure::MediaServices::Mgmt::V2018_07_01::Models::SubscriptionMediaServiceCollection
- Inherits:
-
Object
- Object
- Azure::MediaServices::Mgmt::V2018_07_01::Models::SubscriptionMediaServiceCollection
- Includes:
- MsRest::JSONable, MsRestAzure
- Defined in:
- lib/2018-07-01/generated/azure_mgmt_media_services/models/subscription_media_service_collection.rb
Overview
A collection of SubscriptionMediaService items.
Instance Attribute Summary collapse
-
#next_method ⇒ Object
return [Proc] with next page method call.
-
#odatanext_link ⇒ String
collection contains too many results to return in one response).
-
#value ⇒ Array<SubscriptionMediaService>
SubscriptionMediaService items.
Class Method Summary collapse
-
.mapper ⇒ Object
Mapper for SubscriptionMediaServiceCollection class as Ruby Hash.
Instance Method Summary collapse
-
#get_all_items ⇒ Array<SubscriptionMediaService>
Gets the rest of the items for the request, enabling auto-pagination.
-
#get_next_page ⇒ SubscriptionMediaServiceCollection
Gets the next page of results.
Instance Attribute Details
#next_method ⇒ Object
return [Proc] with next page method call.
25 26 27 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/models/subscription_media_service_collection.rb', line 25 def next_method @next_method end |
#odatanext_link ⇒ String
collection contains too many results to return in one response).
22 23 24 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/models/subscription_media_service_collection.rb', line 22 def odatanext_link @odatanext_link end |
#value ⇒ Array<SubscriptionMediaService>
SubscriptionMediaService items.
18 19 20 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/models/subscription_media_service_collection.rb', line 18 def value @value end |
Class Method Details
.mapper ⇒ Object
Mapper for SubscriptionMediaServiceCollection class as Ruby Hash. This will be used for serialization/deserialization.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/models/subscription_media_service_collection.rb', line 60 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'SubscriptionMediaServiceCollection', type: { name: 'Composite', class_name: 'SubscriptionMediaServiceCollection', model_properties: { value: { client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'SubscriptionMediaServiceElementType', type: { name: 'Composite', class_name: 'SubscriptionMediaService' } } } }, odatanext_link: { client_side_validation: true, required: false, serialized_name: '@odata\\.nextLink', type: { name: 'String' } } } } } end |
Instance Method Details
#get_all_items ⇒ Array<SubscriptionMediaService>
Gets the rest of the items for the request, enabling auto-pagination.
32 33 34 35 36 37 38 39 40 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/models/subscription_media_service_collection.rb', line 32 def get_all_items items = @value page = self while page.odatanext_link != nil && !page.odatanext_link.strip.empty? do page = page.get_next_page items.concat(page.value) end items end |
#get_next_page ⇒ SubscriptionMediaServiceCollection
Gets the next page of results.
47 48 49 50 51 52 53 54 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/models/subscription_media_service_collection.rb', line 47 def get_next_page response = @next_method.call(@odatanext_link).value! unless @next_method.nil? unless response.nil? @odatanext_link = response.body.odatanext_link @value = response.body.value self end end |