|
| 1 | +// Copyright (c) 2016, 2018, 2025, Oracle and/or its affiliates. All rights reserved. |
| 2 | +// 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. |
| 3 | +// Code generated. DO NOT EDIT. |
| 4 | + |
| 5 | +// AiDataPlatform Control Plane API |
| 6 | +// |
| 7 | +// Use the AiDataPlatform Control Plane API to manage Data Lakes. |
| 8 | +// |
| 9 | + |
| 10 | +package aidataplatform |
| 11 | + |
| 12 | +import ( |
| 13 | + "fmt" |
| 14 | + "github.com/oracle/oci-go-sdk/v65/common" |
| 15 | + "strings" |
| 16 | +) |
| 17 | + |
| 18 | +// AiDataPlatform An AiDataPlatform is a unified platform for lifecycle management and governance of data and AI objects. |
| 19 | +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to |
| 20 | +// an administrator. If you're an administrator who needs to write policies to give users access, see |
| 21 | +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). |
| 22 | +type AiDataPlatform struct { |
| 23 | + |
| 24 | + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the AiDataPlatform. |
| 25 | + Id *string `mandatory:"true" json:"id"` |
| 26 | + |
| 27 | + // A user-friendly name. Does not have to be unique, and it's changeable. |
| 28 | + DisplayName *string `mandatory:"true" json:"displayName"` |
| 29 | + |
| 30 | + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. |
| 31 | + CompartmentId *string `mandatory:"true" json:"compartmentId"` |
| 32 | + |
| 33 | + // The AiDataPlatform type. |
| 34 | + AiDataPlatformType *string `mandatory:"true" json:"aiDataPlatformType"` |
| 35 | + |
| 36 | + // The date and time the AiDataPlatform was created, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). |
| 37 | + // Example: `2016-08-25T21:10:29.600Z` |
| 38 | + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` |
| 39 | + |
| 40 | + // The current state of the AiDataPlatform. |
| 41 | + LifecycleState AiDataPlatformLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` |
| 42 | + |
| 43 | + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. |
| 44 | + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). |
| 45 | + // Example: `{"Department": "Finance"}` |
| 46 | + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` |
| 47 | + |
| 48 | + // Defined tags for this resource. Each key is predefined and scoped to a namespace. |
| 49 | + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). |
| 50 | + // Example: `{"Operations": {"CostCenter": "42"}}` |
| 51 | + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` |
| 52 | + |
| 53 | + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IAM user. |
| 54 | + CreatedBy *string `mandatory:"false" json:"createdBy"` |
| 55 | + |
| 56 | + // The date and time the AiDataPlatform was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). |
| 57 | + // Example: `2016-08-25T21:10:29.600Z` |
| 58 | + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` |
| 59 | + |
| 60 | + // The alias Id of the AiDataPlatform which is the short form of OCID. |
| 61 | + AliasKey *string `mandatory:"false" json:"aliasKey"` |
| 62 | + |
| 63 | + // The WebSocket URL of the AiDataPlatform. |
| 64 | + WebSocketEndpoint *string `mandatory:"false" json:"webSocketEndpoint"` |
| 65 | + |
| 66 | + // A message that describes the current state of the AiDataPlatform in more detail. For example, |
| 67 | + // can be used to provide actionable information for a resource in the Failed state. |
| 68 | + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` |
| 69 | + |
| 70 | + // System tags for this resource. Each key is predefined and scoped to a namespace. |
| 71 | + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` |
| 72 | + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` |
| 73 | +} |
| 74 | + |
| 75 | +func (m AiDataPlatform) String() string { |
| 76 | + return common.PointerString(m) |
| 77 | +} |
| 78 | + |
| 79 | +// ValidateEnumValue returns an error when providing an unsupported enum value |
| 80 | +// This function is being called during constructing API request process |
| 81 | +// Not recommended for calling this function directly |
| 82 | +func (m AiDataPlatform) ValidateEnumValue() (bool, error) { |
| 83 | + errMessage := []string{} |
| 84 | + if _, ok := GetMappingAiDataPlatformLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { |
| 85 | + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAiDataPlatformLifecycleStateEnumStringValues(), ","))) |
| 86 | + } |
| 87 | + |
| 88 | + if len(errMessage) > 0 { |
| 89 | + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) |
| 90 | + } |
| 91 | + return false, nil |
| 92 | +} |
| 93 | + |
| 94 | +// AiDataPlatformLifecycleStateEnum Enum with underlying type: string |
| 95 | +type AiDataPlatformLifecycleStateEnum string |
| 96 | + |
| 97 | +// Set of constants representing the allowable values for AiDataPlatformLifecycleStateEnum |
| 98 | +const ( |
| 99 | + AiDataPlatformLifecycleStateCreating AiDataPlatformLifecycleStateEnum = "CREATING" |
| 100 | + AiDataPlatformLifecycleStateUpdating AiDataPlatformLifecycleStateEnum = "UPDATING" |
| 101 | + AiDataPlatformLifecycleStateActive AiDataPlatformLifecycleStateEnum = "ACTIVE" |
| 102 | + AiDataPlatformLifecycleStateDeleting AiDataPlatformLifecycleStateEnum = "DELETING" |
| 103 | + AiDataPlatformLifecycleStateDeleted AiDataPlatformLifecycleStateEnum = "DELETED" |
| 104 | + AiDataPlatformLifecycleStateFailed AiDataPlatformLifecycleStateEnum = "FAILED" |
| 105 | +) |
| 106 | + |
| 107 | +var mappingAiDataPlatformLifecycleStateEnum = map[string]AiDataPlatformLifecycleStateEnum{ |
| 108 | + "CREATING": AiDataPlatformLifecycleStateCreating, |
| 109 | + "UPDATING": AiDataPlatformLifecycleStateUpdating, |
| 110 | + "ACTIVE": AiDataPlatformLifecycleStateActive, |
| 111 | + "DELETING": AiDataPlatformLifecycleStateDeleting, |
| 112 | + "DELETED": AiDataPlatformLifecycleStateDeleted, |
| 113 | + "FAILED": AiDataPlatformLifecycleStateFailed, |
| 114 | +} |
| 115 | + |
| 116 | +var mappingAiDataPlatformLifecycleStateEnumLowerCase = map[string]AiDataPlatformLifecycleStateEnum{ |
| 117 | + "creating": AiDataPlatformLifecycleStateCreating, |
| 118 | + "updating": AiDataPlatformLifecycleStateUpdating, |
| 119 | + "active": AiDataPlatformLifecycleStateActive, |
| 120 | + "deleting": AiDataPlatformLifecycleStateDeleting, |
| 121 | + "deleted": AiDataPlatformLifecycleStateDeleted, |
| 122 | + "failed": AiDataPlatformLifecycleStateFailed, |
| 123 | +} |
| 124 | + |
| 125 | +// GetAiDataPlatformLifecycleStateEnumValues Enumerates the set of values for AiDataPlatformLifecycleStateEnum |
| 126 | +func GetAiDataPlatformLifecycleStateEnumValues() []AiDataPlatformLifecycleStateEnum { |
| 127 | + values := make([]AiDataPlatformLifecycleStateEnum, 0) |
| 128 | + for _, v := range mappingAiDataPlatformLifecycleStateEnum { |
| 129 | + values = append(values, v) |
| 130 | + } |
| 131 | + return values |
| 132 | +} |
| 133 | + |
| 134 | +// GetAiDataPlatformLifecycleStateEnumStringValues Enumerates the set of values in String for AiDataPlatformLifecycleStateEnum |
| 135 | +func GetAiDataPlatformLifecycleStateEnumStringValues() []string { |
| 136 | + return []string{ |
| 137 | + "CREATING", |
| 138 | + "UPDATING", |
| 139 | + "ACTIVE", |
| 140 | + "DELETING", |
| 141 | + "DELETED", |
| 142 | + "FAILED", |
| 143 | + } |
| 144 | +} |
| 145 | + |
| 146 | +// GetMappingAiDataPlatformLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum |
| 147 | +func GetMappingAiDataPlatformLifecycleStateEnum(val string) (AiDataPlatformLifecycleStateEnum, bool) { |
| 148 | + enum, ok := mappingAiDataPlatformLifecycleStateEnumLowerCase[strings.ToLower(val)] |
| 149 | + return enum, ok |
| 150 | +} |
0 commit comments