From 05436517f3758d62feb27dec877123a8aa81ebac Mon Sep 17 00:00:00 2001 From: oci-dex-release-bot Date: Mon, 22 Jan 2024 19:01:08 +0000 Subject: [PATCH] Releasing version 78.1.0 --- CHANGELOG.md | 6 + Common/Src/Version.cs | 2 +- Generativeai/GenerativeAiClient.cs | 1317 +++++++++++++++++ Generativeai/GenerativeAiPaginators.cs | 347 +++++ Generativeai/GenerativeAiWaiters.cs | 141 ++ .../OCI.DotNetSDK.Generativeai.csproj | 19 + Generativeai/README.md | 20 + Generativeai/models/ActionType.cs | 35 + ...ngeDedicatedAiClusterCompartmentDetails.cs | 35 + .../ChangeEndpointCompartmentDetails.cs | 35 + .../models/ChangeModelCompartmentDetails.cs | 36 + .../models/ContentModerationConfig.cs | 35 + .../models/CreateDedicatedAiClusterDetails.cs | 109 ++ Generativeai/models/CreateEndpointDetails.cs | 88 ++ Generativeai/models/CreateModelDetails.cs | 94 ++ Generativeai/models/Dataset.cs | 78 + Generativeai/models/DedicatedAiCluster.cs | 211 +++ .../models/DedicatedAiClusterCapacity.cs | 73 + .../models/DedicatedAiClusterCollection.cs | 35 + .../DedicatedAiClusterHostingCapacity.cs | 39 + .../models/DedicatedAiClusterSummary.cs | 166 +++ Generativeai/models/Endpoint.cs | 165 +++ Generativeai/models/EndpointCollection.cs | 35 + Generativeai/models/EndpointSummary.cs | 148 ++ Generativeai/models/FineTuneDetails.cs | 46 + Generativeai/models/Model.cs | 211 +++ Generativeai/models/ModelCapability.cs | 31 + Generativeai/models/ModelCollection.cs | 36 + Generativeai/models/ModelMetrics.cs | 73 + Generativeai/models/ModelSummary.cs | 175 +++ Generativeai/models/ObjectStorageDataset.cs | 57 + Generativeai/models/OperationStatus.cs | 37 + Generativeai/models/OperationType.cs | 45 + Generativeai/models/SortOrder.cs | 26 + Generativeai/models/TFewTrainingConfig.cs | 27 + .../models/TextGenerationModelMetrics.cs | 40 + Generativeai/models/TrainingConfig.cs | 118 ++ .../models/UpdateDedicatedAiClusterDetails.cs | 61 + Generativeai/models/UpdateEndpointDetails.cs | 58 + Generativeai/models/UpdateModelDetails.cs | 68 + Generativeai/models/VanillaTrainingConfig.cs | 34 + Generativeai/models/WorkRequest.cs | 121 ++ Generativeai/models/WorkRequestError.cs | 59 + .../models/WorkRequestErrorCollection.cs | 35 + Generativeai/models/WorkRequestLogEntry.cs | 47 + .../models/WorkRequestLogEntryCollection.cs | 35 + Generativeai/models/WorkRequestResource.cs | 73 + .../models/WorkRequestResourceMetadataKey.cs | 25 + Generativeai/models/WorkRequestSummary.cs | 118 ++ .../models/WorkRequestSummaryCollection.cs | 35 + ...ngeDedicatedAiClusterCompartmentRequest.cs | 73 + .../ChangeEndpointCompartmentRequest.cs | 73 + .../requests/ChangeModelCompartmentRequest.cs | 73 + .../CreateDedicatedAiClusterRequest.cs | 53 + .../requests/CreateEndpointRequest.cs | 53 + Generativeai/requests/CreateModelRequest.cs | 53 + .../DeleteDedicatedAiClusterRequest.cs | 52 + .../requests/DeleteEndpointRequest.cs | 52 + Generativeai/requests/DeleteModelRequest.cs | 52 + .../requests/GetDedicatedAiClusterRequest.cs | 42 + Generativeai/requests/GetEndpointRequest.cs | 42 + Generativeai/requests/GetModelRequest.cs | 42 + .../requests/GetWorkRequestRequest.cs | 42 + .../ListDedicatedAiClustersRequest.cs | 108 ++ Generativeai/requests/ListEndpointsRequest.cs | 106 ++ Generativeai/requests/ListModelsRequest.cs | 118 ++ .../requests/ListWorkRequestErrorsRequest.cs | 84 ++ .../requests/ListWorkRequestLogsRequest.cs | 84 ++ .../requests/ListWorkRequestsRequest.cs | 102 ++ .../UpdateDedicatedAiClusterRequest.cs | 62 + .../requests/UpdateEndpointRequest.cs | 62 + Generativeai/requests/UpdateModelRequest.cs | 62 + ...geDedicatedAiClusterCompartmentResponse.cs | 29 + .../ChangeEndpointCompartmentResponse.cs | 29 + .../ChangeModelCompartmentResponse.cs | 29 + .../CreateDedicatedAiClusterResponse.cs | 50 + .../responses/CreateEndpointResponse.cs | 50 + Generativeai/responses/CreateModelResponse.cs | 50 + .../DeleteDedicatedAiClusterResponse.cs | 38 + .../responses/DeleteEndpointResponse.cs | 38 + Generativeai/responses/DeleteModelResponse.cs | 38 + .../GetDedicatedAiClusterResponse.cs | 41 + Generativeai/responses/GetEndpointResponse.cs | 41 + Generativeai/responses/GetModelResponse.cs | 41 + .../responses/GetWorkRequestResponse.cs | 48 + .../ListDedicatedAiClustersResponse.cs | 42 + .../responses/ListEndpointsResponse.cs | 42 + Generativeai/responses/ListModelsResponse.cs | 42 + .../ListWorkRequestErrorsResponse.cs | 42 + .../responses/ListWorkRequestLogsResponse.cs | 42 + .../responses/ListWorkRequestsResponse.cs | 42 + .../UpdateDedicatedAiClusterResponse.cs | 50 + .../responses/UpdateEndpointResponse.cs | 50 + Generativeai/responses/UpdateModelResponse.cs | 41 + .../GenerativeAiInferenceClient.cs | 243 +++ ...OCI.DotNetSDK.Generativeaiinference.csproj | 19 + Generativeaiinference/README.md | 20 + Generativeaiinference/models/Choice.cs | 61 + .../models/CohereLlmInferenceRequest.cs | 150 ++ .../models/CohereLlmInferenceResponse.cs | 53 + .../models/DedicatedServingMode.cs | 37 + .../models/EmbedTextDetails.cs | 100 ++ .../models/EmbedTextResult.cs | 63 + .../models/GenerateTextDetails.cs | 49 + .../models/GenerateTextResult.cs | 52 + Generativeaiinference/models/GeneratedText.cs | 73 + .../models/LlamaLlmInferenceRequest.cs | 114 ++ .../models/LlamaLlmInferenceResponse.cs | 47 + .../models/LlmInferenceRequest.cs | 70 + .../models/LlmInferenceResponse.cs | 78 + Generativeaiinference/models/Logprobs.cs | 49 + .../models/OnDemandServingMode.cs | 37 + Generativeaiinference/models/ServingMode.cs | 70 + .../models/SummarizeTextDetails.cs | 137 ++ .../models/SummarizeTextResult.cs | 63 + .../models/TokenLikelihood.cs | 40 + .../requests/EmbedTextRequest.cs | 49 + .../requests/GenerateTextRequest.cs | 49 + .../requests/SummarizeTextRequest.cs | 49 + .../responses/EmbedTextResponse.cs | 41 + .../responses/GenerateTextResponse.cs | 41 + .../responses/SummarizeTextResponse.cs | 41 + Marketplace/models/PricingCurrencyEnum.cs | 92 +- Marketplace/models/Publication.cs | 8 + Marketplace/models/PublicationSummary.cs | 24 + Stackmonitoring/StackMonitoringClient.cs | 337 +++++ Stackmonitoring/StackMonitoringPaginators.cs | 49 + Stackmonitoring/StackMonitoringWaiters.cs | 28 + .../ChangeProcessSetCompartmentDetails.cs | 37 + .../models/CreateProcessSetDetails.cs | 67 + Stackmonitoring/models/DiscoveryDetails.cs | 4 +- Stackmonitoring/models/DiscoveryJobSummary.cs | 4 +- Stackmonitoring/models/ProcessSet.cs | 122 ++ .../models/ProcessSetCollection.cs | 35 + .../models/ProcessSetSpecification.cs | 35 + .../models/ProcessSetSpecificationDetails.cs | 49 + Stackmonitoring/models/ProcessSetSummary.cs | 122 ++ .../models/UpdateProcessSetDetails.cs | 48 + .../ChangeProcessSetCompartmentRequest.cs | 72 + .../requests/CreateProcessSetRequest.cs | 51 + .../requests/DeleteProcessSetRequest.cs | 51 + .../requests/GetProcessSetRequest.cs | 40 + .../requests/ListProcessSetsRequest.cs | 91 ++ .../requests/UpdateProcessSetRequest.cs | 61 + .../ChangeProcessSetCompartmentResponse.cs | 29 + .../responses/CreateProcessSetResponse.cs | 41 + .../responses/DeleteProcessSetResponse.cs | 29 + .../responses/GetProcessSetResponse.cs | 41 + .../responses/ListProcessSetsResponse.cs | 43 + .../responses/UpdateProcessSetResponse.cs | 41 + Vault/OCI.DotNetSDK.Vault.csproj | 3 +- oci-dotnet-sdk.sln | 28 + 152 files changed, 10937 insertions(+), 5 deletions(-) create mode 100644 Generativeai/GenerativeAiClient.cs create mode 100644 Generativeai/GenerativeAiPaginators.cs create mode 100644 Generativeai/GenerativeAiWaiters.cs create mode 100644 Generativeai/OCI.DotNetSDK.Generativeai.csproj create mode 100644 Generativeai/README.md create mode 100644 Generativeai/models/ActionType.cs create mode 100644 Generativeai/models/ChangeDedicatedAiClusterCompartmentDetails.cs create mode 100644 Generativeai/models/ChangeEndpointCompartmentDetails.cs create mode 100644 Generativeai/models/ChangeModelCompartmentDetails.cs create mode 100644 Generativeai/models/ContentModerationConfig.cs create mode 100644 Generativeai/models/CreateDedicatedAiClusterDetails.cs create mode 100644 Generativeai/models/CreateEndpointDetails.cs create mode 100644 Generativeai/models/CreateModelDetails.cs create mode 100644 Generativeai/models/Dataset.cs create mode 100644 Generativeai/models/DedicatedAiCluster.cs create mode 100644 Generativeai/models/DedicatedAiClusterCapacity.cs create mode 100644 Generativeai/models/DedicatedAiClusterCollection.cs create mode 100644 Generativeai/models/DedicatedAiClusterHostingCapacity.cs create mode 100644 Generativeai/models/DedicatedAiClusterSummary.cs create mode 100644 Generativeai/models/Endpoint.cs create mode 100644 Generativeai/models/EndpointCollection.cs create mode 100644 Generativeai/models/EndpointSummary.cs create mode 100644 Generativeai/models/FineTuneDetails.cs create mode 100644 Generativeai/models/Model.cs create mode 100644 Generativeai/models/ModelCapability.cs create mode 100644 Generativeai/models/ModelCollection.cs create mode 100644 Generativeai/models/ModelMetrics.cs create mode 100644 Generativeai/models/ModelSummary.cs create mode 100644 Generativeai/models/ObjectStorageDataset.cs create mode 100644 Generativeai/models/OperationStatus.cs create mode 100644 Generativeai/models/OperationType.cs create mode 100644 Generativeai/models/SortOrder.cs create mode 100644 Generativeai/models/TFewTrainingConfig.cs create mode 100644 Generativeai/models/TextGenerationModelMetrics.cs create mode 100644 Generativeai/models/TrainingConfig.cs create mode 100644 Generativeai/models/UpdateDedicatedAiClusterDetails.cs create mode 100644 Generativeai/models/UpdateEndpointDetails.cs create mode 100644 Generativeai/models/UpdateModelDetails.cs create mode 100644 Generativeai/models/VanillaTrainingConfig.cs create mode 100644 Generativeai/models/WorkRequest.cs create mode 100644 Generativeai/models/WorkRequestError.cs create mode 100644 Generativeai/models/WorkRequestErrorCollection.cs create mode 100644 Generativeai/models/WorkRequestLogEntry.cs create mode 100644 Generativeai/models/WorkRequestLogEntryCollection.cs create mode 100644 Generativeai/models/WorkRequestResource.cs create mode 100644 Generativeai/models/WorkRequestResourceMetadataKey.cs create mode 100644 Generativeai/models/WorkRequestSummary.cs create mode 100644 Generativeai/models/WorkRequestSummaryCollection.cs create mode 100644 Generativeai/requests/ChangeDedicatedAiClusterCompartmentRequest.cs create mode 100644 Generativeai/requests/ChangeEndpointCompartmentRequest.cs create mode 100644 Generativeai/requests/ChangeModelCompartmentRequest.cs create mode 100644 Generativeai/requests/CreateDedicatedAiClusterRequest.cs create mode 100644 Generativeai/requests/CreateEndpointRequest.cs create mode 100644 Generativeai/requests/CreateModelRequest.cs create mode 100644 Generativeai/requests/DeleteDedicatedAiClusterRequest.cs create mode 100644 Generativeai/requests/DeleteEndpointRequest.cs create mode 100644 Generativeai/requests/DeleteModelRequest.cs create mode 100644 Generativeai/requests/GetDedicatedAiClusterRequest.cs create mode 100644 Generativeai/requests/GetEndpointRequest.cs create mode 100644 Generativeai/requests/GetModelRequest.cs create mode 100644 Generativeai/requests/GetWorkRequestRequest.cs create mode 100644 Generativeai/requests/ListDedicatedAiClustersRequest.cs create mode 100644 Generativeai/requests/ListEndpointsRequest.cs create mode 100644 Generativeai/requests/ListModelsRequest.cs create mode 100644 Generativeai/requests/ListWorkRequestErrorsRequest.cs create mode 100644 Generativeai/requests/ListWorkRequestLogsRequest.cs create mode 100644 Generativeai/requests/ListWorkRequestsRequest.cs create mode 100644 Generativeai/requests/UpdateDedicatedAiClusterRequest.cs create mode 100644 Generativeai/requests/UpdateEndpointRequest.cs create mode 100644 Generativeai/requests/UpdateModelRequest.cs create mode 100644 Generativeai/responses/ChangeDedicatedAiClusterCompartmentResponse.cs create mode 100644 Generativeai/responses/ChangeEndpointCompartmentResponse.cs create mode 100644 Generativeai/responses/ChangeModelCompartmentResponse.cs create mode 100644 Generativeai/responses/CreateDedicatedAiClusterResponse.cs create mode 100644 Generativeai/responses/CreateEndpointResponse.cs create mode 100644 Generativeai/responses/CreateModelResponse.cs create mode 100644 Generativeai/responses/DeleteDedicatedAiClusterResponse.cs create mode 100644 Generativeai/responses/DeleteEndpointResponse.cs create mode 100644 Generativeai/responses/DeleteModelResponse.cs create mode 100644 Generativeai/responses/GetDedicatedAiClusterResponse.cs create mode 100644 Generativeai/responses/GetEndpointResponse.cs create mode 100644 Generativeai/responses/GetModelResponse.cs create mode 100644 Generativeai/responses/GetWorkRequestResponse.cs create mode 100644 Generativeai/responses/ListDedicatedAiClustersResponse.cs create mode 100644 Generativeai/responses/ListEndpointsResponse.cs create mode 100644 Generativeai/responses/ListModelsResponse.cs create mode 100644 Generativeai/responses/ListWorkRequestErrorsResponse.cs create mode 100644 Generativeai/responses/ListWorkRequestLogsResponse.cs create mode 100644 Generativeai/responses/ListWorkRequestsResponse.cs create mode 100644 Generativeai/responses/UpdateDedicatedAiClusterResponse.cs create mode 100644 Generativeai/responses/UpdateEndpointResponse.cs create mode 100644 Generativeai/responses/UpdateModelResponse.cs create mode 100644 Generativeaiinference/GenerativeAiInferenceClient.cs create mode 100644 Generativeaiinference/OCI.DotNetSDK.Generativeaiinference.csproj create mode 100644 Generativeaiinference/README.md create mode 100644 Generativeaiinference/models/Choice.cs create mode 100644 Generativeaiinference/models/CohereLlmInferenceRequest.cs create mode 100644 Generativeaiinference/models/CohereLlmInferenceResponse.cs create mode 100644 Generativeaiinference/models/DedicatedServingMode.cs create mode 100644 Generativeaiinference/models/EmbedTextDetails.cs create mode 100644 Generativeaiinference/models/EmbedTextResult.cs create mode 100644 Generativeaiinference/models/GenerateTextDetails.cs create mode 100644 Generativeaiinference/models/GenerateTextResult.cs create mode 100644 Generativeaiinference/models/GeneratedText.cs create mode 100644 Generativeaiinference/models/LlamaLlmInferenceRequest.cs create mode 100644 Generativeaiinference/models/LlamaLlmInferenceResponse.cs create mode 100644 Generativeaiinference/models/LlmInferenceRequest.cs create mode 100644 Generativeaiinference/models/LlmInferenceResponse.cs create mode 100644 Generativeaiinference/models/Logprobs.cs create mode 100644 Generativeaiinference/models/OnDemandServingMode.cs create mode 100644 Generativeaiinference/models/ServingMode.cs create mode 100644 Generativeaiinference/models/SummarizeTextDetails.cs create mode 100644 Generativeaiinference/models/SummarizeTextResult.cs create mode 100644 Generativeaiinference/models/TokenLikelihood.cs create mode 100644 Generativeaiinference/requests/EmbedTextRequest.cs create mode 100644 Generativeaiinference/requests/GenerateTextRequest.cs create mode 100644 Generativeaiinference/requests/SummarizeTextRequest.cs create mode 100644 Generativeaiinference/responses/EmbedTextResponse.cs create mode 100644 Generativeaiinference/responses/GenerateTextResponse.cs create mode 100644 Generativeaiinference/responses/SummarizeTextResponse.cs create mode 100644 Stackmonitoring/models/ChangeProcessSetCompartmentDetails.cs create mode 100644 Stackmonitoring/models/CreateProcessSetDetails.cs create mode 100644 Stackmonitoring/models/ProcessSet.cs create mode 100644 Stackmonitoring/models/ProcessSetCollection.cs create mode 100644 Stackmonitoring/models/ProcessSetSpecification.cs create mode 100644 Stackmonitoring/models/ProcessSetSpecificationDetails.cs create mode 100644 Stackmonitoring/models/ProcessSetSummary.cs create mode 100644 Stackmonitoring/models/UpdateProcessSetDetails.cs create mode 100644 Stackmonitoring/requests/ChangeProcessSetCompartmentRequest.cs create mode 100644 Stackmonitoring/requests/CreateProcessSetRequest.cs create mode 100644 Stackmonitoring/requests/DeleteProcessSetRequest.cs create mode 100644 Stackmonitoring/requests/GetProcessSetRequest.cs create mode 100644 Stackmonitoring/requests/ListProcessSetsRequest.cs create mode 100644 Stackmonitoring/requests/UpdateProcessSetRequest.cs create mode 100644 Stackmonitoring/responses/ChangeProcessSetCompartmentResponse.cs create mode 100644 Stackmonitoring/responses/CreateProcessSetResponse.cs create mode 100644 Stackmonitoring/responses/DeleteProcessSetResponse.cs create mode 100644 Stackmonitoring/responses/GetProcessSetResponse.cs create mode 100644 Stackmonitoring/responses/ListProcessSetsResponse.cs create mode 100644 Stackmonitoring/responses/UpdateProcessSetResponse.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index 81c0f766a3..a976434da4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on Keep a [Changelog](http://keepachangelog.com/). +## 78.1.0 - 2024-01-23 +### Added +- Support for the Generative AI service +- Support for additional currencies and countries for paid listings in the Marketplace service +- Support for process sets in the Stack Monitoring service + ## 78.0.0 - 2024-01-16 ### Added - Support for resource id filter on the service work requests in the Container Instances service diff --git a/Common/Src/Version.cs b/Common/Src/Version.cs index d57b80a9d0..298b22e6a3 100644 --- a/Common/Src/Version.cs +++ b/Common/Src/Version.cs @@ -8,7 +8,7 @@ namespace Oci.Common public class Version { public static string MAJOR = "78"; - public static string MINOR = "0"; + public static string MINOR = "1"; public static string PATCH = "0"; public static string TAG = ""; diff --git a/Generativeai/GenerativeAiClient.cs b/Generativeai/GenerativeAiClient.cs new file mode 100644 index 0000000000..000b49a92b --- /dev/null +++ b/Generativeai/GenerativeAiClient.cs @@ -0,0 +1,1317 @@ +/* + * 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; +using System.Diagnostics; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Oci.Common; +using Oci.Common.DeveloperToolConfigurations; +using Oci.Common.Model; +using Oci.Common.Auth; +using Oci.Common.Retry; +using Oci.GenerativeaiService.Requests; +using Oci.GenerativeaiService.Responses; + +namespace Oci.GenerativeaiService +{ + /// Service client instance for GenerativeAi. + public class GenerativeAiClient : RegionalClientBase + { + private readonly RetryConfiguration retryConfiguration; + private const string basePathWithoutHost = "/20231130"; + + public GenerativeAiPaginators Paginators { get; } + + public GenerativeAiWaiters Waiters { get; } + + /// + /// Creates a new service instance using the given authentication provider and/or client configuration and/or endpoint. + /// A client configuration can also be provided optionally to adjust REST client behaviors. + /// + /// The authentication details provider. Required. + /// The client configuration that contains settings to adjust REST client behaviors. Optional. + /// The endpoint of the service. If not provided and the client is a regional client, the endpoint will be constructed based on region information. Optional. + public GenerativeAiClient(IBasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration clientConfiguration = null, string endpoint = null) + : base(authenticationDetailsProvider, clientConfiguration) + { + if (!DeveloperToolConfiguration.IsServiceEnabled("generativeai")) + { + throw new ArgumentException("The DeveloperToolConfiguration disabled this service, this behavior is controlled by DeveloperToolConfiguration.OciEnabledServiceSet variable. Please check if your local DeveloperToolConfiguration file has configured the service you're targeting or contact the cloud provider on the availability of this service"); + } + service = new Service + { + ServiceName = "GENERATIVEAI", + ServiceEndpointPrefix = "", + ServiceEndpointTemplate = "https://generativeai.{region}.oci.{secondLevelDomain}" + }; + + ClientConfiguration clientConfigurationToUse = clientConfiguration ?? new ClientConfiguration(); + + if (authenticationDetailsProvider is IRegionProvider) + { + // Use region from Authentication details provider. + SetRegion(((IRegionProvider)authenticationDetailsProvider).Region); + } + + if (endpoint != null) + { + logger.Info($"Using endpoint specified \"{endpoint}\"."); + SetEndpoint(endpoint); + } + + this.retryConfiguration = clientConfigurationToUse.RetryConfiguration; + Paginators = new GenerativeAiPaginators(this); + Waiters = new GenerativeAiWaiters(this); + } + + /// + /// Moves a dedicated AI cluster into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ChangeDedicatedAiClusterCompartment API. + public async Task ChangeDedicatedAiClusterCompartment(ChangeDedicatedAiClusterCompartmentRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called changeDedicatedAiClusterCompartment"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/dedicatedAiClusters/{dedicatedAiClusterId}/actions/changeCompartment".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "ChangeDedicatedAiClusterCompartment", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ChangeDedicatedAiClusterCompartment failed with error: {e.Message}"); + throw; + } + } + + /// + /// Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ChangeEndpointCompartment API. + public async Task ChangeEndpointCompartment(ChangeEndpointCompartmentRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called changeEndpointCompartment"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/endpoints/{endpointId}/actions/changeCompartment".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "ChangeEndpointCompartment", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ChangeEndpointCompartment failed with error: {e.Message}"); + throw; + } + } + + /// + /// Moves a custom model into a different compartment. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ChangeModelCompartment API. + public async Task ChangeModelCompartment(ChangeModelCompartmentRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called changeModelCompartment"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/models/{modelId}/actions/changeCompartment".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "ChangeModelCompartment", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ChangeModelCompartment failed with error: {e.Message}"); + throw; + } + } + + /// + /// Creates a dedicated AI cluster. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use CreateDedicatedAiCluster API. + public async Task CreateDedicatedAiCluster(CreateDedicatedAiClusterRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called createDedicatedAiCluster"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/dedicatedAiClusters".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "CreateDedicatedAiCluster", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"CreateDedicatedAiCluster failed with error: {e.Message}"); + throw; + } + } + + /// + /// Creates an endpoint. + /// <br/> + /// The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the endpoint creation progress. + /// + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use CreateEndpoint API. + public async Task CreateEndpoint(CreateEndpointRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called createEndpoint"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/endpoints".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "CreateEndpoint", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"CreateEndpoint failed with error: {e.Message}"); + throw; + } + } + + /// + /// Creates a custom model by fine-tuning a base model with your own dataset. You can create a new custom models or create a new version of existing custom model.. + /// <br/> + /// The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the model creation progress. + /// + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use CreateModel API. + public async Task CreateModel(CreateModelRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called createModel"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/models".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "CreateModel", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"CreateModel failed with error: {e.Message}"); + throw; + } + } + + /// + /// Deletes a dedicated AI cluster. + /// <br/> + /// You can only delete clusters without attached resources. Before you delete a hosting dedicated AI cluster, you must delete the endpoints associated to that cluster. Before you delete a fine-tuning dedicated AI cluster, you must delete the custom model on that cluster. The delete action permanently deletes the cluster. This action can't be undone. + /// + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use DeleteDedicatedAiCluster API. + public async Task DeleteDedicatedAiCluster(DeleteDedicatedAiClusterRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called deleteDedicatedAiCluster"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/dedicatedAiClusters/{dedicatedAiClusterId}".Trim('/'))); + HttpMethod method = new HttpMethod("DELETE"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "DeleteDedicatedAiCluster", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"DeleteDedicatedAiCluster failed with error: {e.Message}"); + throw; + } + } + + /// + /// Deletes an endpoint. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use DeleteEndpoint API. + public async Task DeleteEndpoint(DeleteEndpointRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called deleteEndpoint"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/endpoints/{endpointId}".Trim('/'))); + HttpMethod method = new HttpMethod("DELETE"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "DeleteEndpoint", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"DeleteEndpoint failed with error: {e.Message}"); + throw; + } + } + + /// + /// Deletes a custom model. A model shouldn't be deleted if there's one or more active endpoints associated with that model. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use DeleteModel API. + public async Task DeleteModel(DeleteModelRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called deleteModel"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/models/{modelId}".Trim('/'))); + HttpMethod method = new HttpMethod("DELETE"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "DeleteModel", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"DeleteModel failed with error: {e.Message}"); + throw; + } + } + + /// + /// Gets information about a dedicated AI cluster. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use GetDedicatedAiCluster API. + public async Task GetDedicatedAiCluster(GetDedicatedAiClusterRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called getDedicatedAiCluster"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/dedicatedAiClusters/{dedicatedAiClusterId}".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "GetDedicatedAiCluster", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"GetDedicatedAiCluster failed with error: {e.Message}"); + throw; + } + } + + /// + /// Gets information about an endpoint. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use GetEndpoint API. + public async Task GetEndpoint(GetEndpointRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called getEndpoint"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/endpoints/{endpointId}".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "GetEndpoint", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"GetEndpoint failed with error: {e.Message}"); + throw; + } + } + + /// + /// Gets information about a custom model. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use GetModel API. + public async Task GetModel(GetModelRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called getModel"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/models/{modelId}".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "GetModel", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"GetModel failed with error: {e.Message}"); + throw; + } + } + + /// + /// Gets the details of a work request. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use GetWorkRequest API. + public async Task GetWorkRequest(GetWorkRequestRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called getWorkRequest"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/workRequests/{workRequestId}".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "GetWorkRequest", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"GetWorkRequest failed with error: {e.Message}"); + throw; + } + } + + /// + /// Lists the dedicated AI clusters in a specific compartment. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ListDedicatedAiClusters API. + public async Task ListDedicatedAiClusters(ListDedicatedAiClustersRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called listDedicatedAiClusters"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/dedicatedAiClusters".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "ListDedicatedAiClusters", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ListDedicatedAiClusters failed with error: {e.Message}"); + throw; + } + } + + /// + /// Lists the endpoints of a specific compartment. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ListEndpoints API. + public async Task ListEndpoints(ListEndpointsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called listEndpoints"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/endpoints".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "ListEndpoints", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ListEndpoints failed with error: {e.Message}"); + throw; + } + } + + /// + /// Lists the models in a specific compartment. Includes pretrained base models and fine-tuned custom models. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ListModels API. + public async Task ListModels(ListModelsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called listModels"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/models".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "ListModels", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ListModels failed with error: {e.Message}"); + throw; + } + } + + /// + /// Lists the errors for a work request. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ListWorkRequestErrors API. + public async Task ListWorkRequestErrors(ListWorkRequestErrorsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called listWorkRequestErrors"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/workRequests/{workRequestId}/errors".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "ListWorkRequestErrors", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ListWorkRequestErrors failed with error: {e.Message}"); + throw; + } + } + + /// + /// Lists the logs for a work request. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ListWorkRequestLogs API. + public async Task ListWorkRequestLogs(ListWorkRequestLogsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called listWorkRequestLogs"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/workRequests/{workRequestId}/logs".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "ListWorkRequestLogs", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ListWorkRequestLogs failed with error: {e.Message}"); + throw; + } + } + + /// + /// Lists the work requests in a compartment. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ListWorkRequests API. + public async Task ListWorkRequests(ListWorkRequestsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called listWorkRequests"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/workRequests".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "ListWorkRequests", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ListWorkRequests failed with error: {e.Message}"); + throw; + } + } + + /// + /// Updates a dedicated AI cluster. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use UpdateDedicatedAiCluster API. + public async Task UpdateDedicatedAiCluster(UpdateDedicatedAiClusterRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called updateDedicatedAiCluster"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/dedicatedAiClusters/{dedicatedAiClusterId}".Trim('/'))); + HttpMethod method = new HttpMethod("PUT"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "UpdateDedicatedAiCluster", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"UpdateDedicatedAiCluster failed with error: {e.Message}"); + throw; + } + } + + /// + /// Updates the properties of an endpoint. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use UpdateEndpoint API. + public async Task UpdateEndpoint(UpdateEndpointRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called updateEndpoint"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/endpoints/{endpointId}".Trim('/'))); + HttpMethod method = new HttpMethod("PUT"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "UpdateEndpoint", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"UpdateEndpoint failed with error: {e.Message}"); + throw; + } + } + + /// + /// Updates the properties of a custom model such as name, description, version, freeform tags, and defined tags. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use UpdateModel API. + public async Task UpdateModel(UpdateModelRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called updateModel"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/models/{modelId}".Trim('/'))); + HttpMethod method = new HttpMethod("PUT"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAi", + OperationName = "UpdateModel", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"UpdateModel failed with error: {e.Message}"); + throw; + } + } + + } +} diff --git a/Generativeai/GenerativeAiPaginators.cs b/Generativeai/GenerativeAiPaginators.cs new file mode 100644 index 0000000000..211939d649 --- /dev/null +++ b/Generativeai/GenerativeAiPaginators.cs @@ -0,0 +1,347 @@ +/* + * 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.Collections.Generic; +using System.Threading; +using Oci.GenerativeaiService.Requests; +using Oci.GenerativeaiService.Responses; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService +{ + /// + /// Collection of helper methods that can be used to provide an enumerator interface + /// to any list operations of GenerativeAi where multiple pages of data may be fetched. + /// Two styles of enumerators are supported: + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// Enumerating over the resources/records being listed. These are referred to as RecordEnumerators, and the methods are suffixed with RecordEnumerator. For example: listUsersRecordEnumerator. + /// + /// + /// + /// 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. + ///
+ ///
+ /// 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. + ///
+ public class GenerativeAiPaginators + { + private readonly GenerativeAiClient client; + + public GenerativeAiPaginators(GenerativeAiClient client) + { + this.client = client; + } + + /// + /// Creates a new enumerable which will iterate over the responses received from the ListDedicatedAiClusters operation. This enumerable + /// will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListDedicatedAiClustersResponseEnumerator(ListDedicatedAiClustersRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListDedicatedAiClusters(request, retryConfiguration, cancellationToken) + ); + } + + /// + /// Creates a new enumerable which will iterate over the DedicatedAiClusterSummary objects + /// contained in responses from the ListDedicatedAiClusters operation. This enumerable will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListDedicatedAiClustersRecordEnumerator(ListDedicatedAiClustersRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseRecordEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListDedicatedAiClusters(request, retryConfiguration, cancellationToken), + response => response.DedicatedAiClusterCollection.Items + ); + } + + /// + /// Creates a new enumerable which will iterate over the responses received from the ListEndpoints operation. This enumerable + /// will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListEndpointsResponseEnumerator(ListEndpointsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListEndpoints(request, retryConfiguration, cancellationToken) + ); + } + + /// + /// Creates a new enumerable which will iterate over the EndpointSummary objects + /// contained in responses from the ListEndpoints operation. This enumerable will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListEndpointsRecordEnumerator(ListEndpointsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseRecordEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListEndpoints(request, retryConfiguration, cancellationToken), + response => response.EndpointCollection.Items + ); + } + + /// + /// Creates a new enumerable which will iterate over the responses received from the ListModels operation. This enumerable + /// will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListModelsResponseEnumerator(ListModelsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListModels(request, retryConfiguration, cancellationToken) + ); + } + + /// + /// Creates a new enumerable which will iterate over the ModelSummary objects + /// contained in responses from the ListModels operation. This enumerable will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListModelsRecordEnumerator(ListModelsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseRecordEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListModels(request, retryConfiguration, cancellationToken), + response => response.ModelCollection.Items + ); + } + + /// + /// Creates a new enumerable which will iterate over the responses received from the ListWorkRequestErrors operation. This enumerable + /// will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListWorkRequestErrorsResponseEnumerator(ListWorkRequestErrorsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListWorkRequestErrors(request, retryConfiguration, cancellationToken) + ); + } + + /// + /// Creates a new enumerable which will iterate over the WorkRequestError objects + /// contained in responses from the ListWorkRequestErrors operation. This enumerable will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListWorkRequestErrorsRecordEnumerator(ListWorkRequestErrorsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseRecordEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListWorkRequestErrors(request, retryConfiguration, cancellationToken), + response => response.WorkRequestErrorCollection.Items + ); + } + + /// + /// Creates a new enumerable which will iterate over the responses received from the ListWorkRequestLogs operation. This enumerable + /// will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListWorkRequestLogsResponseEnumerator(ListWorkRequestLogsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListWorkRequestLogs(request, retryConfiguration, cancellationToken) + ); + } + + /// + /// Creates a new enumerable which will iterate over the WorkRequestLogEntry objects + /// contained in responses from the ListWorkRequestLogs operation. This enumerable will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListWorkRequestLogsRecordEnumerator(ListWorkRequestLogsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseRecordEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListWorkRequestLogs(request, retryConfiguration, cancellationToken), + response => response.WorkRequestLogEntryCollection.Items + ); + } + + /// + /// Creates a new enumerable which will iterate over the responses received from the ListWorkRequests operation. This enumerable + /// will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListWorkRequestsResponseEnumerator(ListWorkRequestsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListWorkRequests(request, retryConfiguration, cancellationToken) + ); + } + + /// + /// Creates a new enumerable which will iterate over the WorkRequestSummary objects + /// contained in responses from the ListWorkRequests operation. This enumerable will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListWorkRequestsRecordEnumerator(ListWorkRequestsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseRecordEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListWorkRequests(request, retryConfiguration, cancellationToken), + response => response.WorkRequestSummaryCollection.Items + ); + } + + } +} diff --git a/Generativeai/GenerativeAiWaiters.cs b/Generativeai/GenerativeAiWaiters.cs new file mode 100644 index 0000000000..7fa311e24b --- /dev/null +++ b/Generativeai/GenerativeAiWaiters.cs @@ -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 +{ + /// + /// Contains collection of helper methods to produce Oci.Common.Waiters for different resources of GenerativeAi. + /// + public class GenerativeAiWaiters + { + private readonly GenerativeAiClient client; + + public GenerativeAiWaiters(GenerativeAiClient client) + { + this.client = client; + } + + /// + /// Creates a waiter using default wait configuration. + /// + /// Request to send. + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance + public Waiter ForDedicatedAiCluster(GetDedicatedAiClusterRequest request, params DedicatedAiCluster.LifecycleStateEnum[] targetStates) + { + return this.ForDedicatedAiCluster(request, WaiterConfiguration.DefaultWaiterConfiguration, targetStates); + } + + /// + /// Creates a waiter using the provided configuration. + /// + /// Request to send. + /// Wait Configuration + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance + public Waiter ForDedicatedAiCluster(GetDedicatedAiClusterRequest request, WaiterConfiguration config, params DedicatedAiCluster.LifecycleStateEnum[] targetStates) + { + var agent = new WaiterAgent( + request, + request => client.GetDedicatedAiCluster(request), + response => targetStates.Contains(response.DedicatedAiCluster.LifecycleState.Value), + targetStates.Contains(DedicatedAiCluster.LifecycleStateEnum.Deleted) + ); + return new Waiter(config, agent); + } + /// + /// Creates a waiter using default wait configuration. + /// + /// Request to send. + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance + public Waiter ForEndpoint(GetEndpointRequest request, params Endpoint.LifecycleStateEnum[] targetStates) + { + return this.ForEndpoint(request, WaiterConfiguration.DefaultWaiterConfiguration, targetStates); + } + + /// + /// Creates a waiter using the provided configuration. + /// + /// Request to send. + /// Wait Configuration + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance + public Waiter ForEndpoint(GetEndpointRequest request, WaiterConfiguration config, params Endpoint.LifecycleStateEnum[] targetStates) + { + var agent = new WaiterAgent( + request, + request => client.GetEndpoint(request), + response => targetStates.Contains(response.Endpoint.LifecycleState.Value), + targetStates.Contains(Endpoint.LifecycleStateEnum.Deleted) + ); + return new Waiter(config, agent); + } + /// + /// Creates a waiter using default wait configuration. + /// + /// Request to send. + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance + public Waiter ForModel(GetModelRequest request, params Model.LifecycleStateEnum[] targetStates) + { + return this.ForModel(request, WaiterConfiguration.DefaultWaiterConfiguration, targetStates); + } + + /// + /// Creates a waiter using the provided configuration. + /// + /// Request to send. + /// Wait Configuration + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance + public Waiter ForModel(GetModelRequest request, WaiterConfiguration config, params Model.LifecycleStateEnum[] targetStates) + { + var agent = new WaiterAgent( + request, + request => client.GetModel(request), + response => targetStates.Contains(response.Model.LifecycleState.Value), + targetStates.Contains(Model.LifecycleStateEnum.Deleted) + ); + return new Waiter(config, agent); + } + /// + /// Creates a waiter using default wait configuration. + /// + /// Request to send. + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance + public Waiter ForWorkRequest(GetWorkRequestRequest request, params OperationStatus[] targetStates) + { + return this.ForWorkRequest(request, WaiterConfiguration.DefaultWaiterConfiguration, targetStates); + } + + /// + /// Creates a waiter using the provided configuration. + /// + /// Request to send. + /// Wait Configuration + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance + public Waiter ForWorkRequest(GetWorkRequestRequest request, WaiterConfiguration config, params OperationStatus[] targetStates) + { + var agent = new WaiterAgent( + request, + request => client.GetWorkRequest(request), + response => targetStates.Contains(response.WorkRequest.Status.Value) + ); + return new Waiter(config, agent); + } + } +} diff --git a/Generativeai/OCI.DotNetSDK.Generativeai.csproj b/Generativeai/OCI.DotNetSDK.Generativeai.csproj new file mode 100644 index 0000000000..df83ea0757 --- /dev/null +++ b/Generativeai/OCI.DotNetSDK.Generativeai.csproj @@ -0,0 +1,19 @@ + + + + + {F30C9C22-E809-482B-9BAC-624F9102BF8E} + Library + netstandard2.0 + 8.0 + OCI.DotNetSDK.Generativeai + Oci.GenerativeaiService + Oracle Cloud Infrastructure + Oracle + Oracle;OCI;Oracle Cloud;OracleCloud;oci-sdk;OracleCloudInfrastructure;Generativeai + Oracle Cloud Infrastructure Cloud Generative Ai Service + + + + + diff --git a/Generativeai/README.md b/Generativeai/README.md new file mode 100644 index 0000000000..a168c4f8f6 --- /dev/null +++ b/Generativeai/README.md @@ -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 +``` diff --git a/Generativeai/models/ActionType.cs b/Generativeai/models/ActionType.cs new file mode 100644 index 0000000000..8a68bfd8a1 --- /dev/null +++ b/Generativeai/models/ActionType.cs @@ -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 +{ + /// + /// Possible types of actions. + /// + 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 + } +} diff --git a/Generativeai/models/ChangeDedicatedAiClusterCompartmentDetails.cs b/Generativeai/models/ChangeDedicatedAiClusterCompartmentDetails.cs new file mode 100644 index 0000000000..a8f67b2742 --- /dev/null +++ b/Generativeai/models/ChangeDedicatedAiClusterCompartmentDetails.cs @@ -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 +{ + /// + /// The details to move a dedicated AI cluster to another compartment. + /// + public class ChangeDedicatedAiClusterCompartmentDetails + { + + /// + /// The OCID of the compartment to move the dedicated AI cluster to. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + } +} diff --git a/Generativeai/models/ChangeEndpointCompartmentDetails.cs b/Generativeai/models/ChangeEndpointCompartmentDetails.cs new file mode 100644 index 0000000000..617dee1c83 --- /dev/null +++ b/Generativeai/models/ChangeEndpointCompartmentDetails.cs @@ -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 +{ + /// + /// The details to move an endpoint to another compartment. + /// + public class ChangeEndpointCompartmentDetails + { + + /// + /// The OCID of the compartment to move the endpoint to. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + } +} diff --git a/Generativeai/models/ChangeModelCompartmentDetails.cs b/Generativeai/models/ChangeModelCompartmentDetails.cs new file mode 100644 index 0000000000..d4daf30fd8 --- /dev/null +++ b/Generativeai/models/ChangeModelCompartmentDetails.cs @@ -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 +{ + /// + /// The details to move a custom model to another compartment. + /// + /// + public class ChangeModelCompartmentDetails + { + + /// + /// The compartment OCID to create the model in. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + } +} diff --git a/Generativeai/models/ContentModerationConfig.cs b/Generativeai/models/ContentModerationConfig.cs new file mode 100644 index 0000000000..16dbe0fd3d --- /dev/null +++ b/Generativeai/models/ContentModerationConfig.cs @@ -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 +{ + /// + /// 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. + /// + public class ContentModerationConfig + { + + /// + /// Whether to enable the content moderation feature. + /// + /// + /// Required + /// + [Required(ErrorMessage = "IsEnabled is required.")] + [JsonProperty(PropertyName = "isEnabled")] + public System.Nullable IsEnabled { get; set; } + + } +} diff --git a/Generativeai/models/CreateDedicatedAiClusterDetails.cs b/Generativeai/models/CreateDedicatedAiClusterDetails.cs new file mode 100644 index 0000000000..12e929f469 --- /dev/null +++ b/Generativeai/models/CreateDedicatedAiClusterDetails.cs @@ -0,0 +1,109 @@ +/* + * 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 +{ + /// + /// The data to create a dedicated AI cluster. + /// + public class CreateDedicatedAiClusterDetails + { + + /// + /// A user-friendly name. Does not have to be unique, and it's changeable. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// An optional description of the dedicated AI cluster. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + ///
+ /// Allowed values are: + /// - HOSTING + /// - FINE_TUNING + /// + ///
+ /// + /// Required + /// + [Required(ErrorMessage = "Type is required.")] + [JsonProperty(PropertyName = "type")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable Type { get; set; } + + /// + /// The compartment OCID to create the dedicated AI cluster in. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The number of dedicated units in this AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "UnitCount is required.")] + [JsonProperty(PropertyName = "unitCount")] + public System.Nullable UnitCount { get; set; } + + /// + /// The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + ///
+ /// Allowed values are: + /// - LARGE_COHERE + /// - SMALL_COHERE + /// - EMBED_COHERE + /// - LLAMA2_70 + /// + ///
+ /// + /// Required + /// + [Required(ErrorMessage = "UnitShape is required.")] + [JsonProperty(PropertyName = "unitShape")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable UnitShape { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + } +} diff --git a/Generativeai/models/CreateEndpointDetails.cs b/Generativeai/models/CreateEndpointDetails.cs new file mode 100644 index 0000000000..6e65246faa --- /dev/null +++ b/Generativeai/models/CreateEndpointDetails.cs @@ -0,0 +1,88 @@ +/* + * 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 +{ + /// + /// The data to create an endpoint. + /// + public class CreateEndpointDetails + { + + /// + /// A user-friendly name. Does not have to be unique, and it's changeable. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// An optional description of the endpoint. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The compartment OCID to create the endpoint in. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The ID of the model that's used to create this endpoint. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelId is required.")] + [JsonProperty(PropertyName = "modelId")] + public string ModelId { get; set; } + + /// + /// The OCID of the dedicated AI cluster on which a model will be deployed to. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DedicatedAiClusterId is required.")] + [JsonProperty(PropertyName = "dedicatedAiClusterId")] + public string DedicatedAiClusterId { get; set; } + + [JsonProperty(PropertyName = "contentModerationConfig")] + public ContentModerationConfig ContentModerationConfig { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + } +} diff --git a/Generativeai/models/CreateModelDetails.cs b/Generativeai/models/CreateModelDetails.cs new file mode 100644 index 0000000000..107d810cc0 --- /dev/null +++ b/Generativeai/models/CreateModelDetails.cs @@ -0,0 +1,94 @@ +/* + * 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 +{ + /// + /// The data to create a custom model. + /// + public class CreateModelDetails + { + + /// + /// A user-friendly name. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// The compartment OCID for fine-tuned models. For pretrained models, this value is null. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The provider of the model. + /// + [JsonProperty(PropertyName = "vendor")] + public string Vendor { get; set; } + + /// + /// The version of the model. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// An optional description of the model. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The OCID of the base model that's used for fine-tuning. + /// + /// + /// Required + /// + [Required(ErrorMessage = "BaseModelId is required.")] + [JsonProperty(PropertyName = "baseModelId")] + public string BaseModelId { get; set; } + + /// + /// Required + /// + [Required(ErrorMessage = "FineTuneDetails is required.")] + [JsonProperty(PropertyName = "fineTuneDetails")] + public FineTuneDetails FineTuneDetails { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + } +} diff --git a/Generativeai/models/Dataset.cs b/Generativeai/models/Dataset.cs new file mode 100644 index 0000000000..ccfbe76383 --- /dev/null +++ b/Generativeai/models/Dataset.cs @@ -0,0 +1,78 @@ +/* + * 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; +using Newtonsoft.Json.Linq; + +namespace Oci.GenerativeaiService.Models +{ + /// + /// The dataset used to fine-tune the model. + ///
+ /// Only one dataset is allowed per custom model, which is split 90-10 for training and validating. You must provide the dataset in a JSON Lines (JSONL) file. Each line in the JSONL file must have the format: + /// + /// `{\"prompt\": \"\", \"completion\": \"\"}` + /// + ///
+ [JsonConverter(typeof(DatasetModelConverter))] + public class Dataset + { + /// + /// + /// The type of the data asset. + /// + /// + public enum DatasetTypeEnum { + [EnumMember(Value = "OBJECT_STORAGE")] + ObjectStorage + }; + + + } + + public class DatasetModelConverter : JsonConverter + { + private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); + public override bool CanWrite => false; + public override bool CanRead => true; + public override bool CanConvert(System.Type type) + { + return type == typeof(Dataset); + } + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + throw new System.InvalidOperationException("Use default serialization."); + } + + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + var jsonObject = JObject.Load(reader); + var obj = default(Dataset); + var discriminator = jsonObject["datasetType"].Value(); + switch (discriminator) + { + case "OBJECT_STORAGE": + obj = new ObjectStorageDataset(); + break; + } + if (obj != null) + { + serializer.Populate(jsonObject.CreateReader(), obj); + } + else + { + logger.Warn($"The type {discriminator} is not present under Dataset! Returning null value."); + } + return obj; + } + } +} diff --git a/Generativeai/models/DedicatedAiCluster.cs b/Generativeai/models/DedicatedAiCluster.cs new file mode 100644 index 0000000000..8abdabc462 --- /dev/null +++ b/Generativeai/models/DedicatedAiCluster.cs @@ -0,0 +1,211 @@ +/* + * 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 +{ + /// + /// Dedicated AI clusters are compute resources that you can use for fine-tuning custom models or for hosting endpoints for custom models. The clusters are dedicated to your models and not shared with users in other tenancies. + ///
+ /// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See + /// [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resouces](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). + /// + ///
+ public class DedicatedAiCluster + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the dedicated AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// A user-friendly name. Does not have to be unique, and it's changeable. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// An optional description of the dedicated AI cluster. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + /// + /// + /// The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + /// + /// + public enum TypeEnum { + /// 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 = "HOSTING")] + Hosting, + [EnumMember(Value = "FINE_TUNING")] + FineTuning + }; + + /// + /// The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Type is required.")] + [JsonProperty(PropertyName = "type")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable Type { get; set; } + + /// + /// The compartment OCID to create the dedicated AI cluster in. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The date and time the dedicated AI cluster was created, in the format defined by RFC 3339 + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeCreated is required.")] + [JsonProperty(PropertyName = "timeCreated")] + public System.Nullable TimeCreated { get; set; } + + /// + /// The date and time the dedicated AI cluster was updated, in the format defined by RFC 3339 + /// + [JsonProperty(PropertyName = "timeUpdated")] + public System.Nullable TimeUpdated { get; set; } + /// + /// + /// The current state of the dedicated AI cluster. + /// + /// + public enum LifecycleStateEnum { + /// 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 = "CREATING")] + Creating, + [EnumMember(Value = "ACTIVE")] + Active, + [EnumMember(Value = "UPDATING")] + Updating, + [EnumMember(Value = "DELETING")] + Deleting, + [EnumMember(Value = "DELETED")] + Deleted, + [EnumMember(Value = "FAILED")] + Failed, + [EnumMember(Value = "NEEDS_ATTENTION")] + NeedsAttention + }; + + /// + /// The current state of the dedicated AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "LifecycleState is required.")] + [JsonProperty(PropertyName = "lifecycleState")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable LifecycleState { get; set; } + + /// + /// A message describing the current state with detail that can provide actionable information. + /// + [JsonProperty(PropertyName = "lifecycleDetails")] + public string LifecycleDetails { get; set; } + + /// + /// The number of dedicated units in this AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "UnitCount is required.")] + [JsonProperty(PropertyName = "unitCount")] + public System.Nullable UnitCount { get; set; } + /// + /// + /// The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + /// + /// + public enum UnitShapeEnum { + /// 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 = "LARGE_COHERE")] + LargeCohere, + [EnumMember(Value = "SMALL_COHERE")] + SmallCohere, + [EnumMember(Value = "EMBED_COHERE")] + EmbedCohere, + [EnumMember(Value = "LLAMA2_70")] + Llama270 + }; + + /// + /// The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + /// + /// + /// Required + /// + [Required(ErrorMessage = "UnitShape is required.")] + [JsonProperty(PropertyName = "unitShape")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable UnitShape { get; set; } + + [JsonProperty(PropertyName = "capacity")] + public DedicatedAiClusterCapacity Capacity { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + /// + /// System tags for this resource. Each key is predefined and scoped to a namespace. + ///
+ /// Example: {"orcl-cloud": {"free-tier-retained": "true"}} + ///
+ [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + + } +} diff --git a/Generativeai/models/DedicatedAiClusterCapacity.cs b/Generativeai/models/DedicatedAiClusterCapacity.cs new file mode 100644 index 0000000000..42547dad05 --- /dev/null +++ b/Generativeai/models/DedicatedAiClusterCapacity.cs @@ -0,0 +1,73 @@ +/* + * 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; +using Newtonsoft.Json.Linq; + +namespace Oci.GenerativeaiService.Models +{ + /// + /// The total capacity for a dedicated AI cluster. + /// + [JsonConverter(typeof(DedicatedAiClusterCapacityModelConverter))] + public class DedicatedAiClusterCapacity + { + /// + /// + /// The type of the dedicated AI cluster capacity. + /// + /// + public enum CapacityTypeEnum { + [EnumMember(Value = "HOSTING_CAPACITY")] + HostingCapacity + }; + + + } + + public class DedicatedAiClusterCapacityModelConverter : JsonConverter + { + private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); + public override bool CanWrite => false; + public override bool CanRead => true; + public override bool CanConvert(System.Type type) + { + return type == typeof(DedicatedAiClusterCapacity); + } + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + throw new System.InvalidOperationException("Use default serialization."); + } + + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + var jsonObject = JObject.Load(reader); + var obj = default(DedicatedAiClusterCapacity); + var discriminator = jsonObject["capacityType"].Value(); + switch (discriminator) + { + case "HOSTING_CAPACITY": + obj = new DedicatedAiClusterHostingCapacity(); + break; + } + if (obj != null) + { + serializer.Populate(jsonObject.CreateReader(), obj); + } + else + { + logger.Warn($"The type {discriminator} is not present under DedicatedAiClusterCapacity! Returning null value."); + } + return obj; + } + } +} diff --git a/Generativeai/models/DedicatedAiClusterCollection.cs b/Generativeai/models/DedicatedAiClusterCollection.cs new file mode 100644 index 0000000000..d1d63cb2a3 --- /dev/null +++ b/Generativeai/models/DedicatedAiClusterCollection.cs @@ -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 +{ + /// + /// Results of a dedicate AI cluster search. Contains DedicatedAiClusterSummary items and other information such as metadata. + /// + public class DedicatedAiClusterCollection + { + + /// + /// List of dedicated AI clusters. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Items is required.")] + [JsonProperty(PropertyName = "items")] + public System.Collections.Generic.List Items { get; set; } + + } +} diff --git a/Generativeai/models/DedicatedAiClusterHostingCapacity.cs b/Generativeai/models/DedicatedAiClusterHostingCapacity.cs new file mode 100644 index 0000000000..c0c7c01cc6 --- /dev/null +++ b/Generativeai/models/DedicatedAiClusterHostingCapacity.cs @@ -0,0 +1,39 @@ +/* + * 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 +{ + /// + /// The capacity of a hosting type dedicated AI cluster. + /// + public class DedicatedAiClusterHostingCapacity : DedicatedAiClusterCapacity + { + + /// + /// The total number of endpoints that can be hosted on this dedicated AI cluster. + /// + [JsonProperty(PropertyName = "totalEndpointCapacity")] + public System.Nullable TotalEndpointCapacity { get; set; } + + /// + /// The number of endpoints hosted on this dedicated AI cluster. + /// + [JsonProperty(PropertyName = "usedEndpointCapacity")] + public System.Nullable UsedEndpointCapacity { get; set; } + + [JsonProperty(PropertyName = "capacityType")] + private readonly string capacityType = "HOSTING_CAPACITY"; + } +} diff --git a/Generativeai/models/DedicatedAiClusterSummary.cs b/Generativeai/models/DedicatedAiClusterSummary.cs new file mode 100644 index 0000000000..cb08a4539b --- /dev/null +++ b/Generativeai/models/DedicatedAiClusterSummary.cs @@ -0,0 +1,166 @@ +/* + * 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 information about a dedicated AI cluster. + /// + public class DedicatedAiClusterSummary + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the dedicated AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// A user-friendly name. Does not have to be unique, and it's changeable. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// An optional description of the dedicated AI cluster. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + ///
+ /// Allowed values are: + /// - HOSTING + /// - FINE_TUNING + /// + ///
+ /// + /// Required + /// + [Required(ErrorMessage = "Type is required.")] + [JsonProperty(PropertyName = "type")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable Type { get; set; } + + /// + /// The compartment OCID to create the dedicated AI cluster in. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The date and time the dedicated AI cluster was created, in the format defined by RFC 3339. + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeCreated is required.")] + [JsonProperty(PropertyName = "timeCreated")] + public System.Nullable TimeCreated { get; set; } + + /// + /// The date and time the dedicated AI cluster was updated, in the format defined by RFC 3339. + /// + [JsonProperty(PropertyName = "timeUpdated")] + public System.Nullable TimeUpdated { get; set; } + + /// + /// The current state of the dedicated AI cluster. + ///
+ /// Allowed values are: + /// - CREATING + /// - ACTIVE + /// - UPDATING + /// - DELETING + /// - DELETED + /// - FAILED + /// - NEEDS_ATTENTION + /// + ///
+ /// + /// Required + /// + [Required(ErrorMessage = "LifecycleState is required.")] + [JsonProperty(PropertyName = "lifecycleState")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable LifecycleState { get; set; } + + /// + /// A message describing the current state of the dedicated AI cluster in more detail that can provide actionable information. + /// + [JsonProperty(PropertyName = "lifecycleDetails")] + public string LifecycleDetails { get; set; } + + /// + /// The number of dedicated units in this AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "UnitCount is required.")] + [JsonProperty(PropertyName = "unitCount")] + public System.Nullable UnitCount { get; set; } + + /// + /// The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + /// + /// + /// Required + /// + [Required(ErrorMessage = "UnitShape is required.")] + [JsonProperty(PropertyName = "unitShape")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable UnitShape { get; set; } + + [JsonProperty(PropertyName = "capacity")] + public DedicatedAiClusterCapacity Capacity { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + /// + /// System tags for this resource. Each key is predefined and scoped to a namespace. + ///
+ /// Example: {"orcl-cloud": {"free-tier-retained": "true"}} + ///
+ [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + + } +} diff --git a/Generativeai/models/Endpoint.cs b/Generativeai/models/Endpoint.cs new file mode 100644 index 0000000000..1ee7f51c12 --- /dev/null +++ b/Generativeai/models/Endpoint.cs @@ -0,0 +1,165 @@ +/* + * 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 +{ + /// + /// To host a custom model for inference, create an endpoint for that model on a dedicated AI cluster of type HOSTING. + ///
+ /// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See + /// [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resouces](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). + /// + ///
+ public class Endpoint + { + + /// + /// An OCID that uniquely identifies this endpoint resource. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// A user-friendly name. Does not have to be unique, and it's changeable. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// An optional description of the endpoint. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The OCID of the model that's used to create this endpoint. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelId is required.")] + [JsonProperty(PropertyName = "modelId")] + public string ModelId { get; set; } + + /// + /// The compartment OCID to create the endpoint in. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The OCID of the dedicated AI cluster on which the model will be deployed to. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DedicatedAiClusterId is required.")] + [JsonProperty(PropertyName = "dedicatedAiClusterId")] + public string DedicatedAiClusterId { get; set; } + + /// + /// The date and time that the endpoint was created in the format of an RFC3339 datetime string. + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeCreated is required.")] + [JsonProperty(PropertyName = "timeCreated")] + public System.Nullable TimeCreated { get; set; } + + /// + /// The date and time that the endpoint was updated in the format of an RFC3339 datetime string. + /// + [JsonProperty(PropertyName = "timeUpdated")] + public System.Nullable TimeUpdated { get; set; } + /// + /// + /// The current state of the endpoint. + /// + /// + public enum LifecycleStateEnum { + /// 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 = "ACTIVE")] + Active, + [EnumMember(Value = "CREATING")] + Creating, + [EnumMember(Value = "UPDATING")] + Updating, + [EnumMember(Value = "DELETING")] + Deleting, + [EnumMember(Value = "DELETED")] + Deleted, + [EnumMember(Value = "FAILED")] + Failed + }; + + /// + /// The current state of the endpoint. + /// + /// + /// Required + /// + [Required(ErrorMessage = "LifecycleState is required.")] + [JsonProperty(PropertyName = "lifecycleState")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable LifecycleState { get; set; } + + /// + /// A message describing the current state of the endpoint in more detail that can provide actionable information. + /// + [JsonProperty(PropertyName = "lifecycleDetails")] + public string LifecycleDetails { get; set; } + + [JsonProperty(PropertyName = "contentModerationConfig")] + public ContentModerationConfig ContentModerationConfig { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + /// + /// System tags for this resource. Each key is predefined and scoped to a namespace. + ///
+ /// Example: {"orcl-cloud": {"free-tier-retained": "true"}} + ///
+ [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + + } +} diff --git a/Generativeai/models/EndpointCollection.cs b/Generativeai/models/EndpointCollection.cs new file mode 100644 index 0000000000..9a4fb197a2 --- /dev/null +++ b/Generativeai/models/EndpointCollection.cs @@ -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 +{ + /// + /// Results of an endpoint search. Contains EndpointSummary items and other information such as metadata. + /// + public class EndpointCollection + { + + /// + /// List of endpoints. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Items is required.")] + [JsonProperty(PropertyName = "items")] + public System.Collections.Generic.List Items { get; set; } + + } +} diff --git a/Generativeai/models/EndpointSummary.cs b/Generativeai/models/EndpointSummary.cs new file mode 100644 index 0000000000..4fe9401f93 --- /dev/null +++ b/Generativeai/models/EndpointSummary.cs @@ -0,0 +1,148 @@ +/* + * 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 information for an endpoint resource. + /// + public class EndpointSummary + { + + /// + /// An OCID that uniquely identifies this endpoint resource. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// A user-friendly name. Does not have to be unique, and it's changeable. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// An optional description of the endpoint. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The OCID of the model that's used to create this endpoint. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelId is required.")] + [JsonProperty(PropertyName = "modelId")] + public string ModelId { get; set; } + + /// + /// The compartment OCID to create the endpoint in. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The OCID of the dedicated AI cluster on which a model will be deployed to. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DedicatedAiClusterId is required.")] + [JsonProperty(PropertyName = "dedicatedAiClusterId")] + public string DedicatedAiClusterId { get; set; } + + /// + /// The date and time that the endpoint was created in the format of an RFC3339 datetime string. + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeCreated is required.")] + [JsonProperty(PropertyName = "timeCreated")] + public System.Nullable TimeCreated { get; set; } + + /// + /// The date and time the endpoint was updated in the format of n RFC3339 datetime string. + /// + [JsonProperty(PropertyName = "timeUpdated")] + public System.Nullable TimeUpdated { get; set; } + + /// + /// The current state of the endpoint. + ///
+ /// Allowed values are: + /// - ACTIVE + /// - CREATING + /// - UPDATING + /// - DELETING + /// - DELETED + /// - FAILED + /// + ///
+ /// + /// Required + /// + [Required(ErrorMessage = "LifecycleState is required.")] + [JsonProperty(PropertyName = "lifecycleState")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable LifecycleState { get; set; } + + /// + /// A message describing the current state with detail that can provide actionable information. + /// + [JsonProperty(PropertyName = "lifecycleDetails")] + public string LifecycleDetails { get; set; } + + [JsonProperty(PropertyName = "contentModerationConfig")] + public ContentModerationConfig ContentModerationConfig { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + /// + /// System tags for this resource. Each key is predefined and scoped to a namespace. + ///
+ /// Example: {"orcl-cloud": {"free-tier-retained": "true"}} + ///
+ [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + + } +} diff --git a/Generativeai/models/FineTuneDetails.cs b/Generativeai/models/FineTuneDetails.cs new file mode 100644 index 0000000000..dba3e76578 --- /dev/null +++ b/Generativeai/models/FineTuneDetails.cs @@ -0,0 +1,46 @@ +/* + * 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 +{ + /// + /// Details about fine-tuning a custom model. + /// + /// + public class FineTuneDetails + { + + /// + /// Required + /// + [Required(ErrorMessage = "TrainingDataset is required.")] + [JsonProperty(PropertyName = "trainingDataset")] + public Dataset TrainingDataset { get; set; } + + /// + /// The OCID of the dedicated AI cluster this fine-tuning runs on. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DedicatedAiClusterId is required.")] + [JsonProperty(PropertyName = "dedicatedAiClusterId")] + public string DedicatedAiClusterId { get; set; } + + [JsonProperty(PropertyName = "trainingConfig")] + public TrainingConfig TrainingConfig { get; set; } + + } +} diff --git a/Generativeai/models/Model.cs b/Generativeai/models/Model.cs new file mode 100644 index 0000000000..8bff902fb4 --- /dev/null +++ b/Generativeai/models/Model.cs @@ -0,0 +1,211 @@ +/* + * 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 +{ + /// + /// You can create a custom model by using your dataset to fine-tune an out-of-the-box text generation base model. Have your dataset ready before you create a custom model. See [Training Data Requirements](https://docs.cloud.oracle.com/iaas/Content/generative-ai/training-data-requirements.htm). + ///
+ /// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See + /// [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resouces](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). + /// + ///
+ public class Model + { + + /// + /// An ID that uniquely identifies a pretrained or fine-tuned model. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// An optional description of the model. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The compartment OCID for fine-tuned models. For pretrained models, this value is null. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// Describes what this model can be used for. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Capabilities is required.")] + [JsonProperty(PropertyName = "capabilities", ItemConverterType = typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Collections.Generic.List Capabilities { get; set; } + /// + /// + /// The lifecycle state of the model. + /// + /// + public enum LifecycleStateEnum { + /// 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 = "ACTIVE")] + Active, + [EnumMember(Value = "CREATING")] + Creating, + [EnumMember(Value = "DELETING")] + Deleting, + [EnumMember(Value = "DELETED")] + Deleted, + [EnumMember(Value = "FAILED")] + Failed + }; + + /// + /// The lifecycle state of the model. + /// + /// + /// Required + /// + [Required(ErrorMessage = "LifecycleState is required.")] + [JsonProperty(PropertyName = "lifecycleState")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable LifecycleState { get; set; } + + /// + /// A message describing the current state of the model in more detail that can provide actionable information. + /// + [JsonProperty(PropertyName = "lifecycleDetails")] + public string LifecycleDetails { get; set; } + + /// + /// The provider of the base model. + /// + [JsonProperty(PropertyName = "vendor")] + public string Vendor { get; set; } + + /// + /// The version of the model. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// A user-friendly name. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// The date and time that the model was created in the format of an RFC3339 datetime string. + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeCreated is required.")] + [JsonProperty(PropertyName = "timeCreated")] + public System.Nullable TimeCreated { get; set; } + + /// + /// The date and time that the model was updated in the format of an RFC3339 datetime string. + /// + [JsonProperty(PropertyName = "timeUpdated")] + public System.Nullable TimeUpdated { get; set; } + + /// + /// The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null. + /// + [JsonProperty(PropertyName = "baseModelId")] + public string BaseModelId { get; set; } + /// + /// + /// The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model. + /// + /// + public enum TypeEnum { + /// 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 = "BASE")] + Base, + [EnumMember(Value = "CUSTOM")] + Custom + }; + + /// + /// The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Type is required.")] + [JsonProperty(PropertyName = "type")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable Type { get; set; } + + [JsonProperty(PropertyName = "fineTuneDetails")] + public FineTuneDetails FineTuneDetails { get; set; } + + [JsonProperty(PropertyName = "modelMetrics")] + public ModelMetrics ModelMetrics { get; set; } + + /// + /// Whether a model is supported long-term. Only applicable to base models. + /// + [JsonProperty(PropertyName = "isLongTermSupported")] + public System.Nullable IsLongTermSupported { get; set; } + + /// + /// Corresponds to the time when the custom model and its associated foundation model will be deprecated. + /// + [JsonProperty(PropertyName = "timeDeprecated")] + public System.Nullable TimeDeprecated { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + /// + /// System tags for this resource. Each key is predefined and scoped to a namespace. + ///
+ /// Example: {"orcl-cloud": {"free-tier-retained": "true"}} + ///
+ [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + + } +} diff --git a/Generativeai/models/ModelCapability.cs b/Generativeai/models/ModelCapability.cs new file mode 100644 index 0000000000..12f76e86e3 --- /dev/null +++ b/Generativeai/models/ModelCapability.cs @@ -0,0 +1,31 @@ +/* + * 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 +{ + /// + /// Describes what this model can be used for. + /// + public enum ModelCapability { + /// 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 = "TEXT_GENERATION")] + TextGeneration, + [EnumMember(Value = "TEXT_SUMMARIZATION")] + TextSummarization, + [EnumMember(Value = "TEXT_EMBEDDINGS")] + TextEmbeddings, + [EnumMember(Value = "FINE_TUNE")] + FineTune + } +} diff --git a/Generativeai/models/ModelCollection.cs b/Generativeai/models/ModelCollection.cs new file mode 100644 index 0000000000..f076aa651c --- /dev/null +++ b/Generativeai/models/ModelCollection.cs @@ -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 +{ + /// + /// Results of a model search. Contains ModelSummary items and other information such as metadata. + /// + /// + public class ModelCollection + { + + /// + /// The results of a model search. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Items is required.")] + [JsonProperty(PropertyName = "items")] + public System.Collections.Generic.List Items { get; set; } + + } +} diff --git a/Generativeai/models/ModelMetrics.cs b/Generativeai/models/ModelMetrics.cs new file mode 100644 index 0000000000..12bdaf8616 --- /dev/null +++ b/Generativeai/models/ModelMetrics.cs @@ -0,0 +1,73 @@ +/* + * 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; +using Newtonsoft.Json.Linq; + +namespace Oci.GenerativeaiService.Models +{ + /// + /// Model metrics during the creation of a new model. + /// + [JsonConverter(typeof(ModelMetricsModelConverter))] + public class ModelMetrics + { + /// + /// + /// The type of the model metrics. Each type of model can expect a different set of model metrics. + /// + /// + public enum ModelMetricsTypeEnum { + [EnumMember(Value = "TEXT_GENERATION_MODEL_METRICS")] + TextGenerationModelMetrics + }; + + + } + + public class ModelMetricsModelConverter : JsonConverter + { + private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); + public override bool CanWrite => false; + public override bool CanRead => true; + public override bool CanConvert(System.Type type) + { + return type == typeof(ModelMetrics); + } + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + throw new System.InvalidOperationException("Use default serialization."); + } + + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + var jsonObject = JObject.Load(reader); + var obj = default(ModelMetrics); + var discriminator = jsonObject["modelMetricsType"].Value(); + switch (discriminator) + { + case "TEXT_GENERATION_MODEL_METRICS": + obj = new TextGenerationModelMetrics(); + break; + } + if (obj != null) + { + serializer.Populate(jsonObject.CreateReader(), obj); + } + else + { + logger.Warn($"The type {discriminator} is not present under ModelMetrics! Returning null value."); + } + return obj; + } + } +} diff --git a/Generativeai/models/ModelSummary.cs b/Generativeai/models/ModelSummary.cs new file mode 100644 index 0000000000..b0adfdac1a --- /dev/null +++ b/Generativeai/models/ModelSummary.cs @@ -0,0 +1,175 @@ +/* + * 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 of the model. + /// + /// + public class ModelSummary + { + + /// + /// An ID that uniquely identifies a pretrained or a fine-tuned model. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// The compartment OCID for fine-tuned models. For pretrained models, this value is null. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// Describes what this model can be used for. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Capabilities is required.")] + [JsonProperty(PropertyName = "capabilities", ItemConverterType = typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Collections.Generic.List Capabilities { get; set; } + + /// + /// The lifecycle state of the model. + ///
+ /// Allowed values are: + /// - ACTIVE + /// - CREATING + /// - DELETING + /// - DELETED + /// - FAILED + /// + ///
+ /// + /// Required + /// + [Required(ErrorMessage = "LifecycleState is required.")] + [JsonProperty(PropertyName = "lifecycleState")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable LifecycleState { get; set; } + + /// + /// A message describing the current state of the model with detail that can provide actionable information. + /// + [JsonProperty(PropertyName = "lifecycleDetails")] + public string LifecycleDetails { get; set; } + + /// + /// A user-friendly name. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// The provider of the model. + /// + [JsonProperty(PropertyName = "vendor")] + public string Vendor { get; set; } + + /// + /// The version of the model. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// The date and time that the model was created in the format of an RFC3339 datetime string. + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeCreated is required.")] + [JsonProperty(PropertyName = "timeCreated")] + public System.Nullable TimeCreated { get; set; } + + /// + /// The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null. + /// + [JsonProperty(PropertyName = "baseModelId")] + public string BaseModelId { get; set; } + + /// + /// The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model. + ///
+ /// Allowed values are: + /// - BASE + /// - CUSTOM + /// + ///
+ /// + /// Required + /// + [Required(ErrorMessage = "Type is required.")] + [JsonProperty(PropertyName = "type")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable Type { get; set; } + + [JsonProperty(PropertyName = "fineTuneDetails")] + public FineTuneDetails FineTuneDetails { get; set; } + + [JsonProperty(PropertyName = "modelMetrics")] + public ModelMetrics ModelMetrics { get; set; } + + /// + /// Whether a model is supported long-term. Applies only to base models. + /// + [JsonProperty(PropertyName = "isLongTermSupported")] + public System.Nullable IsLongTermSupported { get; set; } + + /// + /// Corresponds to the time when the custom model and its associated foundation model will be deprecated. + /// + [JsonProperty(PropertyName = "timeDeprecated")] + public System.Nullable TimeDeprecated { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + /// + /// System tags for this resource. Each key is predefined and scoped to a namespace. + ///
+ /// Example: {"orcl-cloud": {"free-tier-retained": "true"}} + ///
+ [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + + } +} diff --git a/Generativeai/models/ObjectStorageDataset.cs b/Generativeai/models/ObjectStorageDataset.cs new file mode 100644 index 0000000000..6b65b87357 --- /dev/null +++ b/Generativeai/models/ObjectStorageDataset.cs @@ -0,0 +1,57 @@ +/* + * 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 +{ + /// + /// The dataset is stored in an OCI Object Storage bucket. + /// + public class ObjectStorageDataset : Dataset + { + + /// + /// The Object Storage namespace. + /// + /// + /// Required + /// + [Required(ErrorMessage = "NamespaceName is required.")] + [JsonProperty(PropertyName = "namespaceName")] + public string NamespaceName { get; set; } + + /// + /// The Object Storage bucket name. + /// + /// + /// Required + /// + [Required(ErrorMessage = "BucketName is required.")] + [JsonProperty(PropertyName = "bucketName")] + public string BucketName { get; set; } + + /// + /// The Object Storage object name. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ObjectName is required.")] + [JsonProperty(PropertyName = "objectName")] + public string ObjectName { get; set; } + + [JsonProperty(PropertyName = "datasetType")] + private readonly string datasetType = "OBJECT_STORAGE"; + } +} diff --git a/Generativeai/models/OperationStatus.cs b/Generativeai/models/OperationStatus.cs new file mode 100644 index 0000000000..91529aeed9 --- /dev/null +++ b/Generativeai/models/OperationStatus.cs @@ -0,0 +1,37 @@ +/* + * 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 +{ + /// + /// The status of the work request. + /// + public enum OperationStatus { + /// 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 = "ACCEPTED")] + Accepted, + [EnumMember(Value = "IN_PROGRESS")] + InProgress, + [EnumMember(Value = "WAITING")] + Waiting, + [EnumMember(Value = "FAILED")] + Failed, + [EnumMember(Value = "SUCCEEDED")] + Succeeded, + [EnumMember(Value = "CANCELING")] + Canceling, + [EnumMember(Value = "CANCELED")] + Canceled + } +} diff --git a/Generativeai/models/OperationType.cs b/Generativeai/models/OperationType.cs new file mode 100644 index 0000000000..52422f1675 --- /dev/null +++ b/Generativeai/models/OperationType.cs @@ -0,0 +1,45 @@ +/* + * 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 +{ + /// + /// The resources affected by this work request. + /// + public enum OperationType { + /// 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 = "CREATE_MODEL")] + CreateModel, + [EnumMember(Value = "DELETE_MODEL")] + DeleteModel, + [EnumMember(Value = "MOVE_MODEL")] + MoveModel, + [EnumMember(Value = "CREATE_DEDICATED_AI_CLUSTER")] + CreateDedicatedAiCluster, + [EnumMember(Value = "DELETE_DEDICATED_AI_CLUSTER")] + DeleteDedicatedAiCluster, + [EnumMember(Value = "UPDATE_DEDICATED_AI_CLUSTER")] + UpdateDedicatedAiCluster, + [EnumMember(Value = "MOVE_DEDICATED_AI_CLUSTER")] + MoveDedicatedAiCluster, + [EnumMember(Value = "CREATE_ENDPOINT")] + CreateEndpoint, + [EnumMember(Value = "DELETE_ENDPOINT")] + DeleteEndpoint, + [EnumMember(Value = "UPDATE_ENDPOINT")] + UpdateEndpoint, + [EnumMember(Value = "MOVE_ENDPOINT")] + MoveEndpoint + } +} diff --git a/Generativeai/models/SortOrder.cs b/Generativeai/models/SortOrder.cs new file mode 100644 index 0000000000..422a077436 --- /dev/null +++ b/Generativeai/models/SortOrder.cs @@ -0,0 +1,26 @@ +/* + * 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 +{ + /// + /// The sort order to use, either ascending (`ASC`) or descending (`DESC`). The `displayName` + /// sort order is case sensitive. + /// + /// + public enum SortOrder { + [EnumMember(Value = "ASC")] + Asc, + [EnumMember(Value = "DESC")] + Desc + } +} diff --git a/Generativeai/models/TFewTrainingConfig.cs b/Generativeai/models/TFewTrainingConfig.cs new file mode 100644 index 0000000000..84e2238b71 --- /dev/null +++ b/Generativeai/models/TFewTrainingConfig.cs @@ -0,0 +1,27 @@ +/* + * 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 +{ + /// + /// The TFEW training method hyperparameters. + /// + public class TFewTrainingConfig : TrainingConfig + { + + [JsonProperty(PropertyName = "trainingConfigType")] + private readonly string trainingConfigType = "TFEW_TRAINING_CONFIG"; + } +} diff --git a/Generativeai/models/TextGenerationModelMetrics.cs b/Generativeai/models/TextGenerationModelMetrics.cs new file mode 100644 index 0000000000..e9f31cc0bd --- /dev/null +++ b/Generativeai/models/TextGenerationModelMetrics.cs @@ -0,0 +1,40 @@ +/* + * 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 +{ + /// + /// The text generation model metrics of the fine-tuning process. + /// + /// + public class TextGenerationModelMetrics : ModelMetrics + { + + /// + /// Fine-tuned model accuracy. + /// + [JsonProperty(PropertyName = "finalAccuracy")] + public System.Double FinalAccuracy { get; set; } + + /// + /// Fine-tuned model loss. + /// + [JsonProperty(PropertyName = "finalLoss")] + public System.Double FinalLoss { get; set; } + + [JsonProperty(PropertyName = "modelMetricsType")] + private readonly string modelMetricsType = "TEXT_GENERATION_MODEL_METRICS"; + } +} diff --git a/Generativeai/models/TrainingConfig.cs b/Generativeai/models/TrainingConfig.cs new file mode 100644 index 0000000000..70c2d4d9e0 --- /dev/null +++ b/Generativeai/models/TrainingConfig.cs @@ -0,0 +1,118 @@ +/* + * 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; +using Newtonsoft.Json.Linq; + +namespace Oci.GenerativeaiService.Models +{ + /// + /// The fine-tuning method and hyperparameters used for fine-tuning a custom model. + /// + [JsonConverter(typeof(TrainingConfigModelConverter))] + public class TrainingConfig + { + /// + /// + /// The fine-tuning method for training a custom model. + /// + /// + public enum TrainingConfigTypeEnum { + [EnumMember(Value = "TFEW_TRAINING_CONFIG")] + TfewTrainingConfig, + [EnumMember(Value = "VANILLA_TRAINING_CONFIG")] + VanillaTrainingConfig + }; + + + /// + /// The maximum number of training epochs to run for. + /// + [JsonProperty(PropertyName = "totalTrainingEpochs")] + public System.Nullable TotalTrainingEpochs { get; set; } + + /// + /// The initial learning rate to be used during training + /// + [JsonProperty(PropertyName = "learningRate")] + public System.Double LearningRate { get; set; } + + /// + /// The batch size used during training. + /// + [JsonProperty(PropertyName = "trainingBatchSize")] + public System.Nullable TrainingBatchSize { get; set; } + + /// + /// Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation. + /// + /// + [JsonProperty(PropertyName = "earlyStoppingPatience")] + public System.Nullable EarlyStoppingPatience { get; set; } + + /// + /// How much the loss must improve to prevent early stopping. + /// + [JsonProperty(PropertyName = "earlyStoppingThreshold")] + public System.Double EarlyStoppingThreshold { get; set; } + + /// + /// Determines how frequently to log model metrics. + ///
+ /// Every step is logged for the first 20 steps and then follows this parameter for log frequency. Set to 0 to disable logging the model metrics. + /// + ///
+ [JsonProperty(PropertyName = "logModelMetricsIntervalInSteps")] + public System.Nullable LogModelMetricsIntervalInSteps { get; set; } + + } + + public class TrainingConfigModelConverter : JsonConverter + { + private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); + public override bool CanWrite => false; + public override bool CanRead => true; + public override bool CanConvert(System.Type type) + { + return type == typeof(TrainingConfig); + } + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + throw new System.InvalidOperationException("Use default serialization."); + } + + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + var jsonObject = JObject.Load(reader); + var obj = default(TrainingConfig); + var discriminator = jsonObject["trainingConfigType"].Value(); + switch (discriminator) + { + case "VANILLA_TRAINING_CONFIG": + obj = new VanillaTrainingConfig(); + break; + case "TFEW_TRAINING_CONFIG": + obj = new TFewTrainingConfig(); + break; + } + if (obj != null) + { + serializer.Populate(jsonObject.CreateReader(), obj); + } + else + { + logger.Warn($"The type {discriminator} is not present under TrainingConfig! Returning null value."); + } + return obj; + } + } +} diff --git a/Generativeai/models/UpdateDedicatedAiClusterDetails.cs b/Generativeai/models/UpdateDedicatedAiClusterDetails.cs new file mode 100644 index 0000000000..4c99b4335c --- /dev/null +++ b/Generativeai/models/UpdateDedicatedAiClusterDetails.cs @@ -0,0 +1,61 @@ +/* + * 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 +{ + /// + /// The data to update a dedicated AI cluster. + /// + public class UpdateDedicatedAiClusterDetails + { + + /// + /// A user-friendly name. Does not have to be unique, and it's changeable. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// An optional description of the dedicated AI cluster. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The number of dedicated units in this AI cluster. + /// + [JsonProperty(PropertyName = "unitCount")] + public System.Nullable UnitCount { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + } +} diff --git a/Generativeai/models/UpdateEndpointDetails.cs b/Generativeai/models/UpdateEndpointDetails.cs new file mode 100644 index 0000000000..4afec94fe8 --- /dev/null +++ b/Generativeai/models/UpdateEndpointDetails.cs @@ -0,0 +1,58 @@ +/* + * 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 +{ + /// + /// The data to update an endpoint. + /// + public class UpdateEndpointDetails + { + + /// + /// A user-friendly name. Does not have to be unique, and it's changeable. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// An optional description of the endpoint. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + [JsonProperty(PropertyName = "contentModerationConfig")] + public ContentModerationConfig ContentModerationConfig { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + } +} diff --git a/Generativeai/models/UpdateModelDetails.cs b/Generativeai/models/UpdateModelDetails.cs new file mode 100644 index 0000000000..c9e3ae8105 --- /dev/null +++ b/Generativeai/models/UpdateModelDetails.cs @@ -0,0 +1,68 @@ +/* + * 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 +{ + /// + /// The data to update a custom model. + /// + /// + public class UpdateModelDetails + { + + /// + /// A user-friendly name. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// An optional description of the model. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// The provider of the base model. + /// + [JsonProperty(PropertyName = "vendor")] + public string Vendor { get; set; } + + /// + /// The version of the model. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Department": "Finance"} + ///
+ [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + ///
+ /// Example: {"Operations": {"CostCenter": "42"}} + ///
+ [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + } +} diff --git a/Generativeai/models/VanillaTrainingConfig.cs b/Generativeai/models/VanillaTrainingConfig.cs new file mode 100644 index 0000000000..1a1dc10df5 --- /dev/null +++ b/Generativeai/models/VanillaTrainingConfig.cs @@ -0,0 +1,34 @@ +/* + * 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 +{ + /// + /// The Vanilla training method hyperparameters. + /// + /// + public class VanillaTrainingConfig : TrainingConfig + { + + /// + /// The number of last layers to be fine-tuned. + /// + [JsonProperty(PropertyName = "numOfLastLayers")] + public System.Nullable NumOfLastLayers { get; set; } + + [JsonProperty(PropertyName = "trainingConfigType")] + private readonly string trainingConfigType = "VANILLA_TRAINING_CONFIG"; + } +} diff --git a/Generativeai/models/WorkRequest.cs b/Generativeai/models/WorkRequest.cs new file mode 100644 index 0000000000..69f1fe0b63 --- /dev/null +++ b/Generativeai/models/WorkRequest.cs @@ -0,0 +1,121 @@ +/* + * 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 +{ + /// + /// An asynchronous work request. When you start a long-running operation, the service creates a work request. Work requests help you monitor long-running operations. + ///
+ /// A work request is an activity log that lets you track each step in the operation's progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation. + /// + ///
+ public class WorkRequest + { + + /// + /// The asynchronous operation tracked by this work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "OperationType is required.")] + [JsonProperty(PropertyName = "operationType")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable OperationType { get; set; } + + /// + /// The status of the work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Status is required.")] + [JsonProperty(PropertyName = "status")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable Status { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The resources that are affected by the work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Resources is required.")] + [JsonProperty(PropertyName = "resources")] + public System.Collections.Generic.List Resources { get; set; } + + /// + /// Shows the progress of the operation tracked by the work request, as a percentage of the total work + /// that must be performed. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "PercentComplete is required.")] + [JsonProperty(PropertyName = "percentComplete")] + public System.Nullable PercentComplete { get; set; } + + /// + /// The date and time the work request was created, in the format defined by + /// [RFC 3339](https://tools.ietf.org/html/rfc3339). + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeAccepted is required.")] + [JsonProperty(PropertyName = "timeAccepted")] + public System.Nullable TimeAccepted { get; set; } + + /// + /// The date and time the work request was started, in the format defined by + /// [RFC 3339](https://tools.ietf.org/html/rfc3339). + /// + /// + [JsonProperty(PropertyName = "timeStarted")] + public System.Nullable TimeStarted { get; set; } + + /// + /// The date and time the work request was finished, in the format defined by + /// [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + /// + /// + [JsonProperty(PropertyName = "timeFinished")] + public System.Nullable TimeFinished { get; set; } + + } +} diff --git a/Generativeai/models/WorkRequestError.cs b/Generativeai/models/WorkRequestError.cs new file mode 100644 index 0000000000..b43f739609 --- /dev/null +++ b/Generativeai/models/WorkRequestError.cs @@ -0,0 +1,59 @@ +/* + * 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 +{ + /// + /// An error encountered while performing an operation that is tracked by this work request. + /// + public class WorkRequestError + { + + /// + /// A machine-usable code for the error that occurred. For a list of error codes, see + /// [API Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "Code is required.")] + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// A human-readable error message. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Message is required.")] + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// The date and time that the error occurred, in the format defined by + /// [RFC 3339](https://tools.ietf.org/html/rfc3339). + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "Timestamp is required.")] + [JsonProperty(PropertyName = "timestamp")] + public System.Nullable Timestamp { get; set; } + + } +} diff --git a/Generativeai/models/WorkRequestErrorCollection.cs b/Generativeai/models/WorkRequestErrorCollection.cs new file mode 100644 index 0000000000..17c0947f37 --- /dev/null +++ b/Generativeai/models/WorkRequestErrorCollection.cs @@ -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 +{ + /// + /// A list of work request errors. Can contain errors and other information such as metadata. + /// + public class WorkRequestErrorCollection + { + + /// + /// A list of work request errors. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Items is required.")] + [JsonProperty(PropertyName = "items")] + public System.Collections.Generic.List Items { get; set; } + + } +} diff --git a/Generativeai/models/WorkRequestLogEntry.cs b/Generativeai/models/WorkRequestLogEntry.cs new file mode 100644 index 0000000000..ee07d58f28 --- /dev/null +++ b/Generativeai/models/WorkRequestLogEntry.cs @@ -0,0 +1,47 @@ +/* + * 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 +{ + /// + /// The log message from performing an operation that is tracked by this work request. + /// + public class WorkRequestLogEntry + { + + /// + /// A human-readable log message. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Message is required.")] + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// The date and time the log message was written, in the format defined by + /// [RFC 3339](https://tools.ietf.org/html/rfc3339). + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "Timestamp is required.")] + [JsonProperty(PropertyName = "timestamp")] + public System.Nullable Timestamp { get; set; } + + } +} diff --git a/Generativeai/models/WorkRequestLogEntryCollection.cs b/Generativeai/models/WorkRequestLogEntryCollection.cs new file mode 100644 index 0000000000..d959ceaa0a --- /dev/null +++ b/Generativeai/models/WorkRequestLogEntryCollection.cs @@ -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 +{ + /// + /// A list of work request logs. Can contain logs and other information such as metadata. + /// + public class WorkRequestLogEntryCollection + { + + /// + /// A list of work request log entries. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Items is required.")] + [JsonProperty(PropertyName = "items")] + public System.Collections.Generic.List Items { get; set; } + + } +} diff --git a/Generativeai/models/WorkRequestResource.cs b/Generativeai/models/WorkRequestResource.cs new file mode 100644 index 0000000000..8ffb0e5091 --- /dev/null +++ b/Generativeai/models/WorkRequestResource.cs @@ -0,0 +1,73 @@ +/* + * 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 +{ + /// + /// The resource created or operated on by a work request. + /// + public class WorkRequestResource + { + + /// + /// The resource type that the work request affects. + /// + /// + /// Required + /// + [Required(ErrorMessage = "EntityType is required.")] + [JsonProperty(PropertyName = "entityType")] + public string EntityType { get; set; } + + /// + /// The way in which this resource is affected by the operation tracked in the work request. + /// A resource being created, updated, or deleted remains in the IN_PROGRESS state until + /// work is complete for that resource, at which point it transitions to CREATED, UPDATED, + /// or DELETED, respectively. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "ActionType is required.")] + [JsonProperty(PropertyName = "actionType")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable ActionType { get; set; } + + /// + /// An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or other unique identifier for the resource. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Identifier is required.")] + [JsonProperty(PropertyName = "identifier")] + public string Identifier { get; set; } + + /// + /// The URI path that you can use for a GET request to access the resource metadata. + /// + [JsonProperty(PropertyName = "entityUri")] + public string EntityUri { get; set; } + + /// + /// Additional information that helps to explain the resource. + /// + [JsonProperty(PropertyName = "metadata")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Collections.Generic.Dictionary Metadata { get; set; } + + } +} diff --git a/Generativeai/models/WorkRequestResourceMetadataKey.cs b/Generativeai/models/WorkRequestResourceMetadataKey.cs new file mode 100644 index 0000000000..cf9fba0f8e --- /dev/null +++ b/Generativeai/models/WorkRequestResourceMetadataKey.cs @@ -0,0 +1,25 @@ +/* + * 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 +{ + /// + /// Possible metadata keys for work request resource metadata. + /// + public enum WorkRequestResourceMetadataKey { + /// 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 = "IS_DRY_RUN")] + IsDryRun + } +} diff --git a/Generativeai/models/WorkRequestSummary.cs b/Generativeai/models/WorkRequestSummary.cs new file mode 100644 index 0000000000..4cd7b73639 --- /dev/null +++ b/Generativeai/models/WorkRequestSummary.cs @@ -0,0 +1,118 @@ +/* + * 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 information about an asynchronous work request. + /// + public class WorkRequestSummary + { + + /// + /// The asynchronous operation tracked by this work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "OperationType is required.")] + [JsonProperty(PropertyName = "operationType")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable OperationType { get; set; } + + /// + /// The status of the work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Status is required.")] + [JsonProperty(PropertyName = "status")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable Status { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The resources that are affected by this work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Resources is required.")] + [JsonProperty(PropertyName = "resources")] + public System.Collections.Generic.List Resources { get; set; } + + /// + /// Shows the progress of the operation tracked by the work request, as a percentage of the total work + /// that must be performed. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "PercentComplete is required.")] + [JsonProperty(PropertyName = "percentComplete")] + public System.Nullable PercentComplete { get; set; } + + /// + /// The date and time the work request was created, in the format defined by + /// [RFC 3339](https://tools.ietf.org/html/rfc3339). + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeAccepted is required.")] + [JsonProperty(PropertyName = "timeAccepted")] + public System.Nullable TimeAccepted { get; set; } + + /// + /// The date and time the work request was started, in the format defined by + /// [RFC 3339](https://tools.ietf.org/html/rfc3339). + /// + /// + [JsonProperty(PropertyName = "timeStarted")] + public System.Nullable TimeStarted { get; set; } + + /// + /// The date and time the work request was finished, in the format defined by + /// [RFC 3339](https://tools.ietf.org/rfc/rfc3339). + /// + /// + [JsonProperty(PropertyName = "timeFinished")] + public System.Nullable TimeFinished { get; set; } + + } +} diff --git a/Generativeai/models/WorkRequestSummaryCollection.cs b/Generativeai/models/WorkRequestSummaryCollection.cs new file mode 100644 index 0000000000..9f73802131 --- /dev/null +++ b/Generativeai/models/WorkRequestSummaryCollection.cs @@ -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 +{ + /// + /// A list of work requests. Can contain work requests and other information such as metadata. + /// + public class WorkRequestSummaryCollection + { + + /// + /// A list of work requests. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Items is required.")] + [JsonProperty(PropertyName = "items")] + public System.Collections.Generic.List Items { get; set; } + + } +} diff --git a/Generativeai/requests/ChangeDedicatedAiClusterCompartmentRequest.cs b/Generativeai/requests/ChangeDedicatedAiClusterCompartmentRequest.cs new file mode 100644 index 0000000000..38e44099c1 --- /dev/null +++ b/Generativeai/requests/ChangeDedicatedAiClusterCompartmentRequest.cs @@ -0,0 +1,73 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use ChangeDedicatedAiClusterCompartment request. + /// + public class ChangeDedicatedAiClusterCompartmentRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the dedicated AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DedicatedAiClusterId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "dedicatedAiClusterId")] + public string DedicatedAiClusterId { get; set; } + + /// + /// The information to be updated. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ChangeDedicatedAiClusterCompartmentDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public ChangeDedicatedAiClusterCompartmentDetails ChangeDedicatedAiClusterCompartmentDetails { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + /// `if-match` parameter to the value of the etag from a previous GET or POST response for + /// that resource. The resource will be updated or deleted only if the etag you provide + /// matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of running that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and removed from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + } +} diff --git a/Generativeai/requests/ChangeEndpointCompartmentRequest.cs b/Generativeai/requests/ChangeEndpointCompartmentRequest.cs new file mode 100644 index 0000000000..8579e2e342 --- /dev/null +++ b/Generativeai/requests/ChangeEndpointCompartmentRequest.cs @@ -0,0 +1,73 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use ChangeEndpointCompartment request. + /// + public class ChangeEndpointCompartmentRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + /// + /// + /// Required + /// + [Required(ErrorMessage = "EndpointId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "endpointId")] + public string EndpointId { get; set; } + + /// + /// The endpoint information to be updated. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ChangeEndpointCompartmentDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public ChangeEndpointCompartmentDetails ChangeEndpointCompartmentDetails { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + /// `if-match` parameter to the value of the etag from a previous GET or POST response for + /// that resource. The resource will be updated or deleted only if the etag you provide + /// matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of running that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and removed from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + } +} diff --git a/Generativeai/requests/ChangeModelCompartmentRequest.cs b/Generativeai/requests/ChangeModelCompartmentRequest.cs new file mode 100644 index 0000000000..290d64497b --- /dev/null +++ b/Generativeai/requests/ChangeModelCompartmentRequest.cs @@ -0,0 +1,73 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use ChangeModelCompartment request. + /// + public class ChangeModelCompartmentRequest : Oci.Common.IOciRequest + { + + /// + /// The model OCID + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "modelId")] + public string ModelId { get; set; } + + /// + /// The information to be updated. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ChangeModelCompartmentDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public ChangeModelCompartmentDetails ChangeModelCompartmentDetails { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + /// `if-match` parameter to the value of the etag from a previous GET or POST response for + /// that resource. The resource will be updated or deleted only if the etag you provide + /// matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of running that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and removed from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + } +} diff --git a/Generativeai/requests/CreateDedicatedAiClusterRequest.cs b/Generativeai/requests/CreateDedicatedAiClusterRequest.cs new file mode 100644 index 0000000000..4c0cfcf245 --- /dev/null +++ b/Generativeai/requests/CreateDedicatedAiClusterRequest.cs @@ -0,0 +1,53 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use CreateDedicatedAiCluster request. + /// + public class CreateDedicatedAiClusterRequest : Oci.Common.IOciRequest + { + + /// + /// Details for the new dedicated AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CreateDedicatedAiClusterDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public CreateDedicatedAiClusterDetails CreateDedicatedAiClusterDetails { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of running that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and removed from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/CreateEndpointRequest.cs b/Generativeai/requests/CreateEndpointRequest.cs new file mode 100644 index 0000000000..a5c946f8b3 --- /dev/null +++ b/Generativeai/requests/CreateEndpointRequest.cs @@ -0,0 +1,53 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use CreateEndpoint request. + /// + public class CreateEndpointRequest : Oci.Common.IOciRequest + { + + /// + /// Details for the new endpoint. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CreateEndpointDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public CreateEndpointDetails CreateEndpointDetails { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of running that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and removed from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/CreateModelRequest.cs b/Generativeai/requests/CreateModelRequest.cs new file mode 100644 index 0000000000..f6c7375b50 --- /dev/null +++ b/Generativeai/requests/CreateModelRequest.cs @@ -0,0 +1,53 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use CreateModel request. + /// + public class CreateModelRequest : Oci.Common.IOciRequest + { + + /// + /// Details for the new model. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CreateModelDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public CreateModelDetails CreateModelDetails { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of running that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and removed from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/DeleteDedicatedAiClusterRequest.cs b/Generativeai/requests/DeleteDedicatedAiClusterRequest.cs new file mode 100644 index 0000000000..b5efa63e4d --- /dev/null +++ b/Generativeai/requests/DeleteDedicatedAiClusterRequest.cs @@ -0,0 +1,52 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use DeleteDedicatedAiCluster request. + /// + public class DeleteDedicatedAiClusterRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the dedicated AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DedicatedAiClusterId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "dedicatedAiClusterId")] + public string DedicatedAiClusterId { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + /// `if-match` parameter to the value of the etag from a previous GET or POST response for + /// that resource. The resource will be updated or deleted only if the etag you provide + /// matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/DeleteEndpointRequest.cs b/Generativeai/requests/DeleteEndpointRequest.cs new file mode 100644 index 0000000000..de79eac116 --- /dev/null +++ b/Generativeai/requests/DeleteEndpointRequest.cs @@ -0,0 +1,52 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use DeleteEndpoint request. + /// + public class DeleteEndpointRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + /// + /// + /// Required + /// + [Required(ErrorMessage = "EndpointId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "endpointId")] + public string EndpointId { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + /// `if-match` parameter to the value of the etag from a previous GET or POST response for + /// that resource. The resource will be updated or deleted only if the etag you provide + /// matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/DeleteModelRequest.cs b/Generativeai/requests/DeleteModelRequest.cs new file mode 100644 index 0000000000..af21bb4ae8 --- /dev/null +++ b/Generativeai/requests/DeleteModelRequest.cs @@ -0,0 +1,52 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use DeleteModel request. + /// + public class DeleteModelRequest : Oci.Common.IOciRequest + { + + /// + /// The model OCID + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "modelId")] + public string ModelId { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + /// `if-match` parameter to the value of the etag from a previous GET or POST response for + /// that resource. The resource will be updated or deleted only if the etag you provide + /// matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/GetDedicatedAiClusterRequest.cs b/Generativeai/requests/GetDedicatedAiClusterRequest.cs new file mode 100644 index 0000000000..4133acb682 --- /dev/null +++ b/Generativeai/requests/GetDedicatedAiClusterRequest.cs @@ -0,0 +1,42 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use GetDedicatedAiCluster request. + /// + public class GetDedicatedAiClusterRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the dedicated AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DedicatedAiClusterId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "dedicatedAiClusterId")] + public string DedicatedAiClusterId { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/GetEndpointRequest.cs b/Generativeai/requests/GetEndpointRequest.cs new file mode 100644 index 0000000000..8b6dd69b22 --- /dev/null +++ b/Generativeai/requests/GetEndpointRequest.cs @@ -0,0 +1,42 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use GetEndpoint request. + /// + public class GetEndpointRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + /// + /// + /// Required + /// + [Required(ErrorMessage = "EndpointId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "endpointId")] + public string EndpointId { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/GetModelRequest.cs b/Generativeai/requests/GetModelRequest.cs new file mode 100644 index 0000000000..d287070a57 --- /dev/null +++ b/Generativeai/requests/GetModelRequest.cs @@ -0,0 +1,42 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use GetModel request. + /// + public class GetModelRequest : Oci.Common.IOciRequest + { + + /// + /// The model OCID + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "modelId")] + public string ModelId { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/GetWorkRequestRequest.cs b/Generativeai/requests/GetWorkRequestRequest.cs new file mode 100644 index 0000000000..86e2d25973 --- /dev/null +++ b/Generativeai/requests/GetWorkRequestRequest.cs @@ -0,0 +1,42 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use GetWorkRequest request. + /// + public class GetWorkRequestRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "WorkRequestId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "workRequestId")] + public string WorkRequestId { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/ListDedicatedAiClustersRequest.cs b/Generativeai/requests/ListDedicatedAiClustersRequest.cs new file mode 100644 index 0000000000..4a7c9bf6fc --- /dev/null +++ b/Generativeai/requests/ListDedicatedAiClustersRequest.cs @@ -0,0 +1,108 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use ListDedicatedAiClusters request. + /// + public class ListDedicatedAiClustersRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// A filter to return only the dedicated AI clusters that their lifecycle state matches the given lifecycle state. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "lifecycleState")] + public System.Nullable LifecycleState { get; set; } + + /// + /// A filter to return only resources that match the given display name exactly. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "displayName")] + public string DisplayName { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the dedicated AI cluster. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "id")] + public string Id { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "limit")] + public System.Nullable Limit { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "page")] + public string Page { get; set; } + + /// + /// The sort order to use, either 'ASC' or 'DESC'. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortOrder")] + public System.Nullable SortOrder { get; set; } + + /// + /// + /// The field to sort by. You can provide only one sort order. Default order for `timeCreated` + /// is descending. Default order for `displayName` is ascending. + /// + /// + /// + public enum SortByEnum { + [EnumMember(Value = "timeCreated")] + TimeCreated, + [EnumMember(Value = "displayName")] + DisplayName, + [EnumMember(Value = "lifecycleState")] + LifecycleState + }; + + /// + /// The field to sort by. You can provide only one sort order. Default order for `timeCreated` + /// is descending. Default order for `displayName` is ascending. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortBy")] + public System.Nullable SortBy { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/ListEndpointsRequest.cs b/Generativeai/requests/ListEndpointsRequest.cs new file mode 100644 index 0000000000..d2f5b8e7be --- /dev/null +++ b/Generativeai/requests/ListEndpointsRequest.cs @@ -0,0 +1,106 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use ListEndpoints request. + /// + public class ListEndpointsRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// A filter to return only resources that their lifecycle state matches the given lifecycle state. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "lifecycleState")] + public System.Nullable LifecycleState { get; set; } + + /// + /// A filter to return only resources that match the given display name exactly. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "displayName")] + public string DisplayName { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "id")] + public string Id { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "limit")] + public System.Nullable Limit { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "page")] + public string Page { get; set; } + + /// + /// The sort order to use, either 'ASC' or 'DESC'. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortOrder")] + public System.Nullable SortOrder { get; set; } + + /// + /// + /// The field to sort by. You can provide only one sort order. Default order for `timeCreated` + /// is descending. Default order for `displayName` is ascending. + /// + /// + /// + public enum SortByEnum { + [EnumMember(Value = "displayName")] + DisplayName, + [EnumMember(Value = "timeCreated")] + TimeCreated + }; + + /// + /// The field to sort by. You can provide only one sort order. Default order for `timeCreated` + /// is descending. Default order for `displayName` is ascending. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortBy")] + public System.Nullable SortBy { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/ListModelsRequest.cs b/Generativeai/requests/ListModelsRequest.cs new file mode 100644 index 0000000000..9385cfec48 --- /dev/null +++ b/Generativeai/requests/ListModelsRequest.cs @@ -0,0 +1,118 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use ListModels request. + /// + public class ListModelsRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// A filter to return only resources that match the entire vendor given. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "vendor")] + public string Vendor { get; set; } + + /// + /// A filter to return only resources their capability matches the given capability. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "capability", Oci.Common.Http.CollectionFormatType.Multi)] + public System.Collections.Generic.List Capability { get; set; } + + /// + /// A filter to return only resources their lifecycleState matches the given lifecycleState. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "lifecycleState")] + public System.Nullable LifecycleState { get; set; } + + /// + /// A filter to return only resources that match the given display name exactly. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "displayName")] + public string DisplayName { get; set; } + + /// + /// The ID of the model. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "id")] + public string Id { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "limit")] + public System.Nullable Limit { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "page")] + public string Page { get; set; } + + /// + /// The sort order to use, either 'ASC' or 'DESC'. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortOrder")] + public System.Nullable SortOrder { get; set; } + + /// + /// + /// The field to sort by. You can provide only one sort order. Default order for `timeCreated` is descending. + /// + /// + /// + public enum SortByEnum { + [EnumMember(Value = "displayName")] + DisplayName, + [EnumMember(Value = "lifecycleState")] + LifecycleState, + [EnumMember(Value = "timeCreated")] + TimeCreated + }; + + /// + /// The field to sort by. You can provide only one sort order. Default order for `timeCreated` is descending. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortBy")] + public System.Nullable SortBy { get; set; } + } +} diff --git a/Generativeai/requests/ListWorkRequestErrorsRequest.cs b/Generativeai/requests/ListWorkRequestErrorsRequest.cs new file mode 100644 index 0000000000..ab13933304 --- /dev/null +++ b/Generativeai/requests/ListWorkRequestErrorsRequest.cs @@ -0,0 +1,84 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use ListWorkRequestErrors request. + /// + public class ListWorkRequestErrorsRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "WorkRequestId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "workRequestId")] + public string WorkRequestId { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "page")] + public string Page { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "limit")] + public System.Nullable Limit { get; set; } + + /// + /// + /// The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending. + /// + /// + /// + public enum SortByEnum { + [EnumMember(Value = "timestamp")] + Timestamp + }; + + /// + /// The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortBy")] + public System.Nullable SortBy { get; set; } + + /// + /// The sort order to use, either 'ASC' or 'DESC'. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortOrder")] + public System.Nullable SortOrder { get; set; } + } +} diff --git a/Generativeai/requests/ListWorkRequestLogsRequest.cs b/Generativeai/requests/ListWorkRequestLogsRequest.cs new file mode 100644 index 0000000000..f372f9f885 --- /dev/null +++ b/Generativeai/requests/ListWorkRequestLogsRequest.cs @@ -0,0 +1,84 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use ListWorkRequestLogs request. + /// + public class ListWorkRequestLogsRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "WorkRequestId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "workRequestId")] + public string WorkRequestId { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "page")] + public string Page { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "limit")] + public System.Nullable Limit { get; set; } + + /// + /// + /// The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending. + /// + /// + /// + public enum SortByEnum { + [EnumMember(Value = "timestamp")] + Timestamp + }; + + /// + /// The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortBy")] + public System.Nullable SortBy { get; set; } + + /// + /// The sort order to use, either 'ASC' or 'DESC'. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortOrder")] + public System.Nullable SortOrder { get; set; } + } +} diff --git a/Generativeai/requests/ListWorkRequestsRequest.cs b/Generativeai/requests/ListWorkRequestsRequest.cs new file mode 100644 index 0000000000..73ea10f058 --- /dev/null +++ b/Generativeai/requests/ListWorkRequestsRequest.cs @@ -0,0 +1,102 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use ListWorkRequests request. + /// + public class ListWorkRequestsRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "workRequestId")] + public string WorkRequestId { get; set; } + + /// + /// A filter to return only the resources that match the given lifecycle state. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "status")] + public System.Nullable Status { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "resourceId")] + public string ResourceId { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "page")] + public string Page { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "limit")] + public System.Nullable Limit { get; set; } + + /// + /// The sort order to use, either 'ASC' or 'DESC'. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortOrder")] + public System.Nullable SortOrder { get; set; } + + /// + /// + /// The field to sort by. Only one sort order may be provided. Default order for `timeAccepted` is descending. + /// + /// + /// + public enum SortByEnum { + [EnumMember(Value = "timeAccepted")] + TimeAccepted + }; + + /// + /// The field to sort by. Only one sort order may be provided. Default order for `timeAccepted` is descending. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortBy")] + public System.Nullable SortBy { get; set; } + } +} diff --git a/Generativeai/requests/UpdateDedicatedAiClusterRequest.cs b/Generativeai/requests/UpdateDedicatedAiClusterRequest.cs new file mode 100644 index 0000000000..0bbbff80b0 --- /dev/null +++ b/Generativeai/requests/UpdateDedicatedAiClusterRequest.cs @@ -0,0 +1,62 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use UpdateDedicatedAiCluster request. + /// + public class UpdateDedicatedAiClusterRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the dedicated AI cluster. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DedicatedAiClusterId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "dedicatedAiClusterId")] + public string DedicatedAiClusterId { get; set; } + + /// + /// The information to be updated. + /// + /// + /// Required + /// + [Required(ErrorMessage = "UpdateDedicatedAiClusterDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public UpdateDedicatedAiClusterDetails UpdateDedicatedAiClusterDetails { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + /// `if-match` parameter to the value of the etag from a previous GET or POST response for + /// that resource. The resource will be updated or deleted only if the etag you provide + /// matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/UpdateEndpointRequest.cs b/Generativeai/requests/UpdateEndpointRequest.cs new file mode 100644 index 0000000000..c970cb7986 --- /dev/null +++ b/Generativeai/requests/UpdateEndpointRequest.cs @@ -0,0 +1,62 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use UpdateEndpoint request. + /// + public class UpdateEndpointRequest : Oci.Common.IOciRequest + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the endpoint. + /// + /// + /// Required + /// + [Required(ErrorMessage = "EndpointId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "endpointId")] + public string EndpointId { get; set; } + + /// + /// The information to be updated. + /// + /// + /// Required + /// + [Required(ErrorMessage = "UpdateEndpointDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public UpdateEndpointDetails UpdateEndpointDetails { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + /// `if-match` parameter to the value of the etag from a previous GET or POST response for + /// that resource. The resource will be updated or deleted only if the etag you provide + /// matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/requests/UpdateModelRequest.cs b/Generativeai/requests/UpdateModelRequest.cs new file mode 100644 index 0000000000..344aebbaec --- /dev/null +++ b/Generativeai/requests/UpdateModelRequest.cs @@ -0,0 +1,62 @@ +/* + * 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 Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Requests +{ + /// + /// Click here to see an example of how to use UpdateModel request. + /// + public class UpdateModelRequest : Oci.Common.IOciRequest + { + + /// + /// The model OCID + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "modelId")] + public string ModelId { get; set; } + + /// + /// The model information to be updated. + /// + /// + /// Required + /// + [Required(ErrorMessage = "UpdateModelDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public UpdateModelDetails UpdateModelDetails { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + /// `if-match` parameter to the value of the etag from a previous GET or POST response for + /// that resource. The resource will be updated or deleted only if the etag you provide + /// matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// The only valid characters for request IDs are letters, numbers, + /// underscore, and dash. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeai/responses/ChangeDedicatedAiClusterCompartmentResponse.cs b/Generativeai/responses/ChangeDedicatedAiClusterCompartmentResponse.cs new file mode 100644 index 0000000000..f9d080c2c1 --- /dev/null +++ b/Generativeai/responses/ChangeDedicatedAiClusterCompartmentResponse.cs @@ -0,0 +1,29 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class ChangeDedicatedAiClusterCompartmentResponse : Oci.Common.IOciResponse + { + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + + } +} diff --git a/Generativeai/responses/ChangeEndpointCompartmentResponse.cs b/Generativeai/responses/ChangeEndpointCompartmentResponse.cs new file mode 100644 index 0000000000..9db80579c2 --- /dev/null +++ b/Generativeai/responses/ChangeEndpointCompartmentResponse.cs @@ -0,0 +1,29 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class ChangeEndpointCompartmentResponse : Oci.Common.IOciResponse + { + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + + } +} diff --git a/Generativeai/responses/ChangeModelCompartmentResponse.cs b/Generativeai/responses/ChangeModelCompartmentResponse.cs new file mode 100644 index 0000000000..94731ad90d --- /dev/null +++ b/Generativeai/responses/ChangeModelCompartmentResponse.cs @@ -0,0 +1,29 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class ChangeModelCompartmentResponse : Oci.Common.IOciResponse + { + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + + } +} diff --git a/Generativeai/responses/CreateDedicatedAiClusterResponse.cs b/Generativeai/responses/CreateDedicatedAiClusterResponse.cs new file mode 100644 index 0000000000..88a6bdb5b6 --- /dev/null +++ b/Generativeai/responses/CreateDedicatedAiClusterResponse.cs @@ -0,0 +1,50 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class CreateDedicatedAiClusterResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// Use GetWorkRequest with this ID to track the status of the request. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-work-request-id")] + public string OpcWorkRequestId { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned DedicatedAiCluster instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public DedicatedAiCluster DedicatedAiCluster { get; set; } + + } +} diff --git a/Generativeai/responses/CreateEndpointResponse.cs b/Generativeai/responses/CreateEndpointResponse.cs new file mode 100644 index 0000000000..0340f72d11 --- /dev/null +++ b/Generativeai/responses/CreateEndpointResponse.cs @@ -0,0 +1,50 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class CreateEndpointResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// Use GetWorkRequest with this ID to track the status of the request. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-work-request-id")] + public string OpcWorkRequestId { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned Endpoint instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public Endpoint Endpoint { get; set; } + + } +} diff --git a/Generativeai/responses/CreateModelResponse.cs b/Generativeai/responses/CreateModelResponse.cs new file mode 100644 index 0000000000..7e0640200a --- /dev/null +++ b/Generativeai/responses/CreateModelResponse.cs @@ -0,0 +1,50 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class CreateModelResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// Use GetWorkRequest with this ID to track the status of the request. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-work-request-id")] + public string OpcWorkRequestId { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned Model instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public Model Model { get; set; } + + } +} diff --git a/Generativeai/responses/DeleteDedicatedAiClusterResponse.cs b/Generativeai/responses/DeleteDedicatedAiClusterResponse.cs new file mode 100644 index 0000000000..b9b4dfa0ae --- /dev/null +++ b/Generativeai/responses/DeleteDedicatedAiClusterResponse.cs @@ -0,0 +1,38 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class DeleteDedicatedAiClusterResponse : Oci.Common.IOciResponse + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// Use GetWorkRequest with this ID to track the status of the request. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-work-request-id")] + public string OpcWorkRequestId { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + + } +} diff --git a/Generativeai/responses/DeleteEndpointResponse.cs b/Generativeai/responses/DeleteEndpointResponse.cs new file mode 100644 index 0000000000..d49dbe2f46 --- /dev/null +++ b/Generativeai/responses/DeleteEndpointResponse.cs @@ -0,0 +1,38 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class DeleteEndpointResponse : Oci.Common.IOciResponse + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// Use GetWorkRequest with this ID to track the status of the request. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-work-request-id")] + public string OpcWorkRequestId { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + + } +} diff --git a/Generativeai/responses/DeleteModelResponse.cs b/Generativeai/responses/DeleteModelResponse.cs new file mode 100644 index 0000000000..a2bd30cfff --- /dev/null +++ b/Generativeai/responses/DeleteModelResponse.cs @@ -0,0 +1,38 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class DeleteModelResponse : Oci.Common.IOciResponse + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// Use GetWorkRequest with this ID to track the status of the request. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-work-request-id")] + public string OpcWorkRequestId { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + + } +} diff --git a/Generativeai/responses/GetDedicatedAiClusterResponse.cs b/Generativeai/responses/GetDedicatedAiClusterResponse.cs new file mode 100644 index 0000000000..46e40a5851 --- /dev/null +++ b/Generativeai/responses/GetDedicatedAiClusterResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class GetDedicatedAiClusterResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned DedicatedAiCluster instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public DedicatedAiCluster DedicatedAiCluster { get; set; } + + } +} diff --git a/Generativeai/responses/GetEndpointResponse.cs b/Generativeai/responses/GetEndpointResponse.cs new file mode 100644 index 0000000000..10a2bac45f --- /dev/null +++ b/Generativeai/responses/GetEndpointResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class GetEndpointResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned Endpoint instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public Endpoint Endpoint { get; set; } + + } +} diff --git a/Generativeai/responses/GetModelResponse.cs b/Generativeai/responses/GetModelResponse.cs new file mode 100644 index 0000000000..f6ece40ad7 --- /dev/null +++ b/Generativeai/responses/GetModelResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class GetModelResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned Model instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public Model Model { get; set; } + + } +} diff --git a/Generativeai/responses/GetWorkRequestResponse.cs b/Generativeai/responses/GetWorkRequestResponse.cs new file mode 100644 index 0000000000..e6116004c6 --- /dev/null +++ b/Generativeai/responses/GetWorkRequestResponse.cs @@ -0,0 +1,48 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class GetWorkRequestResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + /// + /// A decimal number representing the number of seconds the client should wait before polling this endpoint again. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "retry-after")] + public System.Nullable RetryAfter { get; set; } + + /// + /// The returned WorkRequest instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public WorkRequest WorkRequest { get; set; } + + } +} diff --git a/Generativeai/responses/ListDedicatedAiClustersResponse.cs b/Generativeai/responses/ListDedicatedAiClustersResponse.cs new file mode 100644 index 0000000000..0965b674da --- /dev/null +++ b/Generativeai/responses/ListDedicatedAiClustersResponse.cs @@ -0,0 +1,42 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class ListDedicatedAiClustersResponse : Oci.Common.IOciResponse + { + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + /// + /// For list pagination. When this header appears in the response, additional pages of results remain. For + /// important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-next-page")] + public string OpcNextPage { get; set; } + + /// + /// The returned DedicatedAiClusterCollection instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public DedicatedAiClusterCollection DedicatedAiClusterCollection { get; set; } + + } +} diff --git a/Generativeai/responses/ListEndpointsResponse.cs b/Generativeai/responses/ListEndpointsResponse.cs new file mode 100644 index 0000000000..e90ffe575c --- /dev/null +++ b/Generativeai/responses/ListEndpointsResponse.cs @@ -0,0 +1,42 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class ListEndpointsResponse : Oci.Common.IOciResponse + { + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + /// + /// For list pagination. When this header appears in the response, additional pages of results remain. For + /// important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-next-page")] + public string OpcNextPage { get; set; } + + /// + /// The returned EndpointCollection instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public EndpointCollection EndpointCollection { get; set; } + + } +} diff --git a/Generativeai/responses/ListModelsResponse.cs b/Generativeai/responses/ListModelsResponse.cs new file mode 100644 index 0000000000..c668a4f28b --- /dev/null +++ b/Generativeai/responses/ListModelsResponse.cs @@ -0,0 +1,42 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class ListModelsResponse : Oci.Common.IOciResponse + { + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + /// + /// For list pagination. When this header appears in the response, additional pages of results remain. For + /// important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-next-page")] + public string OpcNextPage { get; set; } + + /// + /// The returned ModelCollection instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public ModelCollection ModelCollection { get; set; } + + } +} diff --git a/Generativeai/responses/ListWorkRequestErrorsResponse.cs b/Generativeai/responses/ListWorkRequestErrorsResponse.cs new file mode 100644 index 0000000000..317aef76c8 --- /dev/null +++ b/Generativeai/responses/ListWorkRequestErrorsResponse.cs @@ -0,0 +1,42 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class ListWorkRequestErrorsResponse : Oci.Common.IOciResponse + { + + /// + /// For list pagination. When this header appears in the response, additional pages of results remain. For + /// important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-next-page")] + public string OpcNextPage { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned WorkRequestErrorCollection instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public WorkRequestErrorCollection WorkRequestErrorCollection { get; set; } + + } +} diff --git a/Generativeai/responses/ListWorkRequestLogsResponse.cs b/Generativeai/responses/ListWorkRequestLogsResponse.cs new file mode 100644 index 0000000000..a22e12f7c3 --- /dev/null +++ b/Generativeai/responses/ListWorkRequestLogsResponse.cs @@ -0,0 +1,42 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class ListWorkRequestLogsResponse : Oci.Common.IOciResponse + { + + /// + /// For list pagination. When this header appears in the response, additional pages of results remain. For + /// important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-next-page")] + public string OpcNextPage { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned WorkRequestLogEntryCollection instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public WorkRequestLogEntryCollection WorkRequestLogEntryCollection { get; set; } + + } +} diff --git a/Generativeai/responses/ListWorkRequestsResponse.cs b/Generativeai/responses/ListWorkRequestsResponse.cs new file mode 100644 index 0000000000..d4d2ddab01 --- /dev/null +++ b/Generativeai/responses/ListWorkRequestsResponse.cs @@ -0,0 +1,42 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class ListWorkRequestsResponse : Oci.Common.IOciResponse + { + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + /// + /// For list pagination. When this header appears in the response, additional pages of results remain. For + /// important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-next-page")] + public string OpcNextPage { get; set; } + + /// + /// The returned WorkRequestSummaryCollection instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public WorkRequestSummaryCollection WorkRequestSummaryCollection { get; set; } + + } +} diff --git a/Generativeai/responses/UpdateDedicatedAiClusterResponse.cs b/Generativeai/responses/UpdateDedicatedAiClusterResponse.cs new file mode 100644 index 0000000000..4c7000630e --- /dev/null +++ b/Generativeai/responses/UpdateDedicatedAiClusterResponse.cs @@ -0,0 +1,50 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class UpdateDedicatedAiClusterResponse : Oci.Common.IOciResponse + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// Use GetWorkRequest with this ID to track the status of the request. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-work-request-id")] + public string OpcWorkRequestId { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + /// + /// The returned DedicatedAiCluster instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public DedicatedAiCluster DedicatedAiCluster { get; set; } + + } +} diff --git a/Generativeai/responses/UpdateEndpointResponse.cs b/Generativeai/responses/UpdateEndpointResponse.cs new file mode 100644 index 0000000000..54db17f4e6 --- /dev/null +++ b/Generativeai/responses/UpdateEndpointResponse.cs @@ -0,0 +1,50 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class UpdateEndpointResponse : Oci.Common.IOciResponse + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + /// Use GetWorkRequest with this ID to track the status of the request. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-work-request-id")] + public string OpcWorkRequestId { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + /// + /// The returned Endpoint instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public Endpoint Endpoint { get; set; } + + } +} diff --git a/Generativeai/responses/UpdateModelResponse.cs b/Generativeai/responses/UpdateModelResponse.cs new file mode 100644 index 0000000000..3e70aa5171 --- /dev/null +++ b/Generativeai/responses/UpdateModelResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiService.Models; + +namespace Oci.GenerativeaiService.Responses +{ + public class UpdateModelResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned Model instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public Model Model { get; set; } + + } +} diff --git a/Generativeaiinference/GenerativeAiInferenceClient.cs b/Generativeaiinference/GenerativeAiInferenceClient.cs new file mode 100644 index 0000000000..b26d7bfeb1 --- /dev/null +++ b/Generativeaiinference/GenerativeAiInferenceClient.cs @@ -0,0 +1,243 @@ +/* + * 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; +using System.Diagnostics; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Oci.Common; +using Oci.Common.DeveloperToolConfigurations; +using Oci.Common.Model; +using Oci.Common.Auth; +using Oci.Common.Retry; +using Oci.GenerativeaiinferenceService.Requests; +using Oci.GenerativeaiinferenceService.Responses; + +namespace Oci.GenerativeaiinferenceService +{ + /// Service client instance for GenerativeAiInference. + public class GenerativeAiInferenceClient : RegionalClientBase + { + private readonly RetryConfiguration retryConfiguration; + private const string basePathWithoutHost = "/20231130"; + + /// + /// Creates a new service instance using the given authentication provider and/or client configuration and/or endpoint. + /// A client configuration can also be provided optionally to adjust REST client behaviors. + /// + /// The authentication details provider. Required. + /// The client configuration that contains settings to adjust REST client behaviors. Optional. + /// The endpoint of the service. If not provided and the client is a regional client, the endpoint will be constructed based on region information. Optional. + public GenerativeAiInferenceClient(IBasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration clientConfiguration = null, string endpoint = null) + : base(authenticationDetailsProvider, clientConfiguration) + { + if (!DeveloperToolConfiguration.IsServiceEnabled("generativeaiinference")) + { + throw new ArgumentException("The DeveloperToolConfiguration disabled this service, this behavior is controlled by DeveloperToolConfiguration.OciEnabledServiceSet variable. Please check if your local DeveloperToolConfiguration file has configured the service you're targeting or contact the cloud provider on the availability of this service"); + } + service = new Service + { + ServiceName = "GENERATIVEAIINFERENCE", + ServiceEndpointPrefix = "", + ServiceEndpointTemplate = "https://inference.generativeai.{region}.oci.{secondLevelDomain}" + }; + + ClientConfiguration clientConfigurationToUse = clientConfiguration ?? new ClientConfiguration(); + + if (authenticationDetailsProvider is IRegionProvider) + { + // Use region from Authentication details provider. + SetRegion(((IRegionProvider)authenticationDetailsProvider).Region); + } + + if (endpoint != null) + { + logger.Info($"Using endpoint specified \"{endpoint}\"."); + SetEndpoint(endpoint); + } + + this.retryConfiguration = clientConfigurationToUse.RetryConfiguration; + } + + /// + /// Produces embeddings for the inputs. + /// <br/> + /// An embedding is numeric representation of a piece of text. This text can be a phrase, a sentence, or one or more paragraphs. The Generative AI embedding model transforms each phrase, sentence, or paragraph that you input, into an array with 1024 numbers. You can use these embeddings for finding similarity in your input text such as finding phrases that are similar in context or category. Embeddings are mostly used for semantic searches where the search function focuses on the meaning of the text that it's searching through rather than finding results based on keywords. + /// + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use EmbedText API. + public async Task EmbedText(EmbedTextRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called embedText"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/actions/embedText".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAiInference", + OperationName = "EmbedText", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"EmbedText failed with error: {e.Message}"); + throw; + } + } + + /// + /// Generates a text response based on the user prompt. + /// + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use GenerateText API. + public async Task GenerateText(GenerateTextRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called generateText"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/actions/generateText".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAiInference", + OperationName = "GenerateText", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"GenerateText failed with error: {e.Message}"); + throw; + } + } + + /// + /// Summarizes the input text. + /// + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use SummarizeText API. + public async Task SummarizeText(SummarizeTextRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called summarizeText"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/actions/summarizeText".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "GenerativeAiInference", + OperationName = "SummarizeText", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"SummarizeText failed with error: {e.Message}"); + throw; + } + } + + } +} diff --git a/Generativeaiinference/OCI.DotNetSDK.Generativeaiinference.csproj b/Generativeaiinference/OCI.DotNetSDK.Generativeaiinference.csproj new file mode 100644 index 0000000000..93d5d3984d --- /dev/null +++ b/Generativeaiinference/OCI.DotNetSDK.Generativeaiinference.csproj @@ -0,0 +1,19 @@ + + + + + {53BE60ED-195A-4DC7-8242-7786B718E3A5} + Library + netstandard2.0 + 8.0 + OCI.DotNetSDK.Generativeaiinference + Oci.GenerativeaiinferenceService + Oracle Cloud Infrastructure + Oracle + Oracle;OCI;Oracle Cloud;OracleCloud;oci-sdk;OracleCloudInfrastructure;Generativeaiinference + Oracle Cloud Infrastructure Cloud Generative Ai Inference Service + + + + + diff --git a/Generativeaiinference/README.md b/Generativeaiinference/README.md new file mode 100644 index 0000000000..0632116875 --- /dev/null +++ b/Generativeaiinference/README.md @@ -0,0 +1,20 @@ + +# OCI .NET client for Generative Ai Inference Service + +This module enables you to write code to manage resources for Generative Ai Inference 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.Generativeaiinference +``` diff --git a/Generativeaiinference/models/Choice.cs b/Generativeaiinference/models/Choice.cs new file mode 100644 index 0000000000..780f915aca --- /dev/null +++ b/Generativeaiinference/models/Choice.cs @@ -0,0 +1,61 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// Represents a single instance of generated text. + /// + public class Choice + { + + /// + /// The index of the generated text. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Index is required.")] + [JsonProperty(PropertyName = "index")] + public System.Nullable Index { get; set; } + + /// + /// The generated text. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Text is required.")] + [JsonProperty(PropertyName = "text")] + public string Text { get; set; } + + /// + /// The reason why the model stopped generating tokens. + ///
+ /// Stops if the model hits a natural stop point or a provided stop sequence. Returns the length if the tokens reach the specified maximum number of tokens. + /// + ///
+ /// + /// Required + /// + [Required(ErrorMessage = "FinishReason is required.")] + [JsonProperty(PropertyName = "finishReason")] + public string FinishReason { get; set; } + + [JsonProperty(PropertyName = "logprobs")] + public Logprobs Logprobs { get; set; } + + } +} diff --git a/Generativeaiinference/models/CohereLlmInferenceRequest.cs b/Generativeaiinference/models/CohereLlmInferenceRequest.cs new file mode 100644 index 0000000000..11df0a2ae3 --- /dev/null +++ b/Generativeaiinference/models/CohereLlmInferenceRequest.cs @@ -0,0 +1,150 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// Details for the text generation request for Cohere models. + /// + public class CohereLlmInferenceRequest : LlmInferenceRequest + { + + /// + /// Represents the prompt to be completed. The trailing white spaces are trimmed before completion. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Prompt is required.")] + [JsonProperty(PropertyName = "prompt")] + public string Prompt { get; set; } + + /// + /// Whether to stream back partial progress. If set, tokens are sent as data-only server-sent events as they become available. + /// + [JsonProperty(PropertyName = "isStream")] + public System.Nullable IsStream { get; set; } + + /// + /// The number of generated texts that will be returned. + /// + [JsonProperty(PropertyName = "numGenerations")] + public System.Nullable NumGenerations { get; set; } + + /// + /// Whether or not to return the user prompt in the response. This option only applies to non-stream results. + /// + [JsonProperty(PropertyName = "isEcho")] + public System.Nullable IsEcho { get; set; } + + /// + /// The maximum number of tokens to predict for each response. Includes input plus output tokens. + /// + [JsonProperty(PropertyName = "maxTokens")] + public System.Nullable MaxTokens { get; set; } + + /// + /// A number that sets the randomness of the generated output. A lower temperature means a less random generations. + ///
+ /// Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. + /// + ///
+ [JsonProperty(PropertyName = "temperature")] + public System.Double Temperature { get; set; } + + /// + /// An integer that sets up the model to use only the top k most likely tokens in the generated output. A higher k introduces more randomness into the output making the output text sound more natural. Default value is 0 which disables this method and considers all tokens. To set a number for the likely tokens, choose an integer between 1 and 500. + ///
+ /// If also using top p, then the model considers only the top tokens whose probabilities add up to p percent and ignores the rest of the k tokens. For example, if k is 20, but the probabilities of the top 10 add up to .75, then only the top 10 tokens are chosen. + /// + ///
+ [JsonProperty(PropertyName = "topK")] + public System.Nullable TopK { get; set; } + + /// + /// If set to a probability 0.0 < p < 1.0, it ensures that only the most likely tokens, with total probability mass of p, are considered for generation at each step. + ///
+ /// To eliminate tokens with low likelihood, assign p a minimum percentage for the next token's likelihood. For example, when p is set to 0.75, the model eliminates the bottom 25 percent for the next token. Set to 1.0 to consider all tokens and set to 0 to disable. If both k and p are enabled, p acts after k. + /// + ///
+ [JsonProperty(PropertyName = "topP")] + public System.Double TopP { get; set; } + + /// + /// To reduce repetitiveness of generated tokens, this number penalizes new tokens based on their frequency in the generated text so far. Greater numbers encourage the model to use new tokens, while lower numbers encourage the model to repeat the tokens. Set to 0 to disable. + /// + /// + [JsonProperty(PropertyName = "frequencyPenalty")] + public System.Double FrequencyPenalty { get; set; } + + /// + /// To reduce repetitiveness of generated tokens, this number penalizes new tokens based on whether they've appeared in the generated text so far. Greater numbers encourage the model to use new tokens, while lower numbers encourage the model to repeat the tokens. + ///
+ /// Similar to frequency penalty, a penalty is applied to previously present tokens, except that this penalty is applied equally to all tokens that have already appeared, regardless of how many times they've appeared. Set to 0 to disable. + /// + ///
+ [JsonProperty(PropertyName = "presencePenalty")] + public System.Double PresencePenalty { get; set; } + + /// + /// The generated text is cut at the end of the earliest occurrence of this stop sequence. The generated text will include this stop sequence. + /// + [JsonProperty(PropertyName = "stopSequences")] + public System.Collections.Generic.List StopSequences { get; set; } + /// + /// + /// Specifies how and if the token likelihoods are returned with the response. + /// + /// + public enum ReturnLikelihoodsEnum { + [EnumMember(Value = "NONE")] + None, + [EnumMember(Value = "ALL")] + All, + [EnumMember(Value = "GENERATION")] + Generation + }; + + /// + /// Specifies how and if the token likelihoods are returned with the response. + /// + [JsonProperty(PropertyName = "returnLikelihoods")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable ReturnLikelihoods { get; set; } + /// + /// + /// For an input that's longer than the maximum token length, specifies which part of the input text will be truncated. + /// + /// + public enum TruncateEnum { + [EnumMember(Value = "NONE")] + None, + [EnumMember(Value = "START")] + Start, + [EnumMember(Value = "END")] + End + }; + + /// + /// For an input that's longer than the maximum token length, specifies which part of the input text will be truncated. + /// + [JsonProperty(PropertyName = "truncate")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable Truncate { get; set; } + + [JsonProperty(PropertyName = "runtimeType")] + private readonly string runtimeType = "COHERE"; + } +} diff --git a/Generativeaiinference/models/CohereLlmInferenceResponse.cs b/Generativeaiinference/models/CohereLlmInferenceResponse.cs new file mode 100644 index 0000000000..7b879ff84f --- /dev/null +++ b/Generativeaiinference/models/CohereLlmInferenceResponse.cs @@ -0,0 +1,53 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// The generated text result to return. + /// + public class CohereLlmInferenceResponse : LlmInferenceResponse + { + + /// + /// Each prompt in the input array has an array of GeneratedText, controlled by numGenerations parameter in the request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "GeneratedTexts is required.")] + [JsonProperty(PropertyName = "generatedTexts")] + public System.Collections.Generic.List GeneratedTexts { get; set; } + + /// + /// The date and time that the model was created in an RFC3339 formatted datetime string. + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeCreated is required.")] + [JsonProperty(PropertyName = "timeCreated")] + public System.Nullable TimeCreated { get; set; } + + /// + /// Represents the original prompt. Applies only to non-stream responses. + /// + [JsonProperty(PropertyName = "prompt")] + public string Prompt { get; set; } + + [JsonProperty(PropertyName = "runtimeType")] + private readonly string runtimeType = "COHERE"; + } +} diff --git a/Generativeaiinference/models/DedicatedServingMode.cs b/Generativeaiinference/models/DedicatedServingMode.cs new file mode 100644 index 0000000000..43b2a1d483 --- /dev/null +++ b/Generativeaiinference/models/DedicatedServingMode.cs @@ -0,0 +1,37 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// The model's serving mode is dedicated serving and has an endpoint on a dedicated AI cluster. + /// + public class DedicatedServingMode : ServingMode + { + + /// + /// The OCID of the endpoint to use. + /// + /// + /// Required + /// + [Required(ErrorMessage = "EndpointId is required.")] + [JsonProperty(PropertyName = "endpointId")] + public string EndpointId { get; set; } + + [JsonProperty(PropertyName = "servingType")] + private readonly string servingType = "DEDICATED"; + } +} diff --git a/Generativeaiinference/models/EmbedTextDetails.cs b/Generativeaiinference/models/EmbedTextDetails.cs new file mode 100644 index 0000000000..1149464c6c --- /dev/null +++ b/Generativeaiinference/models/EmbedTextDetails.cs @@ -0,0 +1,100 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// Details for the request to embed texts. + /// + public class EmbedTextDetails + { + + /// + /// The list of strings for embeddings. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Inputs is required.")] + [JsonProperty(PropertyName = "inputs")] + public System.Collections.Generic.List Inputs { get; set; } + + /// + /// Required + /// + [Required(ErrorMessage = "ServingMode is required.")] + [JsonProperty(PropertyName = "servingMode")] + public ServingMode ServingMode { get; set; } + + /// + /// The OCID of compartment that the user is authorized to use to call into the Generative AI service. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// Whether or not to include the original inputs in the response. Results are index-based. + /// + [JsonProperty(PropertyName = "isEcho")] + public System.Nullable IsEcho { get; set; } + /// + /// + /// For an input that's longer than the maximum token length, specifies which part of the input text will be truncated. + /// + /// + public enum TruncateEnum { + [EnumMember(Value = "NONE")] + None, + [EnumMember(Value = "START")] + Start, + [EnumMember(Value = "END")] + End + }; + + /// + /// For an input that's longer than the maximum token length, specifies which part of the input text will be truncated. + /// + [JsonProperty(PropertyName = "truncate")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable Truncate { get; set; } + /// + /// + /// Specifies the input type. + /// + /// + public enum InputTypeEnum { + [EnumMember(Value = "SEARCH_DOCUMENT")] + SearchDocument, + [EnumMember(Value = "SEARCH_QUERY")] + SearchQuery, + [EnumMember(Value = "CLASSIFICATION")] + Classification, + [EnumMember(Value = "CLUSTERING")] + Clustering + }; + + /// + /// Specifies the input type. + /// + [JsonProperty(PropertyName = "inputType")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable InputType { get; set; } + + } +} diff --git a/Generativeaiinference/models/EmbedTextResult.cs b/Generativeaiinference/models/EmbedTextResult.cs new file mode 100644 index 0000000000..b7d3f83938 --- /dev/null +++ b/Generativeaiinference/models/EmbedTextResult.cs @@ -0,0 +1,63 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// The generated embedded result to return. + /// + public class EmbedTextResult + { + + /// + /// A unique identifier for the generated result. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// The original inputs. Only present if \"isEcho\" is set to true. + /// + [JsonProperty(PropertyName = "inputs")] + public System.Collections.Generic.List Inputs { get; set; } + + /// + /// The embeddings corresponding to inputs. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Embeddings is required.")] + [JsonProperty(PropertyName = "embeddings")] + public System.Collections.Generic.List> Embeddings { get; set; } + + /// + /// The OCID of the model used in this inference request. + /// + [JsonProperty(PropertyName = "modelId")] + public string ModelId { get; set; } + + /// + /// The version of the model. + /// + [JsonProperty(PropertyName = "modelVersion")] + public string ModelVersion { get; set; } + + } +} diff --git a/Generativeaiinference/models/GenerateTextDetails.cs b/Generativeaiinference/models/GenerateTextDetails.cs new file mode 100644 index 0000000000..b2d6209138 --- /dev/null +++ b/Generativeaiinference/models/GenerateTextDetails.cs @@ -0,0 +1,49 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// Details for the request to generate text. + /// + public class GenerateTextDetails + { + + /// + /// The OCID of compartment that the user is authorized to use to call into the Generative AI service. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// Required + /// + [Required(ErrorMessage = "ServingMode is required.")] + [JsonProperty(PropertyName = "servingMode")] + public ServingMode ServingMode { get; set; } + + /// + /// Required + /// + [Required(ErrorMessage = "InferenceRequest is required.")] + [JsonProperty(PropertyName = "inferenceRequest")] + public LlmInferenceRequest InferenceRequest { get; set; } + + } +} diff --git a/Generativeaiinference/models/GenerateTextResult.cs b/Generativeaiinference/models/GenerateTextResult.cs new file mode 100644 index 0000000000..6cf8f4e9eb --- /dev/null +++ b/Generativeaiinference/models/GenerateTextResult.cs @@ -0,0 +1,52 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// The generated text result to return. + /// + public class GenerateTextResult + { + + /// + /// The OCID of the model used in this inference request. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelId is required.")] + [JsonProperty(PropertyName = "modelId")] + public string ModelId { get; set; } + + /// + /// The version of the model. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelVersion is required.")] + [JsonProperty(PropertyName = "modelVersion")] + public string ModelVersion { get; set; } + + /// + /// Required + /// + [Required(ErrorMessage = "InferenceResponse is required.")] + [JsonProperty(PropertyName = "inferenceResponse")] + public LlmInferenceResponse InferenceResponse { get; set; } + + } +} diff --git a/Generativeaiinference/models/GeneratedText.cs b/Generativeaiinference/models/GeneratedText.cs new file mode 100644 index 0000000000..dd7bc6589f --- /dev/null +++ b/Generativeaiinference/models/GeneratedText.cs @@ -0,0 +1,73 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// The text generated during each run. + /// + public class GeneratedText + { + + /// + /// A unique identifier for this text generation. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// The generated text. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Text is required.")] + [JsonProperty(PropertyName = "text")] + public string Text { get; set; } + + /// + /// The overall likelihood of the generated text. + ///
+ /// When a large language model generates a new token for the output text, a likelihood is assigned to all tokens, where tokens with higher likelihoods are more likely to follow the current token. For example, it's more likely that the word favorite is followed by the word food or book rather than the word zebra. A lower likelihood means that it's less likely that token follows the current token. + /// + ///
+ /// + /// Required + /// + [Required(ErrorMessage = "Likelihood is required.")] + [JsonProperty(PropertyName = "likelihood")] + public System.Double Likelihood { get; set; } + + /// + /// The reason why the model stopped generating tokens. + ///
+ /// A model stops generating tokens if the model hits a natural stop point or reaches a provided stop sequence. + /// + ///
+ [JsonProperty(PropertyName = "finishReason")] + public string FinishReason { get; set; } + + /// + /// A collection of generated tokens and their corresponding likelihoods. + /// + [JsonProperty(PropertyName = "tokenLikelihoods")] + public System.Collections.Generic.List TokenLikelihoods { get; set; } + + } +} diff --git a/Generativeaiinference/models/LlamaLlmInferenceRequest.cs b/Generativeaiinference/models/LlamaLlmInferenceRequest.cs new file mode 100644 index 0000000000..611de3d025 --- /dev/null +++ b/Generativeaiinference/models/LlamaLlmInferenceRequest.cs @@ -0,0 +1,114 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// Details for the text generation request for Llama models. + /// + public class LlamaLlmInferenceRequest : LlmInferenceRequest + { + + /// + /// Represents the prompt to be completed. The trailing white spaces are trimmed before completion. + /// + [JsonProperty(PropertyName = "prompt")] + public string Prompt { get; set; } + + /// + /// Whether to stream back partial progress. If set, tokens are sent as data-only server-sent events as they become available. + /// + [JsonProperty(PropertyName = "isStream")] + public System.Nullable IsStream { get; set; } + + /// + /// The number of of generated texts that will be returned. + /// + [JsonProperty(PropertyName = "numGenerations")] + public System.Nullable NumGenerations { get; set; } + + /// + /// Whether or not to return the user prompt in the response. Applies only to non-stream results. + /// + [JsonProperty(PropertyName = "isEcho")] + public System.Nullable IsEcho { get; set; } + + /// + /// An integer that sets up the model to use only the top k most likely tokens in the generated output. A higher k introduces more randomness into the output making the output text sound more natural. Default value is -1 which means to consider all tokens. Setting to 0 disables this method and considers all tokens. + ///
+ /// If also using top p, then the model considers only the top tokens whose probabilities add up to p percent and ignores the rest of the k tokens. For example, if k is 20, but the probabilities of the top 10 add up to .75, then only the top 10 tokens are chosen. + /// + ///
+ [JsonProperty(PropertyName = "topK")] + public System.Nullable TopK { get; set; } + + /// + /// If set to a probability 0.0 < p < 1.0, it ensures that only the most likely tokens, with total probability mass of p, are considered for generation at each step. + ///
+ /// To eliminate tokens with low likelihood, assign p a minimum percentage for the next token's likelihood. For example, when p is set to 0.75, the model eliminates the bottom 25 percent for the next token. Set to 1 to consider all tokens and set to 0 to disable. If both k and p are enabled, p acts after k. + /// + ///
+ [JsonProperty(PropertyName = "topP")] + public System.Double TopP { get; set; } + + /// + /// A number that sets the randomness of the generated output. A lower temperature means a less random generations. + ///
+ /// Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. + /// + ///
+ [JsonProperty(PropertyName = "temperature")] + public System.Double Temperature { get; set; } + + /// + /// To reduce repetitiveness of generated tokens, this number penalizes new tokens based on their frequency in the generated text so far. Values > 0 encourage the model to use new tokens and values < 0 encourage the model to repeat tokens. Set to 0 to disable. + /// + [JsonProperty(PropertyName = "frequencyPenalty")] + public System.Double FrequencyPenalty { get; set; } + + /// + /// To reduce repetitiveness of generated tokens, this number penalizes new tokens based on whether they've appeared in the generated text so far. Values > 0 encourage the model to use new tokens and values < 0 encourage the model to repeat tokens. + ///
+ /// Similar to frequency penalty, a penalty is applied to previously present tokens, except that this penalty is applied equally to all tokens that have already appeared, regardless of how many times they've appeared. Set to 0 to disable. + /// + ///
+ [JsonProperty(PropertyName = "presencePenalty")] + public System.Double PresencePenalty { get; set; } + + /// + /// List of strings that stop the generation if they are generated for the response text. The returned output will not contain the stop strings. + /// + [JsonProperty(PropertyName = "stop")] + public System.Collections.Generic.List Stop { get; set; } + + /// + /// Includes the logarithmic probabilities for the most likely output tokens and the chosen tokens. + ///
+ /// For example, if the log probability is 5, the API returns a list of the 5 most likely tokens. The API returns the log probability of the sampled token, so there might be up to logprobs+1 elements in the response. + /// + ///
+ [JsonProperty(PropertyName = "logProbs")] + public System.Nullable LogProbs { get; set; } + + /// + /// The maximum number of tokens to predict for each response. Includes input plus output tokens. + /// + [JsonProperty(PropertyName = "maxTokens")] + public System.Nullable MaxTokens { get; set; } + + [JsonProperty(PropertyName = "runtimeType")] + private readonly string runtimeType = "LLAMA"; + } +} diff --git a/Generativeaiinference/models/LlamaLlmInferenceResponse.cs b/Generativeaiinference/models/LlamaLlmInferenceResponse.cs new file mode 100644 index 0000000000..b2138226ce --- /dev/null +++ b/Generativeaiinference/models/LlamaLlmInferenceResponse.cs @@ -0,0 +1,47 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// The generated text result to return. + /// + public class LlamaLlmInferenceResponse : LlmInferenceResponse + { + + /// + /// The Unix timestamp (in seconds) of when the generation was created. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Created is required.")] + [JsonProperty(PropertyName = "created")] + public System.Nullable Created { get; set; } + + /// + /// A list of generated texts. Can be more than one if n is greater than 1. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Choices is required.")] + [JsonProperty(PropertyName = "choices")] + public System.Collections.Generic.List Choices { get; set; } + + [JsonProperty(PropertyName = "runtimeType")] + private readonly string runtimeType = "LLAMA"; + } +} diff --git a/Generativeaiinference/models/LlmInferenceRequest.cs b/Generativeaiinference/models/LlmInferenceRequest.cs new file mode 100644 index 0000000000..13f5eb4860 --- /dev/null +++ b/Generativeaiinference/models/LlmInferenceRequest.cs @@ -0,0 +1,70 @@ +/* + * 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; +using Newtonsoft.Json.Linq; + +namespace Oci.GenerativeaiinferenceService.Models +{ + /// + /// The base class for the inference requests. + /// + [JsonConverter(typeof(LlmInferenceRequestModelConverter))] + public class LlmInferenceRequest + { + /// + /// + /// The runtime of the provided model. + /// + /// + public enum RuntimeTypeEnum { + [EnumMember(Value = "COHERE")] + Cohere, + [EnumMember(Value = "LLAMA")] + Llama + }; + + + } + + public class LlmInferenceRequestModelConverter : JsonConverter + { + public override bool CanWrite => false; + public override bool CanRead => true; + public override bool CanConvert(System.Type type) + { + return type == typeof(LlmInferenceRequest); + } + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + throw new System.InvalidOperationException("Use default serialization."); + } + + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + var jsonObject = JObject.Load(reader); + var obj = default(LlmInferenceRequest); + var discriminator = jsonObject["runtimeType"].Value(); + switch (discriminator) + { + case "LLAMA": + obj = new LlamaLlmInferenceRequest(); + break; + case "COHERE": + obj = new CohereLlmInferenceRequest(); + break; + } + serializer.Populate(jsonObject.CreateReader(), obj); + return obj; + } + } +} diff --git a/Generativeaiinference/models/LlmInferenceResponse.cs b/Generativeaiinference/models/LlmInferenceResponse.cs new file mode 100644 index 0000000000..562a0ba41d --- /dev/null +++ b/Generativeaiinference/models/LlmInferenceResponse.cs @@ -0,0 +1,78 @@ +/* + * 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; +using Newtonsoft.Json.Linq; + +namespace Oci.GenerativeaiinferenceService.Models +{ + /// + /// The base class for inference responses. + /// + [JsonConverter(typeof(LlmInferenceResponseModelConverter))] + public class LlmInferenceResponse + { + /// + /// + /// The runtime of the provided model. + /// + /// + public enum RuntimeTypeEnum { + [EnumMember(Value = "COHERE")] + Cohere, + [EnumMember(Value = "LLAMA")] + Llama + }; + + + } + + public class LlmInferenceResponseModelConverter : JsonConverter + { + private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); + public override bool CanWrite => false; + public override bool CanRead => true; + public override bool CanConvert(System.Type type) + { + return type == typeof(LlmInferenceResponse); + } + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + throw new System.InvalidOperationException("Use default serialization."); + } + + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + var jsonObject = JObject.Load(reader); + var obj = default(LlmInferenceResponse); + var discriminator = jsonObject["runtimeType"].Value(); + switch (discriminator) + { + case "LLAMA": + obj = new LlamaLlmInferenceResponse(); + break; + case "COHERE": + obj = new CohereLlmInferenceResponse(); + break; + } + if (obj != null) + { + serializer.Populate(jsonObject.CreateReader(), obj); + } + else + { + logger.Warn($"The type {discriminator} is not present under LlmInferenceResponse! Returning null value."); + } + return obj; + } + } +} diff --git a/Generativeaiinference/models/Logprobs.cs b/Generativeaiinference/models/Logprobs.cs new file mode 100644 index 0000000000..553092b9e9 --- /dev/null +++ b/Generativeaiinference/models/Logprobs.cs @@ -0,0 +1,49 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// Returns if the logarithmic probabilites is set. + /// + public class Logprobs + { + + /// + /// The text offset. + /// + [JsonProperty(PropertyName = "textOffset")] + public System.Collections.Generic.List TextOffset { get; set; } + + /// + /// The logarithmic probabilites of the output token. + /// + [JsonProperty(PropertyName = "tokenLogprobs")] + public System.Collections.Generic.List TokenLogprobs { get; set; } + + /// + /// The list of output tokens. + /// + [JsonProperty(PropertyName = "tokens")] + public System.Collections.Generic.List Tokens { get; set; } + + /// + /// The logarithmic probabilities of each of the top k tokens. + /// + [JsonProperty(PropertyName = "topLogprobs")] + public System.Collections.Generic.List> TopLogprobs { get; set; } + + } +} diff --git a/Generativeaiinference/models/OnDemandServingMode.cs b/Generativeaiinference/models/OnDemandServingMode.cs new file mode 100644 index 0000000000..61e0fd7ffc --- /dev/null +++ b/Generativeaiinference/models/OnDemandServingMode.cs @@ -0,0 +1,37 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// The model's serving mode is on-demand serving on a shared infrastructure. + /// + public class OnDemandServingMode : ServingMode + { + + /// + /// The unique ID of a model to use. Can use list Models API to list available models. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ModelId is required.")] + [JsonProperty(PropertyName = "modelId")] + public string ModelId { get; set; } + + [JsonProperty(PropertyName = "servingType")] + private readonly string servingType = "ON_DEMAND"; + } +} diff --git a/Generativeaiinference/models/ServingMode.cs b/Generativeaiinference/models/ServingMode.cs new file mode 100644 index 0000000000..a7860c5f4e --- /dev/null +++ b/Generativeaiinference/models/ServingMode.cs @@ -0,0 +1,70 @@ +/* + * 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; +using Newtonsoft.Json.Linq; + +namespace Oci.GenerativeaiinferenceService.Models +{ + /// + /// The model's serving mode, which could be on-demand serving or dedicated serving. + /// + [JsonConverter(typeof(ServingModeModelConverter))] + public class ServingMode + { + /// + /// + /// The serving mode type, which could be on-demand serving or dedicated serving. + /// + /// + public enum ServingTypeEnum { + [EnumMember(Value = "ON_DEMAND")] + OnDemand, + [EnumMember(Value = "DEDICATED")] + Dedicated + }; + + + } + + public class ServingModeModelConverter : JsonConverter + { + public override bool CanWrite => false; + public override bool CanRead => true; + public override bool CanConvert(System.Type type) + { + return type == typeof(ServingMode); + } + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + throw new System.InvalidOperationException("Use default serialization."); + } + + public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + { + var jsonObject = JObject.Load(reader); + var obj = default(ServingMode); + var discriminator = jsonObject["servingType"].Value(); + switch (discriminator) + { + case "DEDICATED": + obj = new DedicatedServingMode(); + break; + case "ON_DEMAND": + obj = new OnDemandServingMode(); + break; + } + serializer.Populate(jsonObject.CreateReader(), obj); + return obj; + } + } +} diff --git a/Generativeaiinference/models/SummarizeTextDetails.cs b/Generativeaiinference/models/SummarizeTextDetails.cs new file mode 100644 index 0000000000..1d5f465de9 --- /dev/null +++ b/Generativeaiinference/models/SummarizeTextDetails.cs @@ -0,0 +1,137 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// Details for the request to summarize text. + /// + public class SummarizeTextDetails + { + + /// + /// The input string to be summarized. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Input is required.")] + [JsonProperty(PropertyName = "input")] + public string Input { get; set; } + + /// + /// Required + /// + [Required(ErrorMessage = "ServingMode is required.")] + [JsonProperty(PropertyName = "servingMode")] + public ServingMode ServingMode { get; set; } + + /// + /// The OCID of compartment that the user is authorized to use to call into the Generative AI service. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// Whether or not to include the original inputs in the response. + /// + [JsonProperty(PropertyName = "isEcho")] + public System.Nullable IsEcho { get; set; } + + /// + /// A number that sets the randomness of the generated output. Lower temperatures mean less random generations. + ///
+ /// Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0, and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. + /// + ///
+ [JsonProperty(PropertyName = "temperature")] + public System.Double Temperature { get; set; } + + /// + /// A free-form instruction for modifying how the summaries get generated. Should complete the sentence \"Generate a summary _\". For example, \"focusing on the next steps\" or \"written by Yoda\". + /// + [JsonProperty(PropertyName = "additionalCommand")] + public string AdditionalCommand { get; set; } + /// + /// + /// Indicates the approximate length of the summary. If \"AUTO\" is selected, the best option will be picked based on the input text. + /// + /// + public enum LengthEnum { + [EnumMember(Value = "SHORT")] + Short, + [EnumMember(Value = "MEDIUM")] + Medium, + [EnumMember(Value = "LONG")] + Long, + [EnumMember(Value = "AUTO")] + Auto + }; + + /// + /// Indicates the approximate length of the summary. If \"AUTO\" is selected, the best option will be picked based on the input text. + /// + [JsonProperty(PropertyName = "length")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable Length { get; set; } + /// + /// + /// Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If \"AUTO\" is selected, the best option will be picked based on the input text. + /// + /// + public enum FormatEnum { + [EnumMember(Value = "PARAGRAPH")] + Paragraph, + [EnumMember(Value = "BULLETS")] + Bullets, + [EnumMember(Value = "AUTO")] + Auto + }; + + /// + /// Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If \"AUTO\" is selected, the best option will be picked based on the input text. + /// + [JsonProperty(PropertyName = "format")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable Format { get; set; } + /// + /// + /// Controls how close to the original text the summary is. High extractiveness summaries will lean towards reusing sentences verbatim, while low extractiveness summaries will tend to paraphrase more. + /// + /// + public enum ExtractivenessEnum { + [EnumMember(Value = "LOW")] + Low, + [EnumMember(Value = "MEDIUM")] + Medium, + [EnumMember(Value = "HIGH")] + High, + [EnumMember(Value = "AUTO")] + Auto + }; + + /// + /// Controls how close to the original text the summary is. High extractiveness summaries will lean towards reusing sentences verbatim, while low extractiveness summaries will tend to paraphrase more. + /// + [JsonProperty(PropertyName = "extractiveness")] + [JsonConverter(typeof(StringEnumConverter))] + public System.Nullable Extractiveness { get; set; } + + } +} diff --git a/Generativeaiinference/models/SummarizeTextResult.cs b/Generativeaiinference/models/SummarizeTextResult.cs new file mode 100644 index 0000000000..e58c3e45c7 --- /dev/null +++ b/Generativeaiinference/models/SummarizeTextResult.cs @@ -0,0 +1,63 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// Summarize text result to return to caller. + /// + public class SummarizeTextResult + { + + /// + /// A unique identifier for this SummarizeTextResult. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// The original input. Only included if \"isEcho\" set to true. + /// + [JsonProperty(PropertyName = "input")] + public string Input { get; set; } + + /// + /// Summary result corresponding to input. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Summary is required.")] + [JsonProperty(PropertyName = "summary")] + public string Summary { get; set; } + + /// + /// The OCID of the model used in this inference request. + /// + [JsonProperty(PropertyName = "modelId")] + public string ModelId { get; set; } + + /// + /// The version of the model. + /// + [JsonProperty(PropertyName = "modelVersion")] + public string ModelVersion { get; set; } + + } +} diff --git a/Generativeaiinference/models/TokenLikelihood.cs b/Generativeaiinference/models/TokenLikelihood.cs new file mode 100644 index 0000000000..09c7751ab4 --- /dev/null +++ b/Generativeaiinference/models/TokenLikelihood.cs @@ -0,0 +1,40 @@ +/* + * 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.GenerativeaiinferenceService.Models +{ + /// + /// An object that contains the returned token and its corresponding likelihood. + /// + public class TokenLikelihood + { + + /// + /// A word, part of a word, or a punctuation. + ///
+ /// For example, apple is a token and friendship is made up of two tokens, friend and ship. When you run a model, you can set the maximum number of output tokens. Estimate three tokens per word. + /// + ///
+ [JsonProperty(PropertyName = "token")] + public string Token { get; set; } + + /// + /// The likelihood of this token during generation. + /// + [JsonProperty(PropertyName = "likelihood")] + public System.Double Likelihood { get; set; } + + } +} diff --git a/Generativeaiinference/requests/EmbedTextRequest.cs b/Generativeaiinference/requests/EmbedTextRequest.cs new file mode 100644 index 0000000000..19ec066223 --- /dev/null +++ b/Generativeaiinference/requests/EmbedTextRequest.cs @@ -0,0 +1,49 @@ +/* + * 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 Oci.GenerativeaiinferenceService.Models; + +namespace Oci.GenerativeaiinferenceService.Requests +{ + /// + /// Click here to see an example of how to use EmbedText request. + /// + public class EmbedTextRequest : Oci.Common.IOciRequest + { + + /// + /// Details for generating the embed response. + /// + /// + /// Required + /// + [Required(ErrorMessage = "EmbedTextDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public EmbedTextDetails EmbedTextDetails { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of executing that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and purged from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + + /// + /// The client request ID for tracing. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeaiinference/requests/GenerateTextRequest.cs b/Generativeaiinference/requests/GenerateTextRequest.cs new file mode 100644 index 0000000000..ecfc8b81de --- /dev/null +++ b/Generativeaiinference/requests/GenerateTextRequest.cs @@ -0,0 +1,49 @@ +/* + * 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 Oci.GenerativeaiinferenceService.Models; + +namespace Oci.GenerativeaiinferenceService.Requests +{ + /// + /// Click here to see an example of how to use GenerateText request. + /// + public class GenerateTextRequest : Oci.Common.IOciRequest + { + + /// + /// Details for generating the text response. + /// + /// + /// Required + /// + [Required(ErrorMessage = "GenerateTextDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public GenerateTextDetails GenerateTextDetails { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of executing that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and purged from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + + /// + /// The client request ID for tracing. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeaiinference/requests/SummarizeTextRequest.cs b/Generativeaiinference/requests/SummarizeTextRequest.cs new file mode 100644 index 0000000000..2c9af00767 --- /dev/null +++ b/Generativeaiinference/requests/SummarizeTextRequest.cs @@ -0,0 +1,49 @@ +/* + * 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 Oci.GenerativeaiinferenceService.Models; + +namespace Oci.GenerativeaiinferenceService.Requests +{ + /// + /// Click here to see an example of how to use SummarizeText request. + /// + public class SummarizeTextRequest : Oci.Common.IOciRequest + { + + /// + /// Details for summarizing the text. + /// + /// + /// Required + /// + [Required(ErrorMessage = "SummarizeTextDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public SummarizeTextDetails SummarizeTextDetails { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of executing that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and purged from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + + /// + /// The client request ID for tracing. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Generativeaiinference/responses/EmbedTextResponse.cs b/Generativeaiinference/responses/EmbedTextResponse.cs new file mode 100644 index 0000000000..8289358e03 --- /dev/null +++ b/Generativeaiinference/responses/EmbedTextResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiinferenceService.Models; + +namespace Oci.GenerativeaiinferenceService.Responses +{ + public class EmbedTextResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned EmbedTextResult instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public EmbedTextResult EmbedTextResult { get; set; } + + } +} diff --git a/Generativeaiinference/responses/GenerateTextResponse.cs b/Generativeaiinference/responses/GenerateTextResponse.cs new file mode 100644 index 0000000000..cb74697eb7 --- /dev/null +++ b/Generativeaiinference/responses/GenerateTextResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiinferenceService.Models; + +namespace Oci.GenerativeaiinferenceService.Responses +{ + public class GenerateTextResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned GenerateTextResult instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public GenerateTextResult GenerateTextResult { get; set; } + + } +} diff --git a/Generativeaiinference/responses/SummarizeTextResponse.cs b/Generativeaiinference/responses/SummarizeTextResponse.cs new file mode 100644 index 0000000000..5a16db1744 --- /dev/null +++ b/Generativeaiinference/responses/SummarizeTextResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.GenerativeaiinferenceService.Models; + +namespace Oci.GenerativeaiinferenceService.Responses +{ + public class SummarizeTextResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned SummarizeTextResult instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public SummarizeTextResult SummarizeTextResult { get; set; } + + } +} diff --git a/Marketplace/models/PricingCurrencyEnum.cs b/Marketplace/models/PricingCurrencyEnum.cs index 904cdd7415..7f1fed96cc 100644 --- a/Marketplace/models/PricingCurrencyEnum.cs +++ b/Marketplace/models/PricingCurrencyEnum.cs @@ -40,6 +40,96 @@ public enum PricingCurrencyEnum { [EnumMember(Value = "MXN")] Mxn, [EnumMember(Value = "CLP")] - Clp + Clp, + [EnumMember(Value = "ALL")] + All, + [EnumMember(Value = "ARS")] + Ars, + [EnumMember(Value = "AUD")] + Aud, + [EnumMember(Value = "BDT")] + Bdt, + [EnumMember(Value = "BAM")] + Bam, + [EnumMember(Value = "BGN")] + Bgn, + [EnumMember(Value = "CNY")] + Cny, + [EnumMember(Value = "COP")] + Cop, + [EnumMember(Value = "CRC")] + Crc, + [EnumMember(Value = "HRK")] + Hrk, + [EnumMember(Value = "CZK")] + Czk, + [EnumMember(Value = "DKK")] + Dkk, + [EnumMember(Value = "EGP")] + Egp, + [EnumMember(Value = "HKD")] + Hkd, + [EnumMember(Value = "HUF")] + Huf, + [EnumMember(Value = "ISK")] + Isk, + [EnumMember(Value = "IDR")] + Idr, + [EnumMember(Value = "ILS")] + Ils, + [EnumMember(Value = "JMD")] + Jmd, + [EnumMember(Value = "KZT")] + Kzt, + [EnumMember(Value = "KES")] + Kes, + [EnumMember(Value = "KRW")] + Krw, + [EnumMember(Value = "KWD")] + Kwd, + [EnumMember(Value = "LBP")] + Lbp, + [EnumMember(Value = "MOP")] + Mop, + [EnumMember(Value = "MYR")] + Myr, + [EnumMember(Value = "MVR")] + Mvr, + [EnumMember(Value = "AED")] + Aed, + [EnumMember(Value = "NZD")] + Nzd, + [EnumMember(Value = "NOK")] + Nok, + [EnumMember(Value = "PKR")] + Pkr, + [EnumMember(Value = "PEN")] + Pen, + [EnumMember(Value = "PHP")] + Php, + [EnumMember(Value = "PLN")] + Pln, + [EnumMember(Value = "QAR")] + Qar, + [EnumMember(Value = "RON")] + Ron, + [EnumMember(Value = "SAR")] + Sar, + [EnumMember(Value = "RSD")] + Rsd, + [EnumMember(Value = "SGD")] + Sgd, + [EnumMember(Value = "ZAR")] + Zar, + [EnumMember(Value = "SEK")] + Sek, + [EnumMember(Value = "TWD")] + Twd, + [EnumMember(Value = "THB")] + Thb, + [EnumMember(Value = "TRY")] + Try, + [EnumMember(Value = "VND")] + Vnd } } diff --git a/Marketplace/models/Publication.cs b/Marketplace/models/Publication.cs index 33328629c1..c85bc57843 100644 --- a/Marketplace/models/Publication.cs +++ b/Marketplace/models/Publication.cs @@ -148,5 +148,13 @@ public enum LifecycleStateEnum { [JsonProperty(PropertyName = "freeformTags")] public System.Collections.Generic.Dictionary FreeformTags { get; set; } + /// + /// The system tags associated with this resource, if any. The system tags are set by Oracle Cloud Infrastructure services. Each key is predefined and scoped to namespaces. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + /// Example: {orcl-cloud: {free-tier-retain: true}} + /// + [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + } } diff --git a/Marketplace/models/PublicationSummary.cs b/Marketplace/models/PublicationSummary.cs index 8ba4bbf875..758aa36ab3 100644 --- a/Marketplace/models/PublicationSummary.cs +++ b/Marketplace/models/PublicationSummary.cs @@ -104,5 +104,29 @@ public class PublicationSummary [JsonProperty(PropertyName = "timeCreated")] public System.Nullable TimeCreated { get; set; } + /// + /// The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + /// Example: {"Operations": {"CostCenter": "42"}} + /// + [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + /// + /// The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + /// predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + /// Example: {"Department": "Finance"} + /// + [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// The system tags associated with this resource, if any. The system tags are set by Oracle Cloud Infrastructure services. Each key is predefined and scoped to namespaces. + /// For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + /// Example: {orcl-cloud: {free-tier-retain: true}} + /// + [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + } } diff --git a/Stackmonitoring/StackMonitoringClient.cs b/Stackmonitoring/StackMonitoringClient.cs index 1d5f9767a7..d72901d5cf 100644 --- a/Stackmonitoring/StackMonitoringClient.cs +++ b/Stackmonitoring/StackMonitoringClient.cs @@ -371,6 +371,63 @@ public async Task ChangeMonitore } } + /// + /// Moves a ProcessSet resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. + /// + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ChangeProcessSetCompartment API. + public async Task ChangeProcessSetCompartment(ChangeProcessSetCompartmentRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called changeProcessSetCompartment"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/processSets/{processSetId}/actions/changeCompartment".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "StackMonitoring", + OperationName = "ChangeProcessSetCompartment", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/ChangeProcessSetCompartment", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ChangeProcessSetCompartment failed with error: {e.Message}"); + throw; + } + } + /// /// Creates the specified Baseline-able metric /// @@ -775,6 +832,62 @@ public async Task CreateMonitoredResourceTy } } + /// + /// API to create Process Set. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use CreateProcessSet API. + public async Task CreateProcessSet(CreateProcessSetRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called createProcessSet"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/processSets".Trim('/'))); + HttpMethod method = new HttpMethod("POST"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "StackMonitoring", + OperationName = "CreateProcessSet", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/CreateProcessSet", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"CreateProcessSet failed with error: {e.Message}"); + throw; + } + } + /// /// Deletes the Baseline-able metric for the given id /// @@ -1115,6 +1228,62 @@ public async Task DeleteMonitoredResourceTy } } + /// + /// Deletes a Process Set + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use DeleteProcessSet API. + public async Task DeleteProcessSet(DeleteProcessSetRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called deleteProcessSet"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/processSets/{processSetId}".Trim('/'))); + HttpMethod method = new HttpMethod("DELETE"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "StackMonitoring", + OperationName = "DeleteProcessSet", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/DeleteProcessSet", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"DeleteProcessSet failed with error: {e.Message}"); + throw; + } + } + /// /// Disable external database resource monitoring. All the references in DBaaS, /// DBM and resource service will be deleted as part of this operation. @@ -1851,6 +2020,62 @@ public async Task GetMonitoredResourceType(Get } } + /// + /// API to get the details of a Process Set by identifier. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use GetProcessSet API. + public async Task GetProcessSet(GetProcessSetRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called getProcessSet"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/processSets/{processSetId}".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "StackMonitoring", + OperationName = "GetProcessSet", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/GetProcessSet", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"GetProcessSet failed with error: {e.Message}"); + throw; + } + } + /// /// Gets the status of the work request with the given ID. /// @@ -2365,6 +2590,62 @@ public async Task ListMonitoredResources(ListMon } } + /// + /// API to get the details of all Process Sets. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use ListProcessSets API. + public async Task ListProcessSets(ListProcessSetsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called listProcessSets"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/processSets".Trim('/'))); + HttpMethod method = new HttpMethod("GET"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "StackMonitoring", + OperationName = "ListProcessSets", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSetCollection/ListProcessSets", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"ListProcessSets failed with error: {e.Message}"); + throw; + } + } + /// /// Return a (paginated) list of errors for a given work request. /// @@ -3396,5 +3677,61 @@ public async Task UpdateMonitoredResourceTy } } + /// + /// API to update a Process Set identified by a given ocid. + /// + /// The request object containing the details to send. Required. + /// The retry configuration that will be used by to send this request. Optional. + /// The cancellation token to cancel this operation. Optional. + /// The completion option for this operation. Optional. + /// A response object containing details about the completed operation + /// Click here to see an example of how to use UpdateProcessSet API. + public async Task UpdateProcessSet(UpdateProcessSetRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) + { + logger.Trace("Called updateProcessSet"); + Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/processSets/{processSetId}".Trim('/'))); + HttpMethod method = new HttpMethod("PUT"); + HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request); + requestMessage.Headers.Add("Accept", "application/json"); + GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration); + HttpResponseMessage responseMessage; + + try + { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + if (retryingClient != null) + { + responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, completionOption, cancellationToken).ConfigureAwait(false); + } + else + { + responseMessage = await this.restClient.HttpSend(requestMessage, completionOption: completionOption).ConfigureAwait(false); + } + stopWatch.Stop(); + ApiDetails apiDetails = new ApiDetails + { + ServiceName = "StackMonitoring", + OperationName = "UpdateProcessSet", + RequestEndpoint = $"{method.Method} {requestMessage.RequestUri}", + ApiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/UpdateProcessSet", + UserAgent = this.GetUserAgent() + }; + this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage, apiDetails); + logger.Debug($"Total Latency for this API call is: {stopWatch.ElapsedMilliseconds} ms"); + return Converter.FromHttpResponseMessage(responseMessage); + } + catch (OciException e) + { + logger.Error(e); + throw; + } + catch (Exception e) + { + logger.Error($"UpdateProcessSet failed with error: {e.Message}"); + throw; + } + } + } } diff --git a/Stackmonitoring/StackMonitoringPaginators.cs b/Stackmonitoring/StackMonitoringPaginators.cs index dbd71a21a9..62c1089dd6 100644 --- a/Stackmonitoring/StackMonitoringPaginators.cs +++ b/Stackmonitoring/StackMonitoringPaginators.cs @@ -441,6 +441,55 @@ public IEnumerable ListMonitoredResourcesRecordEnumera ); } + /// + /// Creates a new enumerable which will iterate over the responses received from the ListProcessSets operation. This enumerable + /// will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListProcessSetsResponseEnumerator(ListProcessSetsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListProcessSets(request, retryConfiguration, cancellationToken) + ); + } + + /// + /// Creates a new enumerable which will iterate over the ProcessSetSummary objects + /// contained in responses from the ListProcessSets operation. This enumerable will fetch more data from the server as needed. + /// + /// The request object containing the details to send + /// The configuration for retrying, may be null + /// The cancellation token object + /// The enumerator, which supports a simple iteration over a collection of a specified type + public IEnumerable ListProcessSetsRecordEnumerator(ListProcessSetsRequest request, Common.Retry.RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default) + { + return new Common.Utils.ResponseRecordEnumerable( + response => response.OpcNextPage, + input => + { + if (!string.IsNullOrEmpty(input)) + { + request.Page = input; + } + return request; + }, + request => client.ListProcessSets(request, retryConfiguration, cancellationToken), + response => response.ProcessSetCollection.Items + ); + } + /// /// Creates a new enumerable which will iterate over the responses received from the ListWorkRequestErrors operation. This enumerable /// will fetch more data from the server as needed. diff --git a/Stackmonitoring/StackMonitoringWaiters.cs b/Stackmonitoring/StackMonitoringWaiters.cs index e2158f9867..47e77ca70d 100644 --- a/Stackmonitoring/StackMonitoringWaiters.cs +++ b/Stackmonitoring/StackMonitoringWaiters.cs @@ -227,6 +227,34 @@ public Waiter /// Request to send. /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states /// a new Oci.common.Waiter instance + public Waiter ForProcessSet(GetProcessSetRequest request, params LifecycleState[] targetStates) + { + return this.ForProcessSet(request, WaiterConfiguration.DefaultWaiterConfiguration, targetStates); + } + + /// + /// Creates a waiter using the provided configuration. + /// + /// Request to send. + /// Wait Configuration + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance + public Waiter ForProcessSet(GetProcessSetRequest request, WaiterConfiguration config, params LifecycleState[] targetStates) + { + var agent = new WaiterAgent( + request, + request => client.GetProcessSet(request), + response => targetStates.Contains(response.ProcessSet.LifecycleState.Value), + targetStates.Contains(LifecycleState.Deleted) + ); + return new Waiter(config, agent); + } + /// + /// Creates a waiter using default wait configuration. + /// + /// Request to send. + /// Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states + /// a new Oci.common.Waiter instance public Waiter ForWorkRequest(GetWorkRequestRequest request, params OperationStatus[] targetStates) { return this.ForWorkRequest(request, WaiterConfiguration.DefaultWaiterConfiguration, targetStates); diff --git a/Stackmonitoring/models/ChangeProcessSetCompartmentDetails.cs b/Stackmonitoring/models/ChangeProcessSetCompartmentDetails.cs new file mode 100644 index 0000000000..2ca704e283 --- /dev/null +++ b/Stackmonitoring/models/ChangeProcessSetCompartmentDetails.cs @@ -0,0 +1,37 @@ +/* + * 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.StackmonitoringService.Models +{ + /// + /// Payload describing to which compartment the resource should be moved. + /// + public class ChangeProcessSetCompartmentDetails + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + /// into which the resource should be moved. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + } +} diff --git a/Stackmonitoring/models/CreateProcessSetDetails.cs b/Stackmonitoring/models/CreateProcessSetDetails.cs new file mode 100644 index 0000000000..aa44964daf --- /dev/null +++ b/Stackmonitoring/models/CreateProcessSetDetails.cs @@ -0,0 +1,67 @@ +/* + * 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.StackmonitoringService.Models +{ + /// + /// Process Set create payload model. + /// + public class CreateProcessSetDetails + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// Name of the Process Set. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DisplayName is required.")] + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Required + /// + [Required(ErrorMessage = "Specification is required.")] + [JsonProperty(PropertyName = "specification")] + public ProcessSetSpecification Specification { get; set; } + + /// + /// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + /// Example: {"bar-key": "value"} + /// + [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// Example: {"foo-namespace": {"bar-key": "value"}} + /// + [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + } +} diff --git a/Stackmonitoring/models/DiscoveryDetails.cs b/Stackmonitoring/models/DiscoveryDetails.cs index 9d6a79cde2..8830a8503e 100644 --- a/Stackmonitoring/models/DiscoveryDetails.cs +++ b/Stackmonitoring/models/DiscoveryDetails.cs @@ -64,7 +64,9 @@ public enum ResourceTypeEnum { [EnumMember(Value = "APACHE_HTTP_SERVER")] ApacheHttpServer, [EnumMember(Value = "ORACLE_GOLDENGATE")] - OracleGoldengate + OracleGoldengate, + [EnumMember(Value = "CUSTOM_RESOURCE")] + CustomResource }; /// diff --git a/Stackmonitoring/models/DiscoveryJobSummary.cs b/Stackmonitoring/models/DiscoveryJobSummary.cs index 53a19a8e94..d3beee252a 100644 --- a/Stackmonitoring/models/DiscoveryJobSummary.cs +++ b/Stackmonitoring/models/DiscoveryJobSummary.cs @@ -64,7 +64,9 @@ public enum ResourceTypeEnum { [EnumMember(Value = "APACHE_HTTP_SERVER")] ApacheHttpServer, [EnumMember(Value = "ORACLE_GOLDENGATE")] - OracleGoldengate + OracleGoldengate, + [EnumMember(Value = "CUSTOM_RESOURCE")] + CustomResource }; /// diff --git a/Stackmonitoring/models/ProcessSet.cs b/Stackmonitoring/models/ProcessSet.cs new file mode 100644 index 0000000000..af2878217b --- /dev/null +++ b/Stackmonitoring/models/ProcessSet.cs @@ -0,0 +1,122 @@ +/* + * 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.StackmonitoringService.Models +{ + /// + /// The Process Set details. + /// + public class ProcessSet + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Process Set. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The current state of the Resource. + /// + /// + /// Required + /// + [Required(ErrorMessage = "LifecycleState is required.")] + [JsonProperty(PropertyName = "lifecycleState")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable LifecycleState { get; set; } + + /// + /// Name of the Process Set. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DisplayName is required.")] + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Required + /// + [Required(ErrorMessage = "Specification is required.")] + [JsonProperty(PropertyName = "specification")] + public ProcessSetSpecification Specification { get; set; } + + /// + /// The time the process set was created. An RFC3339 formatted datetime string. + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeCreated is required.")] + [JsonProperty(PropertyName = "timeCreated")] + public System.Nullable TimeCreated { get; set; } + + /// + /// The time the process set was last updated. An RFC3339 formatted datetime string. + /// + [JsonProperty(PropertyName = "timeUpdated")] + public System.Nullable TimeUpdated { get; set; } + + /// + /// The current revision of the Process Set. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Revision is required.")] + [JsonProperty(PropertyName = "revision")] + public string Revision { get; set; } + + /// + /// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + /// Example: {"bar-key": "value"} + /// + [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// Example: {"foo-namespace": {"bar-key": "value"}} + /// + [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + /// + /// Usage of system tag keys. These predefined keys are scoped to namespaces. + /// Example: {"orcl-cloud": {"free-tier-retained": "true"}} + /// + [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + + } +} diff --git a/Stackmonitoring/models/ProcessSetCollection.cs b/Stackmonitoring/models/ProcessSetCollection.cs new file mode 100644 index 0000000000..1873145693 --- /dev/null +++ b/Stackmonitoring/models/ProcessSetCollection.cs @@ -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.StackmonitoringService.Models +{ + /// + /// Result of the Process Set fetch. + /// + public class ProcessSetCollection + { + + /// + /// List of Process Sets. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Items is required.")] + [JsonProperty(PropertyName = "items")] + public System.Collections.Generic.List Items { get; set; } + + } +} diff --git a/Stackmonitoring/models/ProcessSetSpecification.cs b/Stackmonitoring/models/ProcessSetSpecification.cs new file mode 100644 index 0000000000..44fcecc284 --- /dev/null +++ b/Stackmonitoring/models/ProcessSetSpecification.cs @@ -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.StackmonitoringService.Models +{ + /// + /// Collection of regular expression specifications used to identify the processes to be monitored. + /// + public class ProcessSetSpecification + { + + /// + /// List of Process Set specification details. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Items is required.")] + [JsonProperty(PropertyName = "items")] + public System.Collections.Generic.List Items { get; set; } + + } +} diff --git a/Stackmonitoring/models/ProcessSetSpecificationDetails.cs b/Stackmonitoring/models/ProcessSetSpecificationDetails.cs new file mode 100644 index 0000000000..976e83c82d --- /dev/null +++ b/Stackmonitoring/models/ProcessSetSpecificationDetails.cs @@ -0,0 +1,49 @@ +/* + * 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.StackmonitoringService.Models +{ + /// + /// Details of a single regular expression specification in a Process Set. + /// + public class ProcessSetSpecificationDetails + { + + /// + /// Optional label used to identify a single filter. + /// + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// String literal used for exact matching on process name. + /// + [JsonProperty(PropertyName = "processCommand")] + public string ProcessCommand { get; set; } + + /// + /// String literal used for exact matching on process user. + /// + [JsonProperty(PropertyName = "processUser")] + public string ProcessUser { get; set; } + + /// + /// Regex pattern matching on process arguments. + /// + [JsonProperty(PropertyName = "processLineRegexPattern")] + public string ProcessLineRegexPattern { get; set; } + + } +} diff --git a/Stackmonitoring/models/ProcessSetSummary.cs b/Stackmonitoring/models/ProcessSetSummary.cs new file mode 100644 index 0000000000..32aaae0222 --- /dev/null +++ b/Stackmonitoring/models/ProcessSetSummary.cs @@ -0,0 +1,122 @@ +/* + * 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.StackmonitoringService.Models +{ + /// + /// Summary of a Process Set, used to construct a list of Process Sets when fetching all Process Sets in a compartment. + /// + public class ProcessSetSummary + { + + /// + /// The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Process Set. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "Id is required.")] + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + /// + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [JsonProperty(PropertyName = "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// The current state of the Resource. + /// + /// + /// Required + /// + [Required(ErrorMessage = "LifecycleState is required.")] + [JsonProperty(PropertyName = "lifecycleState")] + [JsonConverter(typeof(Oci.Common.Utils.ResponseEnumConverter))] + public System.Nullable LifecycleState { get; set; } + + /// + /// Name of the Process Set. + /// + /// + /// Required + /// + [Required(ErrorMessage = "DisplayName is required.")] + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Required + /// + [Required(ErrorMessage = "Specification is required.")] + [JsonProperty(PropertyName = "specification")] + public ProcessSetSpecification Specification { get; set; } + + /// + /// The time the process set was created. An RFC3339 formatted datetime string. + /// + /// + /// Required + /// + [Required(ErrorMessage = "TimeCreated is required.")] + [JsonProperty(PropertyName = "timeCreated")] + public System.Nullable TimeCreated { get; set; } + + /// + /// The time the process set was last updated. An RFC3339 formatted datetime string. + /// + [JsonProperty(PropertyName = "timeUpdated")] + public System.Nullable TimeUpdated { get; set; } + + /// + /// The current revision of the Process Set. + /// + /// + /// Required + /// + [Required(ErrorMessage = "Revision is required.")] + [JsonProperty(PropertyName = "revision")] + public string Revision { get; set; } + + /// + /// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + /// Example: {"bar-key": "value"} + /// + [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// Example: {"foo-namespace": {"bar-key": "value"}} + /// + [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + /// + /// Usage of system tag keys. These predefined keys are scoped to namespaces. + /// Example: {"orcl-cloud": {"free-tier-retained": "true"}} + /// + [JsonProperty(PropertyName = "systemTags")] + public System.Collections.Generic.Dictionary> SystemTags { get; set; } + + } +} diff --git a/Stackmonitoring/models/UpdateProcessSetDetails.cs b/Stackmonitoring/models/UpdateProcessSetDetails.cs new file mode 100644 index 0000000000..2211d366c3 --- /dev/null +++ b/Stackmonitoring/models/UpdateProcessSetDetails.cs @@ -0,0 +1,48 @@ +/* + * 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.StackmonitoringService.Models +{ + /// + /// Process Set update payload model. + /// + public class UpdateProcessSetDetails + { + + /// + /// Name of the Process Set. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + [JsonProperty(PropertyName = "specification")] + public ProcessSetSpecification Specification { get; set; } + + /// + /// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + /// Example: {"bar-key": "value"} + /// + [JsonProperty(PropertyName = "freeformTags")] + public System.Collections.Generic.Dictionary FreeformTags { get; set; } + + /// + /// Defined tags for this resource. Each key is predefined and scoped to a namespace. + /// Example: {"foo-namespace": {"bar-key": "value"}} + /// + [JsonProperty(PropertyName = "definedTags")] + public System.Collections.Generic.Dictionary> DefinedTags { get; set; } + + } +} diff --git a/Stackmonitoring/requests/ChangeProcessSetCompartmentRequest.cs b/Stackmonitoring/requests/ChangeProcessSetCompartmentRequest.cs new file mode 100644 index 0000000000..b0dfe44472 --- /dev/null +++ b/Stackmonitoring/requests/ChangeProcessSetCompartmentRequest.cs @@ -0,0 +1,72 @@ +/* + * 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 Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Requests +{ + /// + /// Click here to see an example of how to use ChangeProcessSetCompartment request. + /// + public class ChangeProcessSetCompartmentRequest : Oci.Common.IOciRequest + { + + /// + /// The Process Set ID + /// + /// + /// Required + /// + [Required(ErrorMessage = "ProcessSetId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "processSetId")] + public string ProcessSetId { get; set; } + + /// + /// The information to be updated. + /// + /// + /// Required + /// + [Required(ErrorMessage = "ChangeProcessSetCompartmentDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public ChangeProcessSetCompartmentDetails ChangeProcessSetCompartmentDetails { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call + /// for a resource, set the `if-match` parameter to the value of the + /// etag from a previous GET or POST response for that resource. + /// The resource will be updated or deleted only if the etag you + /// provide matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + /// particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of executing that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and purged from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + } +} diff --git a/Stackmonitoring/requests/CreateProcessSetRequest.cs b/Stackmonitoring/requests/CreateProcessSetRequest.cs new file mode 100644 index 0000000000..db8d6a01c7 --- /dev/null +++ b/Stackmonitoring/requests/CreateProcessSetRequest.cs @@ -0,0 +1,51 @@ +/* + * 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 Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Requests +{ + /// + /// Click here to see an example of how to use CreateProcessSet request. + /// + public class CreateProcessSetRequest : Oci.Common.IOciRequest + { + + /// + /// Summary of process set details. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CreateProcessSetDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public CreateProcessSetDetails CreateProcessSetDetails { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + /// particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// A token that uniquely identifies a request so it can be retried in case of a timeout or + /// server error without risk of executing that same action again. Retry tokens expire after 24 + /// hours, but can be invalidated before then due to conflicting operations. For example, if a resource + /// has been deleted and purged from the system, then a retry of the original creation request + /// might be rejected. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-retry-token")] + public string OpcRetryToken { get; set; } + } +} diff --git a/Stackmonitoring/requests/DeleteProcessSetRequest.cs b/Stackmonitoring/requests/DeleteProcessSetRequest.cs new file mode 100644 index 0000000000..e9994d699d --- /dev/null +++ b/Stackmonitoring/requests/DeleteProcessSetRequest.cs @@ -0,0 +1,51 @@ +/* + * 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 Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Requests +{ + /// + /// Click here to see an example of how to use DeleteProcessSet request. + /// + public class DeleteProcessSetRequest : Oci.Common.IOciRequest + { + + /// + /// The Process Set ID + /// + /// + /// Required + /// + [Required(ErrorMessage = "ProcessSetId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "processSetId")] + public string ProcessSetId { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call + /// for a resource, set the `if-match` parameter to the value of the + /// etag from a previous GET or POST response for that resource. + /// The resource will be updated or deleted only if the etag you + /// provide matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + /// particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Stackmonitoring/requests/GetProcessSetRequest.cs b/Stackmonitoring/requests/GetProcessSetRequest.cs new file mode 100644 index 0000000000..dd04ffac57 --- /dev/null +++ b/Stackmonitoring/requests/GetProcessSetRequest.cs @@ -0,0 +1,40 @@ +/* + * 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 Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Requests +{ + /// + /// Click here to see an example of how to use GetProcessSet request. + /// + public class GetProcessSetRequest : Oci.Common.IOciRequest + { + + /// + /// The Process Set ID + /// + /// + /// Required + /// + [Required(ErrorMessage = "ProcessSetId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "processSetId")] + public string ProcessSetId { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + /// particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + } +} diff --git a/Stackmonitoring/requests/ListProcessSetsRequest.cs b/Stackmonitoring/requests/ListProcessSetsRequest.cs new file mode 100644 index 0000000000..1e78299dd8 --- /dev/null +++ b/Stackmonitoring/requests/ListProcessSetsRequest.cs @@ -0,0 +1,91 @@ +/* + * 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 Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Requests +{ + /// + /// Click here to see an example of how to use ListProcessSets request. + /// + public class ListProcessSetsRequest : Oci.Common.IOciRequest + { + + /// + /// The ID of the compartment in which data is listed. + /// + /// + /// Required + /// + [Required(ErrorMessage = "CompartmentId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "compartmentId")] + public string CompartmentId { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "limit")] + public System.Nullable Limit { get; set; } + + /// + /// 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). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "page")] + public string Page { get; set; } + + /// + /// The sort order to use, either ascending (`ASC`) or descending (`DESC`). + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortOrder")] + public System.Nullable SortOrder { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + /// particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// + /// The field to sort by. Only one sort order may be provided. Default order for timeUpdated is descending. Default order for name is ascending. + /// + /// + /// + public enum SortByEnum { + [EnumMember(Value = "timeUpdated")] + TimeUpdated, + [EnumMember(Value = "name")] + Name + }; + + /// + /// The field to sort by. Only one sort order may be provided. Default order for timeUpdated is descending. Default order for name is ascending. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "sortBy")] + public System.Nullable SortBy { get; set; } + + /// + /// A filter to return only resources that match the entire display name given. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Query, "displayName")] + public string DisplayName { get; set; } + } +} diff --git a/Stackmonitoring/requests/UpdateProcessSetRequest.cs b/Stackmonitoring/requests/UpdateProcessSetRequest.cs new file mode 100644 index 0000000000..b5edb4be50 --- /dev/null +++ b/Stackmonitoring/requests/UpdateProcessSetRequest.cs @@ -0,0 +1,61 @@ +/* + * 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 Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Requests +{ + /// + /// Click here to see an example of how to use UpdateProcessSet request. + /// + public class UpdateProcessSetRequest : Oci.Common.IOciRequest + { + + /// + /// The Process Set ID + /// + /// + /// Required + /// + [Required(ErrorMessage = "ProcessSetId is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Path, "processSetId")] + public string ProcessSetId { get; set; } + + /// + /// The updated Process Set details. + /// + /// + /// Required + /// + [Required(ErrorMessage = "UpdateProcessSetDetails is required.")] + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public UpdateProcessSetDetails UpdateProcessSetDetails { get; set; } + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + /// particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// For optimistic concurrency control. In the PUT or DELETE call + /// for a resource, set the `if-match` parameter to the value of the + /// etag from a previous GET or POST response for that resource. + /// The resource will be updated or deleted only if the etag you + /// provide matches the resource's current etag value. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "if-match")] + public string IfMatch { get; set; } + } +} diff --git a/Stackmonitoring/responses/ChangeProcessSetCompartmentResponse.cs b/Stackmonitoring/responses/ChangeProcessSetCompartmentResponse.cs new file mode 100644 index 0000000000..e68ca49721 --- /dev/null +++ b/Stackmonitoring/responses/ChangeProcessSetCompartmentResponse.cs @@ -0,0 +1,29 @@ +/* + * 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.Runtime.Serialization; +using Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Responses +{ + public class ChangeProcessSetCompartmentResponse : Oci.Common.IOciResponse + { + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + + } +} diff --git a/Stackmonitoring/responses/CreateProcessSetResponse.cs b/Stackmonitoring/responses/CreateProcessSetResponse.cs new file mode 100644 index 0000000000..c048205523 --- /dev/null +++ b/Stackmonitoring/responses/CreateProcessSetResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Responses +{ + public class CreateProcessSetResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned ProcessSet instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public ProcessSet ProcessSet { get; set; } + + } +} diff --git a/Stackmonitoring/responses/DeleteProcessSetResponse.cs b/Stackmonitoring/responses/DeleteProcessSetResponse.cs new file mode 100644 index 0000000000..133f7fa7f3 --- /dev/null +++ b/Stackmonitoring/responses/DeleteProcessSetResponse.cs @@ -0,0 +1,29 @@ +/* + * 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.Runtime.Serialization; +using Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Responses +{ + public class DeleteProcessSetResponse : Oci.Common.IOciResponse + { + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + + + } +} diff --git a/Stackmonitoring/responses/GetProcessSetResponse.cs b/Stackmonitoring/responses/GetProcessSetResponse.cs new file mode 100644 index 0000000000..7bdea1f91f --- /dev/null +++ b/Stackmonitoring/responses/GetProcessSetResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Responses +{ + public class GetProcessSetResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned ProcessSet instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public ProcessSet ProcessSet { get; set; } + + } +} diff --git a/Stackmonitoring/responses/ListProcessSetsResponse.cs b/Stackmonitoring/responses/ListProcessSetsResponse.cs new file mode 100644 index 0000000000..c3b3dc447d --- /dev/null +++ b/Stackmonitoring/responses/ListProcessSetsResponse.cs @@ -0,0 +1,43 @@ +/* + * 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.Runtime.Serialization; +using Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Responses +{ + public class ListProcessSetsResponse : Oci.Common.IOciResponse + { + + /// + /// For pagination of a list of items. When paging through a list, if this header appears in the response, + /// then a partial list might have been returned. Include this value as the `page` parameter for the + /// subsequent GET request to get the next batch of items. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-next-page")] + public string OpcNextPage { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned ProcessSetCollection instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public ProcessSetCollection ProcessSetCollection { get; set; } + + } +} diff --git a/Stackmonitoring/responses/UpdateProcessSetResponse.cs b/Stackmonitoring/responses/UpdateProcessSetResponse.cs new file mode 100644 index 0000000000..921ff1f85b --- /dev/null +++ b/Stackmonitoring/responses/UpdateProcessSetResponse.cs @@ -0,0 +1,41 @@ +/* + * 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.Runtime.Serialization; +using Oci.StackmonitoringService.Models; + +namespace Oci.StackmonitoringService.Responses +{ + public class UpdateProcessSetResponse : Oci.Common.IOciResponse + { + + /// + /// For optimistic concurrency control. See `if-match`. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "etag")] + public string Etag { get; set; } + + + /// + /// Unique Oracle-assigned identifier for the request. If you need to contact + /// Oracle about a particular request, please provide the request ID. + /// + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Header, "opc-request-id")] + public string OpcRequestId { get; set; } + + /// + /// The returned ProcessSet instance. + /// + [Oci.Common.Http.HttpConverter(Oci.Common.Http.TargetEnum.Body)] + public ProcessSet ProcessSet { get; set; } + + } +} diff --git a/Vault/OCI.DotNetSDK.Vault.csproj b/Vault/OCI.DotNetSDK.Vault.csproj index 711bef9df5..e2bcb536f9 100644 --- a/Vault/OCI.DotNetSDK.Vault.csproj +++ b/Vault/OCI.DotNetSDK.Vault.csproj @@ -13,5 +13,6 @@ + - \ No newline at end of file + diff --git a/oci-dotnet-sdk.sln b/oci-dotnet-sdk.sln index 926e76958d..24fccd7c22 100644 --- a/oci-dotnet-sdk.sln +++ b/oci-dotnet-sdk.sln @@ -275,6 +275,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OCI.DotNetSDK.Jmsjavadownlo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OCI.DotNetSDK.Psql", "Psql\OCI.DotNetSDK.Psql.csproj", "{97E3BA70-0F90-497B-BACB-EE6A5BB6034B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OCI.DotNetSDK.Generativeai", "Generativeai\OCI.DotNetSDK.Generativeai.csproj", "{F30C9C22-E809-482B-9BAC-624F9102BF8E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OCI.DotNetSDK.Generativeaiinference", "Generativeaiinference\OCI.DotNetSDK.Generativeaiinference.csproj", "{53BE60ED-195A-4DC7-8242-7786B718E3A5}" +EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -2523,5 +2527,29 @@ Global {97E3BA70-0F90-497B-BACB-EE6A5BB6034B}.Release|x64.Build.0 = Release|Any CPU {97E3BA70-0F90-497B-BACB-EE6A5BB6034B}.Release|x86.ActiveCfg = Release|Any CPU {97E3BA70-0F90-497B-BACB-EE6A5BB6034B}.Release|x86.Build.0 = Release|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Debug|x64.ActiveCfg = Debug|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Debug|x64.Build.0 = Debug|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Debug|x86.ActiveCfg = Debug|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Debug|x86.Build.0 = Debug|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Release|Any CPU.Build.0 = Release|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Release|x64.ActiveCfg = Release|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Release|x64.Build.0 = Release|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Release|x86.ActiveCfg = Release|Any CPU + {F30C9C22-E809-482B-9BAC-624F9102BF8E}.Release|x86.Build.0 = Release|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Debug|x64.ActiveCfg = Debug|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Debug|x64.Build.0 = Debug|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Debug|x86.ActiveCfg = Debug|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Debug|x86.Build.0 = Debug|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Release|Any CPU.Build.0 = Release|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Release|x64.ActiveCfg = Release|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Release|x64.Build.0 = Release|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Release|x86.ActiveCfg = Release|Any CPU + {53BE60ED-195A-4DC7-8242-7786B718E3A5}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal