-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing version 65.28.2
- Loading branch information
Showing
78 changed files
with
6,592 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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
90
ailanguage/batch_detect_language_pii_entities_request_response.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.