-
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.73.0
- Loading branch information
Showing
355 changed files
with
29,000 additions
and
727 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,90 @@ | ||
// Copyright (c) 2016, 2018, 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. | ||
// Code generated. DO NOT EDIT. | ||
|
||
// Document Understanding API | ||
// | ||
// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. | ||
// | ||
|
||
package aidocument | ||
|
||
import ( | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// AddModelLockDetails Request payload to add lock to the resource. | ||
type AddModelLockDetails struct { | ||
|
||
// Type of the lock. | ||
Type AddModelLockDetailsTypeEnum `mandatory:"true" json:"type"` | ||
|
||
// The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. | ||
RelatedResourceId *string `mandatory:"false" json:"relatedResourceId"` | ||
|
||
// A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. | ||
Message *string `mandatory:"false" json:"message"` | ||
} | ||
|
||
func (m AddModelLockDetails) 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 AddModelLockDetails) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
if _, ok := GetMappingAddModelLockDetailsTypeEnum(string(m.Type)); !ok && m.Type != "" { | ||
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetAddModelLockDetailsTypeEnumStringValues(), ","))) | ||
} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} | ||
|
||
// AddModelLockDetailsTypeEnum Enum with underlying type: string | ||
type AddModelLockDetailsTypeEnum string | ||
|
||
// Set of constants representing the allowable values for AddModelLockDetailsTypeEnum | ||
const ( | ||
AddModelLockDetailsTypeFull AddModelLockDetailsTypeEnum = "FULL" | ||
AddModelLockDetailsTypeDelete AddModelLockDetailsTypeEnum = "DELETE" | ||
) | ||
|
||
var mappingAddModelLockDetailsTypeEnum = map[string]AddModelLockDetailsTypeEnum{ | ||
"FULL": AddModelLockDetailsTypeFull, | ||
"DELETE": AddModelLockDetailsTypeDelete, | ||
} | ||
|
||
var mappingAddModelLockDetailsTypeEnumLowerCase = map[string]AddModelLockDetailsTypeEnum{ | ||
"full": AddModelLockDetailsTypeFull, | ||
"delete": AddModelLockDetailsTypeDelete, | ||
} | ||
|
||
// GetAddModelLockDetailsTypeEnumValues Enumerates the set of values for AddModelLockDetailsTypeEnum | ||
func GetAddModelLockDetailsTypeEnumValues() []AddModelLockDetailsTypeEnum { | ||
values := make([]AddModelLockDetailsTypeEnum, 0) | ||
for _, v := range mappingAddModelLockDetailsTypeEnum { | ||
values = append(values, v) | ||
} | ||
return values | ||
} | ||
|
||
// GetAddModelLockDetailsTypeEnumStringValues Enumerates the set of values in String for AddModelLockDetailsTypeEnum | ||
func GetAddModelLockDetailsTypeEnumStringValues() []string { | ||
return []string{ | ||
"FULL", | ||
"DELETE", | ||
} | ||
} | ||
|
||
// GetMappingAddModelLockDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum | ||
func GetMappingAddModelLockDetailsTypeEnum(val string) (AddModelLockDetailsTypeEnum, bool) { | ||
enum, ok := mappingAddModelLockDetailsTypeEnumLowerCase[strings.ToLower(val)] | ||
return enum, ok | ||
} |
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,113 @@ | ||
// Copyright (c) 2016, 2018, 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. | ||
// Code generated. DO NOT EDIT. | ||
|
||
package aidocument | ||
|
||
import ( | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"net/http" | ||
"strings" | ||
) | ||
|
||
// AddModelLockRequest wrapper for the AddModelLock operation | ||
// | ||
// # See also | ||
// | ||
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aidocument/AddModelLock.go.html to see an example of how to use AddModelLockRequest. | ||
type AddModelLockRequest struct { | ||
|
||
// A unique model identifier. | ||
ModelId *string `mandatory:"true" contributesTo:"path" name:"modelId"` | ||
|
||
// Request payload to add lock to the resource. | ||
AddModelLockDetails `contributesTo:"body"` | ||
|
||
// A token that uniquely identifies a request so it can be retried in case of a timeout or | ||
// server error without the 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. | ||
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` | ||
|
||
// The client request ID for tracing. | ||
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` | ||
|
||
// 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. | ||
IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` | ||
|
||
// Whether to override locks (if any exist). | ||
IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` | ||
|
||
// 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 AddModelLockRequest) String() string { | ||
return common.PointerString(request) | ||
} | ||
|
||
// HTTPRequest implements the OCIRequest interface | ||
func (request AddModelLockRequest) 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 AddModelLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { | ||
|
||
return nil, false | ||
|
||
} | ||
|
||
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. | ||
func (request AddModelLockRequest) 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 AddModelLockRequest) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} | ||
|
||
// AddModelLockResponse wrapper for the AddModelLock operation | ||
type AddModelLockResponse struct { | ||
|
||
// The underlying http response | ||
RawResponse *http.Response | ||
|
||
// The Model instance | ||
Model `presentIn:"body"` | ||
|
||
// For optimistic concurrency control. See `if-match`. | ||
Etag *string `presentIn:"header" name:"etag"` | ||
|
||
// A 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 AddModelLockResponse) String() string { | ||
return common.PointerString(response) | ||
} | ||
|
||
// HTTPResponse implements the OCIResponse interface | ||
func (response AddModelLockResponse) 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,90 @@ | ||
// Copyright (c) 2016, 2018, 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. | ||
// Code generated. DO NOT EDIT. | ||
|
||
// Document Understanding API | ||
// | ||
// Document AI helps customers perform various analysis on their documents. If a customer has lots of documents, they can process them in batch using asynchronous API endpoints. | ||
// | ||
|
||
package aidocument | ||
|
||
import ( | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// AddProjectLockDetails Request payload to add lock to the resource. | ||
type AddProjectLockDetails struct { | ||
|
||
// Type of the lock. | ||
Type AddProjectLockDetailsTypeEnum `mandatory:"true" json:"type"` | ||
|
||
// The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. | ||
RelatedResourceId *string `mandatory:"false" json:"relatedResourceId"` | ||
|
||
// A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. | ||
Message *string `mandatory:"false" json:"message"` | ||
} | ||
|
||
func (m AddProjectLockDetails) 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 AddProjectLockDetails) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
if _, ok := GetMappingAddProjectLockDetailsTypeEnum(string(m.Type)); !ok && m.Type != "" { | ||
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetAddProjectLockDetailsTypeEnumStringValues(), ","))) | ||
} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} | ||
|
||
// AddProjectLockDetailsTypeEnum Enum with underlying type: string | ||
type AddProjectLockDetailsTypeEnum string | ||
|
||
// Set of constants representing the allowable values for AddProjectLockDetailsTypeEnum | ||
const ( | ||
AddProjectLockDetailsTypeFull AddProjectLockDetailsTypeEnum = "FULL" | ||
AddProjectLockDetailsTypeDelete AddProjectLockDetailsTypeEnum = "DELETE" | ||
) | ||
|
||
var mappingAddProjectLockDetailsTypeEnum = map[string]AddProjectLockDetailsTypeEnum{ | ||
"FULL": AddProjectLockDetailsTypeFull, | ||
"DELETE": AddProjectLockDetailsTypeDelete, | ||
} | ||
|
||
var mappingAddProjectLockDetailsTypeEnumLowerCase = map[string]AddProjectLockDetailsTypeEnum{ | ||
"full": AddProjectLockDetailsTypeFull, | ||
"delete": AddProjectLockDetailsTypeDelete, | ||
} | ||
|
||
// GetAddProjectLockDetailsTypeEnumValues Enumerates the set of values for AddProjectLockDetailsTypeEnum | ||
func GetAddProjectLockDetailsTypeEnumValues() []AddProjectLockDetailsTypeEnum { | ||
values := make([]AddProjectLockDetailsTypeEnum, 0) | ||
for _, v := range mappingAddProjectLockDetailsTypeEnum { | ||
values = append(values, v) | ||
} | ||
return values | ||
} | ||
|
||
// GetAddProjectLockDetailsTypeEnumStringValues Enumerates the set of values in String for AddProjectLockDetailsTypeEnum | ||
func GetAddProjectLockDetailsTypeEnumStringValues() []string { | ||
return []string{ | ||
"FULL", | ||
"DELETE", | ||
} | ||
} | ||
|
||
// GetMappingAddProjectLockDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum | ||
func GetMappingAddProjectLockDetailsTypeEnum(val string) (AddProjectLockDetailsTypeEnum, bool) { | ||
enum, ok := mappingAddProjectLockDetailsTypeEnumLowerCase[strings.ToLower(val)] | ||
return enum, ok | ||
} |
Oops, something went wrong.