-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing version 69.2.0
- Loading branch information
Showing
93 changed files
with
5,550 additions
and
8 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
Large diffs are not rendered by default.
Oops, something went wrong.
151 changes: 151 additions & 0 deletions
151
Computecloudatcustomer/ComputeCloudAtCustomerPaginators.cs
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,151 @@ | ||
/* | ||
* 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.ComputecloudatcustomerService.Requests; | ||
using Oci.ComputecloudatcustomerService.Responses; | ||
using Oci.ComputecloudatcustomerService.Models; | ||
|
||
namespace Oci.ComputecloudatcustomerService | ||
{ | ||
/// <summary> | ||
/// Collection of helper methods that can be used to provide an enumerator interface | ||
/// to any list operations of ComputeCloudAtCustomer 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 ComputeCloudAtCustomerPaginators | ||
{ | ||
private readonly ComputeCloudAtCustomerClient client; | ||
|
||
public ComputeCloudAtCustomerPaginators(ComputeCloudAtCustomerClient client) | ||
{ | ||
this.client = client; | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new enumerable which will iterate over the responses received from the ListCccInfrastructures 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<ListCccInfrastructuresResponse> ListCccInfrastructuresResponseEnumerator(ListCccInfrastructuresRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) | ||
{ | ||
return new Common.Utils.ResponseEnumerable<ListCccInfrastructuresRequest, ListCccInfrastructuresResponse>( | ||
response => response.OpcNextPage, | ||
input => | ||
{ | ||
if (!string.IsNullOrEmpty(input)) | ||
{ | ||
request.Page = input; | ||
} | ||
return request; | ||
}, | ||
request => client.ListCccInfrastructures(request, retryConfiguration, cancellationToken) | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new enumerable which will iterate over the CccInfrastructureSummary objects | ||
/// contained in responses from the ListCccInfrastructures 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<CccInfrastructureSummary> ListCccInfrastructuresRecordEnumerator(ListCccInfrastructuresRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) | ||
{ | ||
return new Common.Utils.ResponseRecordEnumerable<ListCccInfrastructuresRequest, ListCccInfrastructuresResponse, CccInfrastructureSummary>( | ||
response => response.OpcNextPage, | ||
input => | ||
{ | ||
if (!string.IsNullOrEmpty(input)) | ||
{ | ||
request.Page = input; | ||
} | ||
return request; | ||
}, | ||
request => client.ListCccInfrastructures(request, retryConfiguration, cancellationToken), | ||
response => response.CccInfrastructureCollection.Items | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new enumerable which will iterate over the responses received from the ListCccUpgradeSchedules 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<ListCccUpgradeSchedulesResponse> ListCccUpgradeSchedulesResponseEnumerator(ListCccUpgradeSchedulesRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) | ||
{ | ||
return new Common.Utils.ResponseEnumerable<ListCccUpgradeSchedulesRequest, ListCccUpgradeSchedulesResponse>( | ||
response => response.OpcNextPage, | ||
input => | ||
{ | ||
if (!string.IsNullOrEmpty(input)) | ||
{ | ||
request.Page = input; | ||
} | ||
return request; | ||
}, | ||
request => client.ListCccUpgradeSchedules(request, retryConfiguration, cancellationToken) | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new enumerable which will iterate over the CccUpgradeScheduleSummary objects | ||
/// contained in responses from the ListCccUpgradeSchedules 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<CccUpgradeScheduleSummary> ListCccUpgradeSchedulesRecordEnumerator(ListCccUpgradeSchedulesRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) | ||
{ | ||
return new Common.Utils.ResponseRecordEnumerable<ListCccUpgradeSchedulesRequest, ListCccUpgradeSchedulesResponse, CccUpgradeScheduleSummary>( | ||
response => response.OpcNextPage, | ||
input => | ||
{ | ||
if (!string.IsNullOrEmpty(input)) | ||
{ | ||
request.Page = input; | ||
} | ||
return request; | ||
}, | ||
request => client.ListCccUpgradeSchedules(request, retryConfiguration, cancellationToken), | ||
response => response.CccUpgradeScheduleCollection.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,86 @@ | ||
/* | ||
* 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.ComputecloudatcustomerService.Models; | ||
using Oci.ComputecloudatcustomerService.Requests; | ||
using Oci.ComputecloudatcustomerService.Responses; | ||
|
||
namespace Oci.ComputecloudatcustomerService | ||
{ | ||
/// <summary> | ||
/// Contains collection of helper methods to produce Oci.Common.Waiters for different resources of ComputeCloudAtCustomer. | ||
/// </summary> | ||
public class ComputeCloudAtCustomerWaiters | ||
{ | ||
private readonly ComputeCloudAtCustomerClient client; | ||
|
||
public ComputeCloudAtCustomerWaiters(ComputeCloudAtCustomerClient 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<GetCccInfrastructureRequest, GetCccInfrastructureResponse> ForCccInfrastructure(GetCccInfrastructureRequest request, params CccInfrastructure.LifecycleStateEnum[] targetStates) | ||
{ | ||
return this.ForCccInfrastructure(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<GetCccInfrastructureRequest, GetCccInfrastructureResponse> ForCccInfrastructure(GetCccInfrastructureRequest request, WaiterConfiguration config, params CccInfrastructure.LifecycleStateEnum[] targetStates) | ||
{ | ||
var agent = new WaiterAgent<GetCccInfrastructureRequest, GetCccInfrastructureResponse>( | ||
request, | ||
request => client.GetCccInfrastructure(request), | ||
response => targetStates.Contains(response.CccInfrastructure.LifecycleState.Value), | ||
targetStates.Contains(CccInfrastructure.LifecycleStateEnum.Deleted) | ||
); | ||
return new Waiter<GetCccInfrastructureRequest, GetCccInfrastructureResponse>(config, agent); | ||
} | ||
/// <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<GetCccUpgradeScheduleRequest, GetCccUpgradeScheduleResponse> ForCccUpgradeSchedule(GetCccUpgradeScheduleRequest request, params CccUpgradeSchedule.LifecycleStateEnum[] targetStates) | ||
{ | ||
return this.ForCccUpgradeSchedule(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<GetCccUpgradeScheduleRequest, GetCccUpgradeScheduleResponse> ForCccUpgradeSchedule(GetCccUpgradeScheduleRequest request, WaiterConfiguration config, params CccUpgradeSchedule.LifecycleStateEnum[] targetStates) | ||
{ | ||
var agent = new WaiterAgent<GetCccUpgradeScheduleRequest, GetCccUpgradeScheduleResponse>( | ||
request, | ||
request => client.GetCccUpgradeSchedule(request), | ||
response => targetStates.Contains(response.CccUpgradeSchedule.LifecycleState.Value), | ||
targetStates.Contains(CccUpgradeSchedule.LifecycleStateEnum.Deleted) | ||
); | ||
return new Waiter<GetCccUpgradeScheduleRequest, GetCccUpgradeScheduleResponse>(config, agent); | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
Computecloudatcustomer/OCI.DotNetSDK.Computecloudatcustomer.csproj
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,19 @@ | ||
|
||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="..\General.targets" /> | ||
<PropertyGroup> | ||
<ProjectGuid>{5B0FABED-9077-4E3C-8AE2-ACD79E71EB7F}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<LangVersion>8.0</LangVersion> | ||
<PackageId>OCI.DotNetSDK.Computecloudatcustomer</PackageId> | ||
<RootNamespace>Oci.ComputecloudatcustomerService</RootNamespace> | ||
<Authors>Oracle Cloud Infrastructure</Authors> | ||
<Company>Oracle</Company> | ||
<PackageTags>Oracle;OCI;Oracle Cloud;OracleCloud;oci-sdk;OracleCloudInfrastructure;Computecloudatcustomer</PackageTags> | ||
<Description>Oracle Cloud Infrastructure Cloud Compute Cloud At Customer Service</Description> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Common\OCI.DotNetSDK.Common.csproj"/> | ||
</ItemGroup> | ||
</Project> |
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,20 @@ | ||
|
||
# OCI .NET client for Compute Cloud At Customer Service | ||
|
||
This module enables you to write code to manage resources for Compute Cloud At Customer Service. | ||
|
||
## Requirements | ||
|
||
To use this module, you must have the following: | ||
|
||
- An Oracle Cloud Infrastructure account. | ||
- A user created in that account, in a group with a policy that grants the desired permissions. This can be a user for yourself, or another person/system that needs to call the API. For an example of how to set up a new user, group, compartment, and policy, see [Adding Users](https://docs.cloud.oracle.com/en-us/iaas/Content/GSG/Tasks/addingusers.htm). For a list of typical policies you may want to use, see [Common Policies](https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Concepts/commonpolicies.htm). | ||
- A key pair used for signing API requests, with the public key uploaded to Oracle. Only the user calling the API should be in possession of the private key. For more information, see [Configuring Credentials](https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm) | ||
|
||
## Installing | ||
|
||
Use the following command to install this module: | ||
|
||
``` | ||
dotnet add package OCI.DotNetSDK.Computecloudatcustomer | ||
``` |
Oops, something went wrong.