Show / Hide Table of Contents

Class OptimizerPaginators

Collection of helper methods that can be used to provide an enumerator interface to any list operations of Optimizer where multiple pages of data may be fetched. Two styles of enumerators are supported:

  • Enumerating over the Response objects returned by the list operation. These are referred to as ResponseEnumerators, and the methods are suffixed with ResponseEnumerator. For example: listUsersResponseEnumerator.
  • Enumerating over the resources/records being listed. These are referred to as RecordEnumerators, and the methods are suffixed with RecordEnumerator. For example: listUsersRecordEnumerator.
These enumerators abstract away the need to write code to manually handle pagination via looping and using the page tokens. They will automatically fetch more data from the service when required.

As an example, if we were using the ListUsers operation in IdentityService, then the iterator returned by calling a ResponseEnumerator method would iterate over the ListUsersResponse objects returned by each ListUsers call, whereas the enumerables returned by calling a RecordEnumerator method would iterate over the User records and we don't have to deal with ListUsersResponse objects at all. In either case, pagination will be automatically handled so we can iterate until there are no more responses or no more resources/records available.
Inheritance
object
OptimizerPaginators
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.OptimizerService
Assembly: OCI.DotNetSDK.Optimizer.dll
Syntax
public class OptimizerPaginators

Constructors

OptimizerPaginators(OptimizerClient)

Declaration
public OptimizerPaginators(OptimizerClient client)
Parameters
Type Name Description
OptimizerClient client

Methods

