Skip to content

Commit 5dc32ec

Browse files
Merge pull request #2 from oracle/release_2020-08-18
Releasing version v1.0.0
2 parents 771e9be + 55718fb commit 5dc32ec

File tree

1,744 files changed

+143433
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,744 files changed

+143433
-1
lines changed

Diff for: Analytics/Cmdlets/Get-OCIAnalyticsInstance.cs

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* NOTE: Generated using OracleSDKGenerator, API Version: 20190331
3+
* DO NOT EDIT this file manually.
4+
*
5+
* Copyright (c) 2020, Oracle and/or its affiliates.
6+
* 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.
7+
*/
8+
9+
using System;
10+
using System.Management.Automation;
11+
using Oci.AnalyticsService.Requests;
12+
using Oci.AnalyticsService.Responses;
13+
using Oci.AnalyticsService.Models;
14+
using Oci.Common.Waiters;
15+
16+
namespace Oci.AnalyticsService.Cmdlets
17+
{
18+
[Cmdlet("Get", "OCIAnalyticsInstance", DefaultParameterSetName = Default)]
19+
[OutputType(new System.Type[] { typeof(Oci.AnalyticsService.Models.AnalyticsInstance), typeof(Oci.AnalyticsService.Responses.GetAnalyticsInstanceResponse) })]
20+
public class GetOCIAnalyticsInstance : OCIAnalyticsCmdlet
21+
{
22+
23+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the AnalyticsInstance.", ParameterSetName = LifecycleStateParamSet)]
24+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the AnalyticsInstance.", ParameterSetName = Default)]
25+
public string AnalyticsInstanceId { get; set; }
26+
27+
28+
[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)]
29+
[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)]
30+
public string OpcRequestId { get; set; }
31+
32+
[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)]
33+
public Oci.AnalyticsService.Models.AnalyticsInstanceLifecycleState[] WaitForLifecycleState { get; set; }
34+
35+
[Parameter(Mandatory = false, HelpMessage = @"Check every WaitIntervalSeconds to see whether the resource has reached a desired state.", ParameterSetName = LifecycleStateParamSet)]
36+
public int WaitIntervalSeconds { get; set; } = WAIT_INTERVAL_SECONDS;
37+
38+
[Parameter(Mandatory = false, HelpMessage = @"Maximum number of attempts to be made until the resource reaches a desired state.", ParameterSetName = LifecycleStateParamSet)]
39+
public int MaxWaitAttempts { get; set; } = MAX_WAITER_ATTEMPTS;
40+
41+
protected override void ProcessRecord()
42+
{
43+
base.ProcessRecord();
44+
GetAnalyticsInstanceRequest request;
45+
46+
try
47+
{
48+
request = new GetAnalyticsInstanceRequest
49+
{
50+
AnalyticsInstanceId = AnalyticsInstanceId,
51+
OpcRequestId = OpcRequestId
52+
};
53+
54+
HandleOutput(request);
55+
FinishProcessing(response);
56+
}
57+
catch (Exception ex)
58+
{
59+
TerminatingErrorDuringExecution(ex);
60+
}
61+
}
62+
63+
protected override void StopProcessing()
64+
{
65+
base.StopProcessing();
66+
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted"));
67+
}
68+
69+
private void HandleOutput(GetAnalyticsInstanceRequest request)
70+
{
71+
var waiterConfig = new WaiterConfiguration
72+
{
73+
MaxAttempts = MaxWaitAttempts,
74+
GetNextDelayInSeconds = (_) => WaitIntervalSeconds
75+
};
76+
77+
switch (ParameterSetName)
78+
{
79+
case LifecycleStateParamSet:
80+
response = client.Waiters.ForAnalyticsInstance(request, waiterConfig, WaitForLifecycleState).Execute();
81+
break;
82+
83+
case Default:
84+
response = client.GetAnalyticsInstance(request).GetAwaiter().GetResult();
85+
break;
86+
}
87+
WriteOutput(response, response.AnalyticsInstance);
88+
}
89+
90+
private GetAnalyticsInstanceResponse response;
91+
private const string LifecycleStateParamSet = "LifecycleStateParamSet";
92+
private const string Default = "Default";
93+
}
94+
}

