Skip to content

Commit

Permalink
Merge pull request #2 from oracle/release_2020-08-18
Browse files Browse the repository at this point in the history
Releasing version v1.0.0
  • Loading branch information
srikanthkumbham authored Aug 18, 2020
2 parents 771e9be + 55718fb commit 5dc32ec
Show file tree
Hide file tree
Showing 1,744 changed files with 143,433 additions and 1 deletion.
94 changes: 94 additions & 0 deletions Analytics/Cmdlets/Get-OCIAnalyticsInstance.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* NOTE: Generated using OracleSDKGenerator, API Version: 20190331
* DO NOT EDIT this file manually.
*
* Copyright (c) 2020, Oracle and/or its affiliates.
* 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.
*/

using System;
using System.Management.Automation;
using Oci.AnalyticsService.Requests;
using Oci.AnalyticsService.Responses;
using Oci.AnalyticsService.Models;
using Oci.Common.Waiters;

namespace Oci.AnalyticsService.Cmdlets
{
[Cmdlet("Get", "OCIAnalyticsInstance", DefaultParameterSetName = Default)]
[OutputType(new System.Type[] { typeof(Oci.AnalyticsService.Models.AnalyticsInstance), typeof(Oci.AnalyticsService.Responses.GetAnalyticsInstanceResponse) })]
public class GetOCIAnalyticsInstance : OCIAnalyticsCmdlet
{

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the AnalyticsInstance.", ParameterSetName = LifecycleStateParamSet)]
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the AnalyticsInstance.", ParameterSetName = Default)]
public string AnalyticsInstanceId { get; set; }


[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.", ParameterSetName = LifecycleStateParamSet)]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.", ParameterSetName = Default)]
public string OpcRequestId { get; set; }

[Parameter(Mandatory = true, HelpMessage = @"This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state.", ParameterSetName = LifecycleStateParamSet)]
public Oci.AnalyticsService.Models.AnalyticsInstanceLifecycleState[] WaitForLifecycleState { get; set; }

[Parameter(Mandatory = false, HelpMessage = @"Check every WaitIntervalSeconds to see whether the resource has reached a desired state.", ParameterSetName = LifecycleStateParamSet)]
public int WaitIntervalSeconds { get; set; } = WAIT_INTERVAL_SECONDS;

[Parameter(Mandatory = false, HelpMessage = @"Maximum number of attempts to be made until the resource reaches a desired state.", ParameterSetName = LifecycleStateParamSet)]
public int MaxWaitAttempts { get; set; } = MAX_WAITER_ATTEMPTS;

protected override void ProcessRecord()
{
base.ProcessRecord();
GetAnalyticsInstanceRequest request;

try
{
request = new GetAnalyticsInstanceRequest
{
AnalyticsInstanceId = AnalyticsInstanceId,
OpcRequestId = OpcRequestId
};

HandleOutput(request);
FinishProcessing(response);
}
catch (Exception ex)
{
TerminatingErrorDuringExecution(ex);
}
}

protected override void StopProcessing()
{
base.StopProcessing();
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted"));
}

private void HandleOutput(GetAnalyticsInstanceRequest request)
{
var waiterConfig = new WaiterConfiguration
{
MaxAttempts = MaxWaitAttempts,
GetNextDelayInSeconds = (_) => WaitIntervalSeconds
};

switch (ParameterSetName)
{
case LifecycleStateParamSet:
response = client.Waiters.ForAnalyticsInstance(request, waiterConfig, WaitForLifecycleState).Execute();
break;

case Default:
response = client.GetAnalyticsInstance(request).GetAwaiter().GetResult();
break;
}
WriteOutput(response, response.AnalyticsInstance);
}

private GetAnalyticsInstanceResponse response;
private const string LifecycleStateParamSet = "LifecycleStateParamSet";
private const string Default = "Default";
}
}
113 changes: 113 additions & 0 deletions Analytics/Cmdlets/Get-OCIAnalyticsInstancesList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/*
* NOTE: Generated using OracleSDKGenerator, API Version: 20190331
* DO NOT EDIT this file manually.
*
* Copyright (c) 2020, Oracle and/or its affiliates.
* 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.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using Oci.AnalyticsService.Requests;
using Oci.AnalyticsService.Responses;
using Oci.AnalyticsService.Models;

namespace Oci.AnalyticsService.Cmdlets
{
[Cmdlet("Get", "OCIAnalyticsInstancesList")]
[OutputType(new System.Type[] { typeof(Oci.AnalyticsService.Models.AnalyticsInstanceSummary), typeof(Oci.AnalyticsService.Responses.ListAnalyticsInstancesResponse) })]
public class GetOCIAnalyticsInstancesList : OCIAnalyticsCmdlet
{
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the compartment.")]
public string CompartmentId { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.")]
public string OpcRequestId { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to return only resources that match the given name exactly.")]
public string Name { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to only return resources matching the capacity type enum. Values are case-insensitive.")]
public System.Nullable<Oci.AnalyticsService.Models.CapacityType> CapacityType { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to only return resources matching the feature set. Values are case-insensitive.")]
public System.Nullable<Oci.AnalyticsService.Models.FeatureSet> FeatureSet { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to only return resources matching the lifecycle state. The state value is case-insensitive.")]
public System.Nullable<Oci.AnalyticsService.Models.AnalyticsInstanceLifecycleState> LifecycleState { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"For list pagination. The maximum number of results per page, or items to return in a paginated ""List"" call. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
Example: `50`", ParameterSetName = LimitSet)]
public System.Nullable<int> Limit { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"For list pagination. The value of the `opc-next-page` response header from the previous ""List"" call. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).")]
public string Page { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The field to sort by (one column only). Default sort order is ascending exception of `timeCreated` column (descending).")]
public System.Nullable<Oci.AnalyticsService.Models.SortBy> SortBy { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The sort order to use, either ascending (`ASC`) or descending (`DESC`).")]
public System.Nullable<Oci.AnalyticsService.Models.SortOrder> SortOrder { get; set; }

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"Fetches all pages of results.", ParameterSetName = AllPageSet)]
public SwitchParameter All { get; set; }

protected override void ProcessRecord()
{
base.ProcessRecord();
ListAnalyticsInstancesRequest request;

try
{
request = new ListAnalyticsInstancesRequest
{
CompartmentId = CompartmentId,
OpcRequestId = OpcRequestId,
Name = Name,
CapacityType = CapacityType,
FeatureSet = FeatureSet,
LifecycleState = LifecycleState,
Limit = Limit,
Page = Page,
SortBy = SortBy,
SortOrder = SortOrder
};
IEnumerable<ListAnalyticsInstancesResponse> responses = GetRequestDelegate().Invoke(request);
foreach (var item in responses)
{
response = item;
WriteOutput(response, response.Items, true);
}
FinishProcessing(response);
}
catch (Exception ex)
{
TerminatingErrorDuringExecution(ex);
}
}

protected override void StopProcessing()
{
base.StopProcessing();
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted"));
}

private RequestDelegate GetRequestDelegate()
{
IEnumerable<ListAnalyticsInstancesResponse> DefaultRequest(ListAnalyticsInstancesRequest request) => Enumerable.Repeat(client.ListAnalyticsInstances(request).GetAwaiter().GetResult(), 1);
if (ParameterSetName.Equals(AllPageSet))
{
return req => client.Paginators.ListAnalyticsInstancesResponseEnumerator(req);
}
return DefaultRequest;
}

private ListAnalyticsInstancesResponse response;
private delegate IEnumerable<ListAnalyticsInstancesResponse> RequestDelegate(ListAnalyticsInstancesRequest request);
private const string AllPageSet = "AllPages";
private const string LimitSet = "Limit";
}
}
94 changes: 94 additions & 0 deletions Analytics/Cmdlets/Get-OCIAnalyticsWorkRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* NOTE: Generated using OracleSDKGenerator, API Version: 20190331
* DO NOT EDIT this file manually.
*
* Copyright (c) 2020, Oracle and/or its affiliates.
* 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.
*/

