Skip to content

Commit

Permalink
Releasing version 65.28.2
Browse files Browse the repository at this point in the history
Releasing version 65.28.2
  • Loading branch information
oci-dex-release-bot authored Jan 24, 2023
2 parents 6902173 + adef463 commit 81b4362
Show file tree
Hide file tree
Showing 78 changed files with 6,592 additions and 106 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)

## 65.28.2 - 2023-01-24
### Added
- Support for the Cloud Migrations service
- Support for setting up custom private IPs while creating private endpoints in the Database service
- Support for machine learning pipelines in the Data Science service
- Support for personally identifiable information detection in the AI Language service


## 65.28.1 - 2023-01-17
### Added
- Support for calling Oracle Cloud Infrastructure services in the us-chicago-1 region
Expand Down
83 changes: 77 additions & 6 deletions ailanguage/ailanguage_aiservicelanguage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,67 @@ func (client AIServiceLanguageClient) batchDetectLanguageKeyPhrases(ctx context.
return response, err
}

// BatchDetectLanguagePiiEntities The API extracts pii entities in text records. For each entity, its type and confidence score (between 0 and 1) is returned. It supports passing a batch of records.
// Limitations:
// - A batch may have up to 100 records.
// - A record may be up to 5000 characters long.
// - The total of characters to process in a request can be up to 20,000 characters.
//
// See also
//
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ailanguage/BatchDetectLanguagePiiEntities.go.html to see an example of how to use BatchDetectLanguagePiiEntities API.
func (client AIServiceLanguageClient) BatchDetectLanguagePiiEntities(ctx context.Context, request BatchDetectLanguagePiiEntitiesRequest) (response BatchDetectLanguagePiiEntitiesResponse, err error) {
var ociResponse common.OCIResponse
policy := common.NoRetryPolicy()
if client.RetryPolicy() != nil {
policy = *client.RetryPolicy()
}
if request.RetryPolicy() != nil {
policy = *request.RetryPolicy()
}
ociResponse, err = common.Retry(ctx, request, client.batchDetectLanguagePiiEntities, policy)
if err != nil {
if ociResponse != nil {
if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil {
opcRequestId := httpResponse.Header.Get("opc-request-id")
response = BatchDetectLanguagePiiEntitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId}
} else {
response = BatchDetectLanguagePiiEntitiesResponse{}
}
}
return
}
if convertedResponse, ok := ociResponse.(BatchDetectLanguagePiiEntitiesResponse); ok {
response = convertedResponse
} else {
err = fmt.Errorf("failed to convert OCIResponse into BatchDetectLanguagePiiEntitiesResponse")
}
return
}

// batchDetectLanguagePiiEntities implements the OCIOperation interface (enables retrying operations)
func (client AIServiceLanguageClient) batchDetectLanguagePiiEntities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) {

httpRequest, err := request.HTTPRequest(http.MethodPost, "/actions/batchDetectLanguagePiiEntities", binaryReqBody, extraHeaders)
if err != nil {
return nil, err
}

var response BatchDetectLanguagePiiEntitiesResponse
var httpResponse *http.Response
httpResponse, err = client.Call(ctx, &httpRequest)
defer common.CloseBodyIfValid(httpResponse)
response.RawResponse = httpResponse
if err != nil {
apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/language/20221001/BatchDetectLanguagePiiEntities/BatchDetectLanguagePiiEntities"
err = common.PostProcessServiceError(err, "AIServiceLanguage", "BatchDetectLanguagePiiEntities", apiReferenceLink)
return response, err
}

err = common.UnmarshalResponse(httpResponse, &response)
return response, err
}

// BatchDetectLanguageSentiments The API extracts aspect-based and sentence level sentiment in text records.
// For aspect-based sentiment analysis, a set of aspects and their respective sentiment is returned for each record. Similarly, for sentence-level sentiment analysis, the sentiment is returned at the sentence level.
// For sentiment analysis, confidence scores are provided for each of the classes (positive, negative, neutral and mixed).
Expand Down Expand Up @@ -1015,8 +1076,10 @@ func (client AIServiceLanguageClient) deleteProject(ctx context.Context, request
return response, err
}

