class Azure::PolicyInsights::Mgmt::V2019_10_01::Models::PolicyStatesQueryResults
Query results.
Attributes
next_method[RW]
return [Proc] with next page method call.
odatacontext[RW]
@return [String] OData context string; used by OData clients to resolve type information based on metadata.
odatacount[RW]
@return [Integer] OData entity count; represents the number of policy state records returned.
odatanext_link[RW]
@return [String] Odata next link; URL to get the next set of results.
value[RW]
@return [Array<PolicyState>] Query results.
Public Class Methods
mapper()
click to toggle source
Mapper for PolicyStatesQueryResults
class as Ruby Hash. This will be used for serialization/deserialization.
# File lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_states_query_results.rb, line 66 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'PolicyStatesQueryResults', type: { name: 'Composite', class_name: 'PolicyStatesQueryResults', model_properties: { odatacontext: { client_side_validation: true, required: false, serialized_name: '@odata\\.context', type: { name: 'String' } }, odatacount: { client_side_validation: true, required: false, serialized_name: '@odata\\.count', constraints: { InclusiveMinimum: 0 }, type: { name: 'Number' } }, odatanext_link: { client_side_validation: true, required: false, serialized_name: '@odata\\.nextLink', type: { name: 'String' } }, value: { client_side_validation: true, required: false, serialized_name: 'value', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'PolicyStateElementType', type: { name: 'Composite', class_name: 'PolicyState' } } } } } } } end
Public Instance Methods
get_all_items()
click to toggle source
Gets the rest of the items for the request, enabling auto-pagination.
@return [Array<PolicyState>] operation results.
# File lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_states_query_results.rb, line 38 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()
click to toggle source
Gets the next page of results.
@return [PolicyStatesQueryResults] with next page content.
# File lib/2019-10-01/generated/azure_mgmt_policy_insights/models/policy_states_query_results.rb, line 53 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