Diff for: Analytics/Cmdlets/Get-OCIAnalyticsInstancesList.cs

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
* NOTE: Generated using OracleSDKGenerator, API Version: 20190331
3+
* DO NOT EDIT this file manually.
4+
*
5+
* Copyright (c) 2020, Oracle and/or its affiliates.
6+
* 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.
7+
*/
8+
9+
using System;
10+
using System.Collections.Generic;
11+
using System.Linq;
12+
using System.Management.Automation;
13+
using Oci.AnalyticsService.Requests;
14+
using Oci.AnalyticsService.Responses;
15+
using Oci.AnalyticsService.Models;
16+
17+
namespace Oci.AnalyticsService.Cmdlets
18+
{
19+
[Cmdlet("Get", "OCIAnalyticsInstancesList")]
20+
[OutputType(new System.Type[] { typeof(Oci.AnalyticsService.Models.AnalyticsInstanceSummary), typeof(Oci.AnalyticsService.Responses.ListAnalyticsInstancesResponse) })]
21+
public class GetOCIAnalyticsInstancesList : OCIAnalyticsCmdlet
22+
{
23+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the compartment.")]
24+
public string CompartmentId { get; set; }
25+
26+
[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.")]
27+
public string OpcRequestId { get; set; }
28+
29+
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to return only resources that match the given name exactly.")]
30+
public string Name { get; set; }
31+
32+
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to only return resources matching the capacity type enum. Values are case-insensitive.")]
33+
public System.Nullable<Oci.AnalyticsService.Models.CapacityType> CapacityType { get; set; }
34+
35+
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to only return resources matching the feature set. Values are case-insensitive.")]
36+
public System.Nullable<Oci.AnalyticsService.Models.FeatureSet> FeatureSet { get; set; }
37+
38+
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"A filter to only return resources matching the lifecycle state. The state value is case-insensitive.")]
39+
public System.Nullable<Oci.AnalyticsService.Models.AnalyticsInstanceLifecycleState> LifecycleState { get; set; }
40+
41+
[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).
42+
43+
Example: `50`", ParameterSetName = LimitSet)]
44+
public System.Nullable<int> Limit { get; set; }
45+
46+
[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).")]
47+
public string Page { get; set; }
48+
49+
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The field to sort by (one column only). Default sort order is ascending exception of `timeCreated` column (descending).")]
50+
public System.Nullable<Oci.AnalyticsService.Models.SortBy> SortBy { get; set; }
51+
52+
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = @"The sort order to use, either ascending (`ASC`) or descending (`DESC`).")]
53+
public System.Nullable<Oci.AnalyticsService.Models.SortOrder> SortOrder { get; set; }
54+
55+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"Fetches all pages of results.", ParameterSetName = AllPageSet)]
56+
public SwitchParameter All { get; set; }
57+
58+
protected override void ProcessRecord()
59+
{
60+
base.ProcessRecord();
61+
ListAnalyticsInstancesRequest request;
62+
63+
try
64+
{
65+
request = new ListAnalyticsInstancesRequest
66+
{
67+
CompartmentId = CompartmentId,
68+
OpcRequestId = OpcRequestId,
69+
Name = Name,
70+
CapacityType = CapacityType,
71+
FeatureSet = FeatureSet,
72+
LifecycleState = LifecycleState,
73+
Limit = Limit,
74+
Page = Page,
75+
SortBy = SortBy,
76+
SortOrder = SortOrder
77+
};
78+
IEnumerable<ListAnalyticsInstancesResponse> responses = GetRequestDelegate().Invoke(request);
79+
foreach (var item in responses)
80+
{
81+
response = item;
82+
WriteOutput(response, response.Items, true);
83+
}
84+
FinishProcessing(response);
85+
}
86+
catch (Exception ex)
87+
{
88+
TerminatingErrorDuringExecution(ex);
89+
}
90+
}
91+
92+
protected override void StopProcessing()
93+
{
94+
base.StopProcessing();
95+
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted"));
96+
}
97+
98+
private RequestDelegate GetRequestDelegate()
99+
{
100+
IEnumerable<ListAnalyticsInstancesResponse> DefaultRequest(ListAnalyticsInstancesRequest request) => Enumerable.Repeat(client.ListAnalyticsInstances(request).GetAwaiter().GetResult(), 1);
101+
if (ParameterSetName.Equals(AllPageSet))
102+
{
103+
return req => client.Paginators.ListAnalyticsInstancesResponseEnumerator(req);
104+
}
105+
return DefaultRequest;
106+
}
107+
108+
private ListAnalyticsInstancesResponse response;
109+
private delegate IEnumerable<ListAnalyticsInstancesResponse> RequestDelegate(ListAnalyticsInstancesRequest request);
110+
private const string AllPageSet = "AllPages";
111+
private const string LimitSet = "Limit";
112+
}
113+
}