// DetectDominantLanguage The API returns the detected language and a related confidence score (between 0 and 1).
// List of supported languages. (https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#lang-detect)
// DetectDominantLanguage **Deprecated**: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.
// We recommend you replace this API with the batch API, BatchDetectDominantLanguage (https://docs.cloud.oracle.com/iaas/api/#/en/language/20221001/BatchDetectDominantLanguage/BatchDetectDominantLanguage).
// The DetectDominantLanguage API returns the detected language and a related confidence score (between 0 and 1).
// List of supported languages (https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#lang-detect)
// Limitations:
// - A record may be up to 1000 characters long.
//
Expand Down Expand Up @@ -1075,7 +1138,9 @@ func (client AIServiceLanguageClient) detectDominantLanguage(ctx context.Context
return response, err
}

// DetectLanguageEntities The API extracts entities in text records. For each entity, its type and confidence score (between 0 and 1) is returned.
// DetectLanguageEntities **Deprecated**: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.
// We recommend you replace this API with the batch API, BatchDetectLanguageEntities (https://docs.cloud.oracle.com/iaas/api/#/en/language/20221001/BatchDetectLanguageEntities/BatchDetectLanguageEntities).
// The DetectLanguageEntities API extracts entities in text records. For each entity, its type and confidence score (between 0 and 1) is returned.
// Limitations:
// - A text may be up to 1000 characters long.
//
Expand Down Expand Up @@ -1134,7 +1199,9 @@ func (client AIServiceLanguageClient) detectLanguageEntities(ctx context.Context
return response, err
}

// DetectLanguageKeyPhrases The API extracts key-phrases in text records. For each key-phrase, a score (between 0 and 1) is returned that highlights the importance of the key-phrase in the context of the text.
// DetectLanguageKeyPhrases **Deprecated**: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.
// We recommend you replace this API with the batch API, BatchDetectLanguageKeyPhrases (https://docs.cloud.oracle.com/iaas/api/#/en/language/20221001/BatchDetectLanguageKeyPhrases/BatchDetectLanguageKeyPhrases).
// The DetectLanguageKeyPhrases API extracts key-phrases in text records. For each key-phrase, a score (between 0 and 1) is returned that highlights the importance of the key-phrase in the context of the text.
// Limitations:
// - A record may be up to 1000 characters long.
//
Expand Down Expand Up @@ -1193,7 +1260,9 @@ func (client AIServiceLanguageClient) detectLanguageKeyPhrases(ctx context.Conte
return response, err
}

// DetectLanguageSentiments The API extracts aspect-based in text records.
// DetectLanguageSentiments **Deprecated**: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.
// We recommend you replace this API with the batch API, BatchDetectLanguageSentiments (https://docs.cloud.oracle.com/iaas/api/#/en/language/20221001/BatchDetectLanguageSentiments/BatchDetectLanguageSentiments).
// The DetectLanguageSentiments API extracts aspect-based in text records.
// For aspect-based sentiment analysis, a set of aspects and their respective sentiment is returned.
// For sentiment analysis, confidence scores are provided for each of the classes (positive, negative, neutral).
// Learn more about sentiment analysis here (https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#sentiment).
Expand Down Expand Up @@ -1255,7 +1324,9 @@ func (client AIServiceLanguageClient) detectLanguageSentiments(ctx context.Conte
return response, err
}