ListCategoriesRecordEnumerator(ListCategoriesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the CategorySummary objects contained in responses from the ListCategories operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<CategorySummary> ListCategoriesRecordEnumerator(ListCategoriesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListCategoriesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<CategorySummary>

The enumerator, which supports a simple iteration over a collection of a specified type

ListCategoriesResponseEnumerator(ListCategoriesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListCategories operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListCategoriesResponse> ListCategoriesResponseEnumerator(ListCategoriesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListCategoriesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListCategoriesResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListEnrollmentStatusesRecordEnumerator(ListEnrollmentStatusesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the EnrollmentStatusSummary objects contained in responses from the ListEnrollmentStatuses operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<EnrollmentStatusSummary> ListEnrollmentStatusesRecordEnumerator(ListEnrollmentStatusesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListEnrollmentStatusesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<EnrollmentStatusSummary>

The enumerator, which supports a simple iteration over a collection of a specified type

ListEnrollmentStatusesResponseEnumerator(ListEnrollmentStatusesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListEnrollmentStatuses operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListEnrollmentStatusesResponse> ListEnrollmentStatusesResponseEnumerator(ListEnrollmentStatusesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListEnrollmentStatusesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListEnrollmentStatusesResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListHistoriesRecordEnumerator(ListHistoriesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the HistorySummary objects contained in responses from the ListHistories operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<HistorySummary> ListHistoriesRecordEnumerator(ListHistoriesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListHistoriesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<HistorySummary>

The enumerator, which supports a simple iteration over a collection of a specified type

ListHistoriesResponseEnumerator(ListHistoriesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListHistories operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListHistoriesResponse> ListHistoriesResponseEnumerator(ListHistoriesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListHistoriesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListHistoriesResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListProfileLevelsRecordEnumerator(ListProfileLevelsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the ProfileLevelSummary objects contained in responses from the ListProfileLevels operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ProfileLevelSummary> ListProfileLevelsRecordEnumerator(ListProfileLevelsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListProfileLevelsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ProfileLevelSummary>

The enumerator, which supports a simple iteration over a collection of a specified type

ListProfileLevelsResponseEnumerator(ListProfileLevelsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListProfileLevels operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListProfileLevelsResponse> ListProfileLevelsResponseEnumerator(ListProfileLevelsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListProfileLevelsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListProfileLevelsResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListProfilesRecordEnumerator(ListProfilesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the ProfileSummary objects contained in responses from the ListProfiles operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ProfileSummary> ListProfilesRecordEnumerator(ListProfilesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListProfilesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ProfileSummary>

The enumerator, which supports a simple iteration over a collection of a specified type

ListProfilesResponseEnumerator(ListProfilesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListProfiles operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListProfilesResponse> ListProfilesResponseEnumerator(ListProfilesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListProfilesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListProfilesResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListRecommendationStrategiesRecordEnumerator(ListRecommendationStrategiesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the RecommendationStrategySummary objects contained in responses from the ListRecommendationStrategies operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<RecommendationStrategySummary> ListRecommendationStrategiesRecordEnumerator(ListRecommendationStrategiesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListRecommendationStrategiesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<RecommendationStrategySummary>

The enumerator, which supports a simple iteration over a collection of a specified type

ListRecommendationStrategiesResponseEnumerator(ListRecommendationStrategiesRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListRecommendationStrategies operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListRecommendationStrategiesResponse> ListRecommendationStrategiesResponseEnumerator(ListRecommendationStrategiesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListRecommendationStrategiesRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListRecommendationStrategiesResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListRecommendationsRecordEnumerator(ListRecommendationsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the RecommendationSummary objects contained in responses from the ListRecommendations operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<RecommendationSummary> ListRecommendationsRecordEnumerator(ListRecommendationsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListRecommendationsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<RecommendationSummary>

The enumerator, which supports a simple iteration over a collection of a specified type

ListRecommendationsResponseEnumerator(ListRecommendationsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListRecommendations operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListRecommendationsResponse> ListRecommendationsResponseEnumerator(ListRecommendationsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListRecommendationsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListRecommendationsResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListResourceActionQueryableFieldsRecordEnumerator(ListResourceActionQueryableFieldsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the QueryableFieldSummary objects contained in responses from the ListResourceActionQueryableFields operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<QueryableFieldSummary> ListResourceActionQueryableFieldsRecordEnumerator(ListResourceActionQueryableFieldsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListResourceActionQueryableFieldsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<QueryableFieldSummary>

The enumerator, which supports a simple iteration over a collection of a specified type

ListResourceActionQueryableFieldsResponseEnumerator(ListResourceActionQueryableFieldsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListResourceActionQueryableFields operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListResourceActionQueryableFieldsResponse> ListResourceActionQueryableFieldsResponseEnumerator(ListResourceActionQueryableFieldsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListResourceActionQueryableFieldsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListResourceActionQueryableFieldsResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListResourceActionsRecordEnumerator(ListResourceActionsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the ResourceActionSummary objects contained in responses from the ListResourceActions operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ResourceActionSummary> ListResourceActionsRecordEnumerator(ListResourceActionsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListResourceActionsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ResourceActionSummary>

The enumerator, which supports a simple iteration over a collection of a specified type

ListResourceActionsResponseEnumerator(ListResourceActionsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListResourceActions operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListResourceActionsResponse> ListResourceActionsResponseEnumerator(ListResourceActionsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListResourceActionsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListResourceActionsResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListWorkRequestErrorsRecordEnumerator(ListWorkRequestErrorsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the WorkRequestError objects contained in responses from the ListWorkRequestErrors operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<WorkRequestError> ListWorkRequestErrorsRecordEnumerator(ListWorkRequestErrorsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListWorkRequestErrorsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<WorkRequestError>

The enumerator, which supports a simple iteration over a collection of a specified type

ListWorkRequestErrorsResponseEnumerator(ListWorkRequestErrorsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListWorkRequestErrors operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListWorkRequestErrorsResponse> ListWorkRequestErrorsResponseEnumerator(ListWorkRequestErrorsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListWorkRequestErrorsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListWorkRequestErrorsResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListWorkRequestLogsRecordEnumerator(ListWorkRequestLogsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the WorkRequestLogEntry objects contained in responses from the ListWorkRequestLogs operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<WorkRequestLogEntry> ListWorkRequestLogsRecordEnumerator(ListWorkRequestLogsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListWorkRequestLogsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<WorkRequestLogEntry>

The enumerator, which supports a simple iteration over a collection of a specified type

ListWorkRequestLogsResponseEnumerator(ListWorkRequestLogsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListWorkRequestLogs operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListWorkRequestLogsResponse> ListWorkRequestLogsResponseEnumerator(ListWorkRequestLogsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListWorkRequestLogsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListWorkRequestLogsResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

ListWorkRequestsRecordEnumerator(ListWorkRequestsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the WorkRequest objects contained in responses from the ListWorkRequests operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<WorkRequest> ListWorkRequestsRecordEnumerator(ListWorkRequestsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListWorkRequestsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<WorkRequest>

The enumerator, which supports a simple iteration over a collection of a specified type

ListWorkRequestsResponseEnumerator(ListWorkRequestsRequest, RetryConfiguration, CancellationToken)

Creates a new enumerable which will iterate over the responses received from the ListWorkRequests operation. This enumerable will fetch more data from the server as needed.

Declaration
public IEnumerable<ListWorkRequestsResponse> ListWorkRequestsResponseEnumerator(ListWorkRequestsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListWorkRequestsRequest request

The request object containing the details to send

RetryConfiguration retryConfiguration

The configuration for retrying, may be null

CancellationToken cancellationToken

The cancellation token object

Returns
Type Description
IEnumerable<ListWorkRequestsResponse>

The enumerator, which supports a simple iteration over a collection of a specified type

In this article
Back to top