Diff for: Analytics/Cmdlets/Get-OCIAnalyticsWorkRequest.cs

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* NOTE: Generated using OracleSDKGenerator, API Version: 20190331
3+
* DO NOT EDIT this file manually.
4+
*
5+
* Copyright (c) 2020, Oracle and/or its affiliates.
6+
* 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.
7+
*/
8+
9+
using System;
10+
using System.Management.Automation;
11+
using Oci.AnalyticsService.Requests;
12+
using Oci.AnalyticsService.Responses;
13+
using Oci.AnalyticsService.Models;
14+
using Oci.Common.Waiters;
15+
16+
namespace Oci.AnalyticsService.Cmdlets
17+
{
18+
[Cmdlet("Get", "OCIAnalyticsWorkRequest", DefaultParameterSetName = Default)]
19+
[OutputType(new System.Type[] { typeof(Oci.AnalyticsService.Models.WorkRequest), typeof(Oci.AnalyticsService.Responses.GetWorkRequestResponse) })]
20+
public class GetOCIAnalyticsWorkRequest : OCIAnalyticsCmdlet
21+
{
22+
23+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the work request.", ParameterSetName = StatusParamSet)]
24+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the work request.", ParameterSetName = Default)]
25+
public string WorkRequestId { get; set; }
26+
27+
28+
[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)]
29+
[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)]
30+
public string OpcRequestId { get; set; }
31+
32+
[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)]
33+
public Oci.AnalyticsService.Models.WorkRequestStatus[] WaitForStatus { get; set; }
34+
35+
[Parameter(Mandatory = false, HelpMessage = @"Check every WaitIntervalSeconds to see whether the resource has reached a desired state.", ParameterSetName = StatusParamSet)]
36+
public int WaitIntervalSeconds { get; set; } = WAIT_INTERVAL_SECONDS;
37+
38+
[Parameter(Mandatory = false, HelpMessage = @"Maximum number of attempts to be made until the resource reaches a desired state.", ParameterSetName = StatusParamSet)]
39+
public int MaxWaitAttempts { get; set; } = MAX_WAITER_ATTEMPTS;
40+
41+
protected override void ProcessRecord()
42+
{
43+
base.ProcessRecord();
44+
GetWorkRequestRequest request;
45+
46+
try
47+
{
48+
request = new GetWorkRequestRequest
49+
{
50+
WorkRequestId = WorkRequestId,
51+
OpcRequestId = OpcRequestId
52+
};
53+
54+
HandleOutput(request);
55+
FinishProcessing(response);
56+
}
57+
catch (Exception ex)
58+
{
59+
TerminatingErrorDuringExecution(ex);
60+
}
61+
}
62+
63+
protected override void StopProcessing()
64+
{
65+
base.StopProcessing();
66+
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted"));
67+
}
68+
69+
private void HandleOutput(GetWorkRequestRequest request)
70+
{
71+
var waiterConfig = new WaiterConfiguration
72+
{
73+
MaxAttempts = MaxWaitAttempts,
74+
GetNextDelayInSeconds = (_) => WaitIntervalSeconds
75+
};
76+
77+
switch (ParameterSetName)
78+
{
79+
case StatusParamSet:
80+
response = client.Waiters.ForWorkRequest(request, waiterConfig, WaitForStatus).Execute();
81+
break;
82+
83+
case Default:
84+
response = client.GetWorkRequest(request).GetAwaiter().GetResult();
85+
break;
86+
}
87+
WriteOutput(response, response.WorkRequest);
88+
}
89+
90+
private GetWorkRequestResponse response;
91+
private const string StatusParamSet = "StatusParamSet";
92+
private const string Default = "Default";
93+
}
94+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/*
2+
* NOTE: Generated using OracleSDKGenerator, API Version: 20190331
3+
* DO NOT EDIT this file manually.
4+
*
5+
* Copyright (c) 2020, Oracle and/or its affiliates.
6+
* 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.
7+
*/
8+
9+
using System;
10+
using System.Collections.Generic;
11+
using System.Linq;
12+
using System.Management.Automation;
13+
using Oci.AnalyticsService.Requests;
14+
using Oci.AnalyticsService.Responses;
15+
using Oci.AnalyticsService.Models;
16+
17+
namespace Oci.AnalyticsService.Cmdlets
18+
{
19+
[Cmdlet("Get", "OCIAnalyticsWorkRequestErrorsList")]
20+
[OutputType(new System.Type[] { typeof(Oci.AnalyticsService.Models.WorkRequestError), typeof(Oci.AnalyticsService.Responses.ListWorkRequestErrorsResponse) })]
21+
public class GetOCIAnalyticsWorkRequestErrorsList : OCIAnalyticsCmdlet
22+
{
23+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"The OCID of the work request.")]
24+
public string WorkRequestId { get; set; }
25+
26+
[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.")]
27+
public string OpcRequestId { get; set; }
28+
29+
[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).
30+
31+
Example: `50`", ParameterSetName = LimitSet)]
32+
public System.Nullable<int> Limit { get; set; }
33+
34+
[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).")]
35+
public string Page { get; set; }
36+
37+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = @"Fetches all pages of results.", ParameterSetName = AllPageSet)]
38+
public SwitchParameter All { get; set; }
39+
40+
protected override void ProcessRecord()
41+
{
42+
base.ProcessRecord();
43+
ListWorkRequestErrorsRequest request;
44+
45+
try
46+
{
47+
request = new ListWorkRequestErrorsRequest
48+
{
49+
WorkRequestId = WorkRequestId,
50+
OpcRequestId = OpcRequestId,
51+
Limit = Limit,
52+
Page = Page
53+
};
54+
IEnumerable<ListWorkRequestErrorsResponse> responses = GetRequestDelegate().Invoke(request);
55+
foreach (var item in responses)
56+
{
57+
response = item;
58+
WriteOutput(response, response.Items, true);
59+
}
60+
FinishProcessing(response);
61+
}
62+
catch (Exception ex)
63+
{
64+
TerminatingErrorDuringExecution(ex);
65+
}
66+
}
67+
68+
protected override void StopProcessing()
69+
{
70+
base.StopProcessing();
71+
TerminatingErrorDuringExecution(new OperationCanceledException("Cmdlet execution interrupted"));
72+
}
73+
74+
private RequestDelegate GetRequestDelegate()
75+
{
76+
IEnumerable<ListWorkRequestErrorsResponse> DefaultRequest(ListWorkRequestErrorsRequest request) => Enumerable.Repeat(client.ListWorkRequestErrors(request).GetAwaiter().GetResult(), 1);
77+
if (ParameterSetName.Equals(AllPageSet))
78+
{
79+
return req => client.Paginators.ListWorkRequestErrorsResponseEnumerator(req);
80+
}
81+
return DefaultRequest;
82+
}
83+
84+
private ListWorkRequestErrorsResponse response;
85+
private delegate IEnumerable<ListWorkRequestErrorsResponse> RequestDelegate(ListWorkRequestErrorsRequest request);
86+
private const string AllPageSet = "AllPages";
87+
private const string LimitSet = "Limit";
88+
}
89+
}

0 commit comments

Comments
 (0)