using System;
using System.Management.Automation;
using Oci.AnalyticsService.Requests;
using Oci.AnalyticsService.Responses;
using Oci.AnalyticsService.Models;
using Oci.Common.Waiters;

namespace Oci.AnalyticsService.Cmdlets
{
[Cmdlet("Get", "OCIAnalyticsWorkRequest", DefaultParameterSetName = Default)]
[OutputType(new System.Type[] { typeof(Oci.AnalyticsService.Models.WorkRequest), typeof(Oci.AnalyticsService.Responses.GetWorkRequestResponse) })]
public class GetOCIAnalyticsWorkRequest : OCIAnalyticsCmdlet
{

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the work request.", ParameterSetName = StatusParamSet)]
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the work request.", ParameterSetName = Default)]
public string WorkRequestId { get; set; }


[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.", ParameterSetName = StatusParamSet)]
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.", ParameterSetName = Default)]
public string OpcRequestId { get; set; }

[Parameter(Mandatory = true, HelpMessage = @"This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state.", ParameterSetName = StatusParamSet)]
public Oci.AnalyticsService.Models.WorkRequestStatus[] WaitForStatus { get; set; }

[Parameter(Mandatory = false, HelpMessage = @"Check every WaitIntervalSeconds to see whether the resource has reached a desired state.", ParameterSetName = StatusParamSet)]
public int WaitIntervalSeconds { get; set; } = WAIT_INTERVAL_SECONDS;

[Parameter(Mandatory = false, HelpMessage = @"Maximum number of attempts to be made until the resource reaches a desired state.", ParameterSetName = StatusParamSet)]
public int MaxWaitAttempts { get; set; } = MAX_WAITER_ATTEMPTS;

protected override void ProcessRecord()
{
base.ProcessRecord();
GetWorkRequestRequest request;

try
{
request = new GetWorkRequestRequest
{
WorkRequestId = WorkRequestId,
OpcRequestId = OpcRequestId
};

HandleOutput(request);
FinishProcessing(response);
}
catch (Exception ex)
{
TerminatingErrorDuringExecution(ex);
}
}

protected override void StopProcessing()
{
base.StopProcessing();
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted"));
}

private void HandleOutput(GetWorkRequestRequest request)
{
var waiterConfig = new WaiterConfiguration
{
MaxAttempts = MaxWaitAttempts,
GetNextDelayInSeconds = (_) => WaitIntervalSeconds
};

switch (ParameterSetName)
{
case StatusParamSet:
response = client.Waiters.ForWorkRequest(request, waiterConfig, WaitForStatus).Execute();
break;

case Default:
response = client.GetWorkRequest(request).GetAwaiter().GetResult();
break;
}
WriteOutput(response, response.WorkRequest);
}

private GetWorkRequestResponse response;
private const string StatusParamSet = "StatusParamSet";
private const string Default = "Default";
}
}
89 changes: 89 additions & 0 deletions Analytics/Cmdlets/Get-OCIAnalyticsWorkRequestErrorsList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
* NOTE: Generated using OracleSDKGenerator, API Version: 20190331
* DO NOT EDIT this file manually.
*
* Copyright (c) 2020, Oracle and/or its affiliates.
* 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.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using Oci.AnalyticsService.Requests;
using Oci.AnalyticsService.Responses;
using Oci.AnalyticsService.Models;

namespace Oci.AnalyticsService.Cmdlets
{
[Cmdlet("Get", "OCIAnalyticsWorkRequestErrorsList")]
[OutputType(new System.Type[] { typeof(Oci.AnalyticsService.Models.WorkRequestError), typeof(Oci.AnalyticsService.Responses.ListWorkRequestErrorsResponse) })]
public class GetOCIAnalyticsWorkRequestErrorsList : OCIAnalyticsCmdlet
{
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the work request.")]
public string WorkRequestId { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.")]
public string OpcRequestId { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"For list pagination. The maximum number of results per page, or items to return in a paginated ""List"" call. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
Example: `50`", ParameterSetName = LimitSet)]
public System.Nullable<int> Limit { get; set; }

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"For list pagination. The value of the `opc-next-page` response header from the previous ""List"" call. For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).")]
public string Page { get; set; }

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"Fetches all pages of results.", ParameterSetName = AllPageSet)]
public SwitchParameter All { get; set; }

protected override void ProcessRecord()
{
base.ProcessRecord();
ListWorkRequestErrorsRequest request;

try
{
request = new ListWorkRequestErrorsRequest
{
WorkRequestId = WorkRequestId,
OpcRequestId = OpcRequestId,
Limit = Limit,
Page = Page
};
IEnumerable<ListWorkRequestErrorsResponse> responses = GetRequestDelegate().Invoke(request);
foreach (var item in responses)
{
response = item;
WriteOutput(response, response.Items, true);
}
FinishProcessing(response);
}
catch (Exception ex)
{
TerminatingErrorDuringExecution(ex);
}
}

protected override void StopProcessing()
{
base.StopProcessing();
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted"));
}

private RequestDelegate GetRequestDelegate()
{
IEnumerable<ListWorkRequestErrorsResponse> DefaultRequest(ListWorkRequestErrorsRequest request) => Enumerable.Repeat(client.ListWorkRequestErrors(request).GetAwaiter().GetResult(), 1);
if (ParameterSetName.Equals(AllPageSet))
{
return req => client.Paginators.ListWorkRequestErrorsResponseEnumerator(req);
}
return DefaultRequest;
}

private ListWorkRequestErrorsResponse response;
private delegate IEnumerable<ListWorkRequestErrorsResponse> RequestDelegate(ListWorkRequestErrorsRequest request);
private const string AllPageSet = "AllPages";
private const string LimitSet = "Limit";
}
}
Loading

0 comments on commit 5dc32ec

Please sign in to comment.