-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'bitbucket/github' into release_2024-01-30
- Loading branch information
Showing
224 changed files
with
12,381 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
capacitymanagement/create_occ_availability_catalog_details.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,67 @@ | ||
// 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. | ||
|
||
// OciControlCenterCp API | ||
// | ||
// A description of the OciControlCenterCp API | ||
// | ||
|
||
package capacitymanagement | ||
|
||
import ( | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// CreateOccAvailabilityCatalogDetails Details about the create request for the availability catalog. | ||
type CreateOccAvailabilityCatalogDetails struct { | ||
|
||
// The OCID of the customer group. | ||
OccCustomerGroupId *string `mandatory:"true" json:"occCustomerGroupId"` | ||
|
||
// The name of the OCI service in consideration. For example, Compute, Exadata, and so on. | ||
Namespace NamespaceEnum `mandatory:"true" json:"namespace"` | ||
|
||
// Since all resources are at tenancy level hence this will be the ocid of the tenancy where operation is to be performed. | ||
CompartmentId *string `mandatory:"true" json:"compartmentId"` | ||
|
||
// The base 64 encoded string corresponding to the catalog file contents. | ||
Base64EncodedCatalogDetails *string `mandatory:"true" json:"base64EncodedCatalogDetails"` | ||
|
||
// The display name of the availability catalog. | ||
DisplayName *string `mandatory:"true" json:"displayName"` | ||
|
||
MetadataDetails *MetadataDetails `mandatory:"false" json:"metadataDetails"` | ||
|
||
// Additional information about the availability catalog. | ||
Description *string `mandatory:"false" json:"description"` | ||
|
||
// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. | ||
// Example: `{"bar-key": "value"}` | ||
FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` | ||
|
||
// Defined tags for this resource. Each key is predefined and scoped to a namespace. | ||
// Example: `{"foo-namespace": {"bar-key": "value"}}` | ||
DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` | ||
} | ||
|
||
func (m CreateOccAvailabilityCatalogDetails) 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 CreateOccAvailabilityCatalogDetails) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
if _, ok := GetMappingNamespaceEnum(string(m.Namespace)); !ok && m.Namespace != "" { | ||
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Namespace: %s. Supported values are: %s.", m.Namespace, strings.Join(GetNamespaceEnumStringValues(), ","))) | ||
} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} |
105 changes: 105 additions & 0 deletions
105
capacitymanagement/create_occ_availability_catalog_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,105 @@ | ||
// 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 capacitymanagement | ||
|
||
import ( | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"net/http" | ||
"strings" | ||
) | ||
|
||
// CreateOccAvailabilityCatalogRequest wrapper for the CreateOccAvailabilityCatalog operation | ||
// | ||
// # See also | ||
// | ||
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/capacitymanagement/CreateOccAvailabilityCatalog.go.html to see an example of how to use CreateOccAvailabilityCatalogRequest. | ||
type CreateOccAvailabilityCatalogRequest struct { | ||
|
||
// The request details for creating an availability catalog. | ||
CreateOccAvailabilityCatalogDetails `contributesTo:"body"` | ||
|
||
// 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. | ||
OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` | ||
|
||
// The client request ID for tracing. The only valid characters for request IDs are letters, numbers, | ||
// underscore, and dash. | ||
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 CreateOccAvailabilityCatalogRequest) String() string { | ||
return common.PointerString(request) | ||
} | ||
|
||
// HTTPRequest implements the OCIRequest interface | ||
func (request CreateOccAvailabilityCatalogRequest) 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 CreateOccAvailabilityCatalogRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { | ||
|
||
return nil, false | ||
|
||
} | ||
|
||
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. | ||
func (request CreateOccAvailabilityCatalogRequest) 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 CreateOccAvailabilityCatalogRequest) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} | ||
|
||
// CreateOccAvailabilityCatalogResponse wrapper for the CreateOccAvailabilityCatalog operation | ||
type CreateOccAvailabilityCatalogResponse struct { | ||
|
||
// The underlying http response | ||
RawResponse *http.Response | ||
|
||
// The OccAvailabilityCatalog instance | ||
OccAvailabilityCatalog `presentIn:"body"` | ||
|
||
// For optimistic concurrency control. See `if-match`. | ||
Etag *string `presentIn:"header" name:"etag"` | ||
|
||
// 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. | ||
OpcRequestId *string `presentIn:"header" name:"opc-request-id"` | ||
|
||
// A decimal number representing the number of seconds the client should wait before polling this endpoint again. | ||
RetryAfter *int `presentIn:"header" name:"retry-after"` | ||
} | ||
|
||
func (response CreateOccAvailabilityCatalogResponse) String() string { | ||
return common.PointerString(response) | ||
} | ||
|
||
// HTTPResponse implements the OCIResponse interface | ||
func (response CreateOccAvailabilityCatalogResponse) HTTPResponse() *http.Response { | ||
return response.RawResponse | ||
} |
Oops, something went wrong.