// DetectLanguageTextClassification The API automatically classifies text into a set of pre-determined classes and sub-classes. A single class/subclass is returned for each record classified.
// DetectLanguageTextClassification **Deprecated**: This API will be retired Tuesday, 10 Oct 2023 00:00:00 GMT.
// We recommend you replace this API with the batch API, BatchDetectLanguageTextClassification (https://docs.cloud.oracle.com/iaas/api/#/en/language/20221001/BatchDetectLanguageTextClassification/BatchDetectLanguageTextClassification).
// The DetectLanguageTextClassification API automatically classifies text into a set of pre-determined classes and sub-classes. A single class/subclass is returned for each record classified.
// Learn more about text classification here (https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#text-class).
// Limitations:
// - A record may be up to 1000 characters long.
Expand Down
84 changes: 84 additions & 0 deletions ailanguage/batch_detect_language_pii_entities_details.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.

// Language API
//
// OCI Language Service solutions can help enterprise customers integrate AI into their products immediately using our proven,
// pre-trained and custom models or containers, without a need to set up an house team of AI and ML experts.
// This allows enterprises to focus on business drivers and development work rather than AI and ML operations, which shortens the time to market.
//

package ailanguage

import (
"encoding/json"
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)

// BatchDetectLanguagePiiEntitiesDetails The documents details to detect personal identification information.
type BatchDetectLanguagePiiEntitiesDetails struct {

// List of documents to detect personal identification information.
Documents []TextDocument `mandatory:"true" json:"documents"`

// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that calls the API, inference will be served from pre trained model
CompartmentId *string `mandatory:"false" json:"compartmentId"`

// Mask recognized PII entities with different modes.
Masking map[string]PiiEntityMasking `mandatory:"false" json:"masking"`
}

func (m BatchDetectLanguagePiiEntitiesDetails) String() string {
return common.PointerString(m)
}

// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m BatchDetectLanguagePiiEntitiesDetails) ValidateEnumValue() (bool, error) {
errMessage := []string{}

if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}

// UnmarshalJSON unmarshals from json
func (m *BatchDetectLanguagePiiEntitiesDetails) UnmarshalJSON(data []byte) (e error) {
model := struct {
CompartmentId *string `json:"compartmentId"`
Masking map[string]piientitymasking `json:"masking"`
Documents []TextDocument `json:"documents"`
}{}

e = json.Unmarshal(data, &model)
if e != nil {
return
}
var nn interface{}
m.CompartmentId = model.CompartmentId

m.Masking = make(map[string]PiiEntityMasking)
for k, v := range model.Masking {
nn, e = v.UnmarshalPolymorphicJSON(v.JsonData)
if e != nil {
return e
}
if nn != nil {
m.Masking[k] = nn.(PiiEntityMasking)
} else {
m.Masking[k] = nil
}
}

m.Documents = make([]TextDocument, len(model.Documents))
for i, n := range model.Documents {
m.Documents[i] = n
}

return
}
90 changes: 90 additions & 0 deletions ailanguage/batch_detect_language_pii_entities_request_response.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.

package ailanguage

import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"net/http"
"strings"
)

// BatchDetectLanguagePiiEntitiesRequest wrapper for the BatchDetectLanguagePiiEntities operation
//
// See also
//
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/ailanguage/BatchDetectLanguagePiiEntities.go.html to see an example of how to use BatchDetectLanguagePiiEntitiesRequest.
type BatchDetectLanguagePiiEntitiesRequest struct {

// The details to make a PII entity detect call.
BatchDetectLanguagePiiEntitiesDetails `contributesTo:"body"`

// The client request ID for tracing.
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

// Metadata about the request. This information will not be transmitted to the service, but
// represents information that the SDK will consume to drive retry behavior.
RequestMetadata common.RequestMetadata
}

func (request BatchDetectLanguagePiiEntitiesRequest) String() string {
return common.PointerString(request)
}

// HTTPRequest implements the OCIRequest interface
func (request BatchDetectLanguagePiiEntitiesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) {

_, err := request.ValidateEnumValue()
if err != nil {
return http.Request{}, err
}
return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders)
}

// BinaryRequestBody implements the OCIRequest interface
func (request BatchDetectLanguagePiiEntitiesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) {

return nil, false

}

// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (request BatchDetectLanguagePiiEntitiesRequest) RetryPolicy() *common.RetryPolicy {
return request.RequestMetadata.RetryPolicy
}

// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (request BatchDetectLanguagePiiEntitiesRequest) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}

// BatchDetectLanguagePiiEntitiesResponse wrapper for the BatchDetectLanguagePiiEntities operation
type BatchDetectLanguagePiiEntitiesResponse struct {

// The underlying http response
RawResponse *http.Response

// The BatchDetectLanguagePiiEntitiesResult instance
BatchDetectLanguagePiiEntitiesResult `presentIn:"body"`

// Unique Oracle-assigned identifier for the request. If you need to contact
// Oracle about a particular request, please provide the request ID.
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
}

func (response BatchDetectLanguagePiiEntitiesResponse) String() string {
return common.PointerString(response)
}

// HTTPResponse implements the OCIResponse interface
func (response BatchDetectLanguagePiiEntitiesResponse) HTTPResponse() *http.Response {
return response.RawResponse
}
44 changes: 44 additions & 0 deletions ailanguage/batch_detect_language_pii_entities_result.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.

// Language API
//
// OCI Language Service solutions can help enterprise customers integrate AI into their products immediately using our proven,
// pre-trained and custom models or containers, without a need to set up an house team of AI and ML experts.
// This allows enterprises to focus on business drivers and development work rather than AI and ML operations, which shortens the time to market.
//

package ailanguage

import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)

// BatchDetectLanguagePiiEntitiesResult Result of batch detect personal identification.
type BatchDetectLanguagePiiEntitiesResult struct {

// List of succeeded document response.
Documents []PiiEntityDocumentResult `mandatory:"true" json:"documents"`

// List of failed document response.
Errors []DocumentError `mandatory:"false" json:"errors"`
}

func (m BatchDetectLanguagePiiEntitiesResult) String() string {
return common.PointerString(m)
}

// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m BatchDetectLanguagePiiEntitiesResult) ValidateEnumValue() (bool, error) {
errMessage := []string{}

if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
2 changes: 1 addition & 1 deletion ailanguage/detect_dominant_language_request_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type DetectDominantLanguageResponse struct {
// Oracle about a particular request, please provide the request ID.
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

// This API will be retired on Monday, 10 Oct 2022 00:00:00 GMT
// This API will be retired on Monday, 10 Oct 2023 00:00:00 GMT
Sunset *string `presentIn:"header" name:"sunset"`
}

Expand Down
2 changes: 1 addition & 1 deletion ailanguage/detect_language_entities_request_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ type DetectLanguageEntitiesResponse struct {
// Oracle about a particular request, please provide the request ID.
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

// This API will be retired on Monday, 10 Oct 2022 00:00:00 GMT
// This API will be retired on Monday, 10 Oct 2023 00:00:00 GMT
Sunset *string `presentIn:"header" name:"sunset"`
}

Expand Down
2 changes: 1 addition & 1 deletion ailanguage/detect_language_key_phrases_request_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type DetectLanguageKeyPhrasesResponse struct {
// Oracle about a particular request, please provide the request ID.
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

// This API will be retired on Monday, 10 Oct 2022 00:00:00 GMT
// This API will be retired on Monday, 10 Oct 2023 00:00:00 GMT
Sunset *string `presentIn:"header" name:"sunset"`
}

Expand Down
2 changes: 1 addition & 1 deletion ailanguage/detect_language_sentiments_request_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type DetectLanguageSentimentsResponse struct {
// Oracle about a particular request, please provide the request ID.
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

// This API will be retired on Monday, 10 Oct 2022 00:00:00 GMT
// This API will be retired on Monday, 10 Oct 2023 00:00:00 GMT
Sunset *string `presentIn:"header" name:"sunset"`
}

Expand Down
Loading

0 comments on commit 81b4362

Please sign in to comment.