-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing version 78.1.0
- Loading branch information
Showing
152 changed files
with
10,937 additions
and
5 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.
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,141 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, 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.GenerativeaiService.Models; | ||
using Oci.GenerativeaiService.Requests; | ||
using Oci.GenerativeaiService.Responses; | ||
|
||
namespace Oci.GenerativeaiService | ||
{ | ||
/// <summary> | ||
/// Contains collection of helper methods to produce Oci.Common.Waiters for different resources of GenerativeAi. | ||
/// </summary> | ||
public class GenerativeAiWaiters | ||
{ | ||
private readonly GenerativeAiClient client; | ||
|
||
public GenerativeAiWaiters(GenerativeAiClient 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<GetDedicatedAiClusterRequest, GetDedicatedAiClusterResponse> ForDedicatedAiCluster(GetDedicatedAiClusterRequest request, params DedicatedAiCluster.LifecycleStateEnum[] targetStates) | ||
{ | ||
return this.ForDedicatedAiCluster(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<GetDedicatedAiClusterRequest, GetDedicatedAiClusterResponse> ForDedicatedAiCluster(GetDedicatedAiClusterRequest request, WaiterConfiguration config, params DedicatedAiCluster.LifecycleStateEnum[] targetStates) | ||
{ | ||
var agent = new WaiterAgent<GetDedicatedAiClusterRequest, GetDedicatedAiClusterResponse>( | ||
request, | ||
request => client.GetDedicatedAiCluster(request), | ||
response => targetStates.Contains(response.DedicatedAiCluster.LifecycleState.Value), | ||
targetStates.Contains(DedicatedAiCluster.LifecycleStateEnum.Deleted) | ||
); | ||
return new Waiter<GetDedicatedAiClusterRequest, GetDedicatedAiClusterResponse>(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<GetEndpointRequest, GetEndpointResponse> ForEndpoint(GetEndpointRequest request, params Endpoint.LifecycleStateEnum[] targetStates) | ||
{ | ||
return this.ForEndpoint(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<GetEndpointRequest, GetEndpointResponse> ForEndpoint(GetEndpointRequest request, WaiterConfiguration config, params Endpoint.LifecycleStateEnum[] targetStates) | ||
{ | ||
var agent = new WaiterAgent<GetEndpointRequest, GetEndpointResponse>( | ||
request, | ||
request => client.GetEndpoint(request), | ||
response => targetStates.Contains(response.Endpoint.LifecycleState.Value), | ||
targetStates.Contains(Endpoint.LifecycleStateEnum.Deleted) | ||
); | ||
return new Waiter<GetEndpointRequest, GetEndpointResponse>(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<GetModelRequest, GetModelResponse> ForModel(GetModelRequest request, params Model.LifecycleStateEnum[] targetStates) | ||
{ | ||
return this.ForModel(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<GetModelRequest, GetModelResponse> ForModel(GetModelRequest request, WaiterConfiguration config, params Model.LifecycleStateEnum[] targetStates) | ||
{ | ||
var agent = new WaiterAgent<GetModelRequest, GetModelResponse>( | ||
request, | ||
request => client.GetModel(request), | ||
response => targetStates.Contains(response.Model.LifecycleState.Value), | ||
targetStates.Contains(Model.LifecycleStateEnum.Deleted) | ||
); | ||
return new Waiter<GetModelRequest, GetModelResponse>(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<GetWorkRequestRequest, GetWorkRequestResponse> ForWorkRequest(GetWorkRequestRequest request, params OperationStatus[] targetStates) | ||
{ | ||
return this.ForWorkRequest(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<GetWorkRequestRequest, GetWorkRequestResponse> ForWorkRequest(GetWorkRequestRequest request, WaiterConfiguration config, params OperationStatus[] targetStates) | ||
{ | ||
var agent = new WaiterAgent<GetWorkRequestRequest, GetWorkRequestResponse>( | ||
request, | ||
request => client.GetWorkRequest(request), | ||
response => targetStates.Contains(response.WorkRequest.Status.Value) | ||
); | ||
return new Waiter<GetWorkRequestRequest, GetWorkRequestResponse>(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
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>{F30C9C22-E809-482B-9BAC-624F9102BF8E}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<LangVersion>8.0</LangVersion> | ||
<PackageId>OCI.DotNetSDK.Generativeai</PackageId> | ||
<RootNamespace>Oci.GenerativeaiService</RootNamespace> | ||
<Authors>Oracle Cloud Infrastructure</Authors> | ||
<Company>Oracle</Company> | ||
<PackageTags>Oracle;OCI;Oracle Cloud;OracleCloud;oci-sdk;OracleCloudInfrastructure;Generativeai</PackageTags> | ||
<Description>Oracle Cloud Infrastructure Cloud Generative Ai 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 Generative Ai Service | ||
|
||
This module enables you to write code to manage resources for Generative Ai 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.Generativeai | ||
``` |
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,35 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, 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.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Oci.GenerativeaiService.Models | ||
{ | ||
/// <summary> | ||
/// Possible types of actions. | ||
/// </summary> | ||
public enum ActionType { | ||
/// This value is used if a service returns a value for this enum that is not recognized by this version of the SDK. | ||
[EnumMember(Value = null)] | ||
UnknownEnumValue, | ||
[EnumMember(Value = "CREATED")] | ||
Created, | ||
[EnumMember(Value = "UPDATED")] | ||
Updated, | ||
[EnumMember(Value = "DELETED")] | ||
Deleted, | ||
[EnumMember(Value = "IN_PROGRESS")] | ||
InProgress, | ||
[EnumMember(Value = "RELATED")] | ||
Related, | ||
[EnumMember(Value = "FAILED")] | ||
Failed | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
Generativeai/models/ChangeDedicatedAiClusterCompartmentDetails.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,35 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, 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.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
|
||
namespace Oci.GenerativeaiService.Models | ||
{ | ||
/// <summary> | ||
/// The details to move a dedicated AI cluster to another compartment. | ||
/// </summary> | ||
public class ChangeDedicatedAiClusterCompartmentDetails | ||
{ | ||
|
||
/// <value> | ||
/// The OCID of the compartment to move the dedicated AI cluster to. | ||
/// </value> | ||
/// <remarks> | ||
/// Required | ||
/// </remarks> | ||
[Required(ErrorMessage = "CompartmentId is required.")] | ||
[JsonProperty(PropertyName = "compartmentId")] | ||
public string CompartmentId { get; set; } | ||
|
||
} | ||
} |
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,35 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, 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.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
|
||
namespace Oci.GenerativeaiService.Models | ||
{ | ||
/// <summary> | ||
/// The details to move an endpoint to another compartment. | ||
/// </summary> | ||
public class ChangeEndpointCompartmentDetails | ||
{ | ||
|
||
/// <value> | ||
/// The OCID of the compartment to move the endpoint to. | ||
/// </value> | ||
/// <remarks> | ||
/// Required | ||
/// </remarks> | ||
[Required(ErrorMessage = "CompartmentId is required.")] | ||
[JsonProperty(PropertyName = "compartmentId")] | ||
public string CompartmentId { get; set; } | ||
|
||
} | ||
} |
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,36 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, 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.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
|
||
namespace Oci.GenerativeaiService.Models | ||
{ | ||
/// <summary> | ||
/// The details to move a custom model to another compartment. | ||
/// | ||
/// </summary> | ||
public class ChangeModelCompartmentDetails | ||
{ | ||
|
||
/// <value> | ||
/// The compartment OCID to create the model in. | ||
/// </value> | ||
/// <remarks> | ||
/// Required | ||
/// </remarks> | ||
[Required(ErrorMessage = "CompartmentId is required.")] | ||
[JsonProperty(PropertyName = "compartmentId")] | ||
public string CompartmentId { get; set; } | ||
|
||
} | ||
} |
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,35 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, 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.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
|
||
namespace Oci.GenerativeaiService.Models | ||
{ | ||
/// <summary> | ||
/// The configuration details, whether to add the content moderation feature to the model. Content moderation removes toxic and biased content from responses. It's recommended to use content moderation. | ||
/// </summary> | ||
public class ContentModerationConfig | ||
{ | ||
|
||
/// <value> | ||
/// Whether to enable the content moderation feature. | ||
/// </value> | ||
/// <remarks> | ||
/// Required | ||
/// </remarks> | ||
[Required(ErrorMessage = "IsEnabled is required.")] | ||
[JsonProperty(PropertyName = "isEnabled")] | ||
public System.Nullable<bool> IsEnabled { get; set; } | ||
|
||
} | ||
} |
Oops, something went wrong.