-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing version 71.2.0
- Loading branch information
Showing
85 changed files
with
2,188 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/* | ||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.Collections.Generic; | ||
using System.Threading; | ||
using Oci.KeymanagementService.Requests; | ||
using Oci.KeymanagementService.Responses; | ||
using Oci.KeymanagementService.Models; | ||
|
||
namespace Oci.KeymanagementService | ||
{ | ||
/// <summary> | ||
/// Collection of helper methods that can be used to provide an enumerator interface | ||
/// to any list operations of Ekm where multiple pages of data may be fetched. | ||
/// Two styles of enumerators are supported: | ||
/// <list type="bullet"> | ||
/// <item> | ||
/// <description> | ||
/// 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. | ||
/// </description> | ||
/// </item> | ||
/// <item> | ||
/// <description> | ||
/// Enumerating over the resources/records being listed. These are referred to as RecordEnumerators, and the methods are suffixed with RecordEnumerator. For example: listUsersRecordEnumerator. | ||
/// </description> | ||
/// </item> | ||
/// </list> | ||
/// 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. | ||
/// <br/> | ||
/// <br/> | ||
/// 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. | ||
/// </summary> | ||
public class EkmPaginators | ||
{ | ||
private readonly EkmClient client; | ||
|
||
public EkmPaginators(EkmClient client) | ||
{ | ||
this.client = client; | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new enumerable which will iterate over the responses received from the ListEkmsPrivateEndpoints operation. This enumerable | ||
/// will fetch more data from the server as needed. | ||
/// </summary> | ||
/// <param name="request">The request object containing the details to send</param> | ||
/// <param name="retryConfiguration">The configuration for retrying, may be null</param> | ||
/// <param name="cancellationToken">The cancellation token object</param> | ||
/// <returns>The enumerator, which supports a simple iteration over a collection of a specified type</returns> | ||
public IEnumerable<ListEkmsPrivateEndpointsResponse> ListEkmsPrivateEndpointsResponseEnumerator(ListEkmsPrivateEndpointsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) | ||
{ | ||
return new Common.Utils.ResponseEnumerable<ListEkmsPrivateEndpointsRequest, ListEkmsPrivateEndpointsResponse>( | ||
response => response.OpcNextPage, | ||
input => | ||
{ | ||
if (!string.IsNullOrEmpty(input)) | ||
{ | ||
request.Page = input; | ||
} | ||
return request; | ||
}, | ||
request => client.ListEkmsPrivateEndpoints(request, retryConfiguration, cancellationToken) | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new enumerable which will iterate over the EkmsPrivateEndpointSummary objects | ||
/// contained in responses from the ListEkmsPrivateEndpoints operation. This enumerable will fetch more data from the server as needed. | ||
/// </summary> | ||
/// <param name="request">The request object containing the details to send</param> | ||
/// <param name="retryConfiguration">The configuration for retrying, may be null</param> | ||
/// <param name="cancellationToken">The cancellation token object</param> | ||
/// <returns>The enumerator, which supports a simple iteration over a collection of a specified type</returns> | ||
public IEnumerable<EkmsPrivateEndpointSummary> ListEkmsPrivateEndpointsRecordEnumerator(ListEkmsPrivateEndpointsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) | ||
{ | ||
return new Common.Utils.ResponseRecordEnumerable<ListEkmsPrivateEndpointsRequest, ListEkmsPrivateEndpointsResponse, EkmsPrivateEndpointSummary>( | ||
response => response.OpcNextPage, | ||
input => | ||
{ | ||
if (!string.IsNullOrEmpty(input)) | ||
{ | ||
request.Page = input; | ||
} | ||
return request; | ||
}, | ||
request => client.ListEkmsPrivateEndpoints(request, retryConfiguration, cancellationToken), | ||
response => response.Items | ||
); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
using System.Linq; | ||
using Oci.Common.Waiters; | ||
using Oci.KeymanagementService.Models; | ||
using Oci.KeymanagementService.Requests; | ||
using Oci.KeymanagementService.Responses; | ||
|
||
namespace Oci.KeymanagementService | ||
{ | ||
/// <summary> | ||
/// Contains collection of helper methods to produce Oci.Common.Waiters for different resources of Ekm. | ||
/// </summary> | ||
public class EkmWaiters | ||
{ | ||
private readonly EkmClient client; | ||
|
||
public EkmWaiters(EkmClient client) | ||
{ | ||
this.client = client; | ||
} | ||
|
||
/// <summary> | ||
/// Creates a waiter using default wait configuration. | ||
/// </summary> | ||
/// <param name="request">Request to send.</param> | ||
/// <param name="targetStates">Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states</param> | ||
/// <returns>a new Oci.common.Waiter instance</returns> | ||
public Waiter<GetEkmsPrivateEndpointRequest, GetEkmsPrivateEndpointResponse> ForEkmsPrivateEndpoint(GetEkmsPrivateEndpointRequest request, params EkmsPrivateEndpoint.LifecycleStateEnum[] targetStates) | ||
{ | ||
return this.ForEkmsPrivateEndpoint(request, WaiterConfiguration.DefaultWaiterConfiguration, targetStates); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a waiter using the provided configuration. | ||
/// </summary> | ||
/// <param name="request">Request to send.</param> | ||
/// <param name="config">Wait Configuration</param> | ||
/// <param name="targetStates">Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states</param> | ||
/// <returns>a new Oci.common.Waiter instance</returns> | ||
public Waiter<GetEkmsPrivateEndpointRequest, GetEkmsPrivateEndpointResponse> ForEkmsPrivateEndpoint(GetEkmsPrivateEndpointRequest request, WaiterConfiguration config, params EkmsPrivateEndpoint.LifecycleStateEnum[] targetStates) | ||
{ | ||
var agent = new WaiterAgent<GetEkmsPrivateEndpointRequest, GetEkmsPrivateEndpointResponse>( | ||
request, | ||
request => client.GetEkmsPrivateEndpoint(request), | ||
response => targetStates.Contains(response.EkmsPrivateEndpoint.LifecycleState.Value), | ||
targetStates.Contains(EkmsPrivateEndpoint.LifecycleStateEnum.Deleted) | ||
); | ||
return new Waiter<GetEkmsPrivateEndpointRequest, GetEkmsPrivateEndpointResponse>(config, agent); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.