Class: OCI::FleetAppsManagement::Models::BaseVariable
- Inherits:
-
Object
- Object
- OCI::FleetAppsManagement::Models::BaseVariable
- Defined in:
- lib/oci/fleet_apps_management/models/base_variable.rb
Overview
Base definition for a schema variable, including common metadata such as type, title, description, and validation constraints. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
ApmDomainVariable, ArrayVariable, AutonomousContainerDbVariable, AutonomousDataBaseVariable, AutonomousDatabaseVersionVariable, AvailabilityDomainVariable, BooleanVariable, CloudVmClusterId, CompartmentVariable, ContainerClusterVariable, DataBaseVariable, DatabaseCdbId, DatabaseDataGuardId, DatabaseDataguardAssociationId, DatabaseDbNodeId, DatabaseExadataId, DatetimeVariable, DbHomeVariable, DbHomeVersionVariable, DbSystemVariable, DynamicGroupsVariable, EnumVariable, FaultDomainVariable, FileStorageExportSetId, FileStorageFilesystemId, FileStorageMountTargetId, FileVariable, GroupsVariable, IdentityDomainVariable, ImageVariable, InstanceShapeVariable, InstanceShapeVariableWithFlex, InstanceVariable, IntegerVariable, KmsKeyVariable, KmsSecretVariable, KmsVaultVariable, KubernetesVersionsVariable, LoadBalancerReservedIps, LoadBalancerVariable, LogAnalyticsEntityTypes, LogAnalyticsLogEntities, LogAnalyticsLogGroup, LogAnalyticsScheduledTasks, LogAnalyticsSources, ManagementAgents, MountTargetsVariable, MultilineVariable, MysqlConfigurationId, MysqlShapeId, NatGatewayVariable, NetworkLoadBalancerId, NsgVariable, NumberVariable, ObjectStorageBucketName, OdsProjectVariable, PasswordVariable, PrivateEndpointVariable, RegionVariable, ServiceGatewayVariable, SshPublicKeyVariable, StringVariable, SubnetVariable, TagVariable, VcnNetworkSecurityGroupId, VcnSecListId, VcnVariable, VolumeBackupPoliciesVariable, VolumeId
Constant Summary collapse
- TYPE_ENUM =
[ TYPE_ARRAY = 'ARRAY'.freeze, TYPE_BOOLEAN = 'BOOLEAN'.freeze, TYPE_ENUM_VALUE = 'ENUM'.freeze, TYPE_INTEGER = 'INTEGER'.freeze, TYPE_NUMBER = 'NUMBER'.freeze, TYPE_STRING = 'STRING'.freeze, TYPE_TEXT = 'TEXT'.freeze, TYPE_FILE = 'FILE'.freeze, TYPE_PASSWORD = 'PASSWORD'.freeze, TYPE_DATETIME = 'DATETIME'.freeze, TYPE_DUMMY = 'DUMMY'.freeze, TYPE_OCI_IDENTITY_DOMAINS_ID = 'OCI_IDENTITY_DOMAINS_ID'.freeze, TYPE_OCI_CORE_IMAGE_ID = 'OCI_CORE_IMAGE_ID'.freeze, TYPE_OCI_CORE_INSTANCESHAPEWITHFLEX_NAME = 'OCI_CORE_INSTANCESHAPEWITHFLEX_NAME'.freeze, TYPE_OCI_CORE_INSTANCESHAPE_NAME = 'OCI_CORE_INSTANCESHAPE_NAME'.freeze, TYPE_OCI_CORE_NATGATEWAY_ID = 'OCI_CORE_NATGATEWAY_ID'.freeze, TYPE_OCI_CORE_INSTANCE_ID = 'OCI_CORE_INSTANCE_ID'.freeze, TYPE_OCI_CORE_SUBNET_ID = 'OCI_CORE_SUBNET_ID'.freeze, TYPE_OCI_CORE_SERVICEGATEWAY_ID = 'OCI_CORE_SERVICEGATEWAY_ID'.freeze, TYPE_OCI_LOGAN_LOGGROUP_ID = 'OCI_LOGAN_LOGGROUP_ID'.freeze, TYPE_OCI_LOGAN_SCHEDULEDTASK_ID = 'OCI_LOGAN_SCHEDULEDTASK_ID'.freeze, TYPE_OCI_LOGAN_LOGENTITY_ID = 'OCI_LOGAN_LOGENTITY_ID'.freeze, TYPE_OCI_LOGAN_ENTITYTYPE_ID = 'OCI_LOGAN_ENTITYTYPE_ID'.freeze, TYPE_OCI_MGMT_AGENT_ID = 'OCI_MGMT_AGENT_ID'.freeze, TYPE_OCI_LOGAN_SOURCE_ID = 'OCI_LOGAN_SOURCE_ID'.freeze, TYPE_OCI_CORE_NSG_ID = 'OCI_CORE_NSG_ID'.freeze, TYPE_OCI_CORE_VCN_ID = 'OCI_CORE_VCN_ID'.freeze, TYPE_OCI_IDENTITY_AVAILABILITYDOMAIN_NAME = 'OCI_IDENTITY_AVAILABILITYDOMAIN_NAME'.freeze, TYPE_OCI_IDENTITY_COMPARTMENT_ID = 'OCI_IDENTITY_COMPARTMENT_ID'.freeze, TYPE_OCI_IDENTITY_FAULTDOMAIN_NAME = 'OCI_IDENTITY_FAULTDOMAIN_NAME'.freeze, TYPE_OCI_IDENTITY_REGION_NAME = 'OCI_IDENTITY_REGION_NAME'.freeze, TYPE_OCI_DATABASE_DBSYSTEM_ID = 'OCI_DATABASE_DBSYSTEM_ID'.freeze, TYPE_OCI_DATABASE_DBHOME_ID = 'OCI_DATABASE_DBHOME_ID'.freeze, TYPE_OCI_DATABASE_DBHOME_DBVERSION = 'OCI_DATABASE_DBHOME_DBVERSION'.freeze, TYPE_OCI_DATABASE_DATABASE_ID = 'OCI_DATABASE_DATABASE_ID'.freeze, TYPE_OCI_DATABASE_AUTONOMOUSDATABASE_ID = 'OCI_DATABASE_AUTONOMOUSDATABASE_ID'.freeze, TYPE_OCI_DATABASE_AUTONOMOUSDATABASEVERSION_ID = 'OCI_DATABASE_AUTONOMOUSDATABASEVERSION_ID'.freeze, TYPE_OCI_DATABASE_AUTONOMOUSCONTAINERDATABASE_ID = 'OCI_DATABASE_AUTONOMOUSCONTAINERDATABASE_ID'.freeze, TYPE_OCI_KMS_KEY_ID = 'OCI_KMS_KEY_ID'.freeze, TYPE_OCI_KMS_SECRET_ID = 'OCI_KMS_SECRET_ID'.freeze, TYPE_OCI_CONTAINER_CLUSTER_ID = 'OCI_CONTAINER_CLUSTER_ID'.freeze, TYPE_OCI_KUBERNETES_VERSIONS_ID = 'OCI_KUBERNETES_VERSIONS_ID'.freeze, TYPE_OCI_BLOCKSTORAGE_POLICIES_ID = 'OCI_BLOCKSTORAGE_POLICIES_ID'.freeze, TYPE_OCI_IDENTITY_GROUPS_ID = 'OCI_IDENTITY_GROUPS_ID'.freeze, TYPE_OCI_IDENTITY_DYNAMICGROUPS_ID = 'OCI_IDENTITY_DYNAMICGROUPS_ID'.freeze, TYPE_OCI_LOADBALANCER_LOADBALANCER_ID = 'OCI_LOADBALANCER_LOADBALANCER_ID'.freeze, TYPE_OCI_MOUNT_TARGET_ID = 'OCI_MOUNT_TARGET_ID'.freeze, TYPE_OCI_IDENTITY_TAG_VALUE = 'OCI_IDENTITY_TAG_VALUE'.freeze, TYPE_OCI_ODS_PROJECT_ID = 'OCI_ODS_PROJECT_ID'.freeze, TYPE_OCI_RESOURCEMANAGER_PRIVATEENDPOINT_ID = 'OCI_RESOURCEMANAGER_PRIVATEENDPOINT_ID'.freeze, TYPE_OCI_APM_DOMAIN_ID = 'OCI_APM_DOMAIN_ID'.freeze, TYPE_OCI_CORE_SSH_PUBLICKEY = 'OCI_CORE_SSH_PUBLICKEY'.freeze, TYPE_OCI_KMS_VAULT_ID = 'OCI_KMS_VAULT_ID'.freeze, TYPE_OCI_LOADBALANCER_NETWORKLOADBALANCER_ID = 'OCI_LOADBALANCER_NETWORKLOADBALANCER_ID'.freeze, TYPE_OCI_LOADBALANCER_LOADBALANCER_RESERVEDIPS_ID = 'OCI_LOADBALANCER_LOADBALANCER_RESERVEDIPS_ID'.freeze, TYPE_OCI_DATABASE_MYSQL_SHAPE_ID = 'OCI_DATABASE_MYSQL_SHAPE_ID'.freeze, TYPE_OCI_DATABASE_MYSQL_CONFIGURATION_ID = 'OCI_DATABASE_MYSQL_CONFIGURATION_ID'.freeze, TYPE_OCI_STORAGE_FILESTORAGE_EXPORTSET_ID = 'OCI_STORAGE_FILESTORAGE_EXPORTSET_ID'.freeze, TYPE_OCI_STORAGE_FILESTORAGE_FILESYSTEM_ID = 'OCI_STORAGE_FILESTORAGE_FILESYSTEM_ID'.freeze, TYPE_OCI_STORAGE_OBJECTSTORAGE_BUCKET_NAME = 'OCI_STORAGE_OBJECTSTORAGE_BUCKET_NAME'.freeze, TYPE_OCI_CORE_VCN_SECLIST_ID = 'OCI_CORE_VCN_SECLIST_ID'.freeze, TYPE_OCI_CORE_VOLUME_ID = 'OCI_CORE_VOLUME_ID'.freeze, TYPE_OCI_DATABASE_DATAGUARD_ID = 'OCI_DATABASE_DATAGUARD_ID'.freeze, TYPE_OCI_DATABASE_EXADATA_ID = 'OCI_DATABASE_EXADATA_ID'.freeze, TYPE_OCI_DATABASE_CLOUDVMCLUSTER_ID = 'OCI_DATABASE_CLOUDVMCLUSTER_ID'.freeze, TYPE_OCI_DATABASE_CDB_ID = 'OCI_DATABASE_CDB_ID'.freeze, TYPE_OCI_DATABASE_DATAGUARDASSOCIATION_ID = 'OCI_DATABASE_DATAGUARDASSOCIATION_ID'.freeze, TYPE_OCI_DATABASE_DBNODE_ID = 'OCI_DATABASE_DBNODE_ID'.freeze, TYPE_OCI_CORE_VCN_NETWORKSECURITYGROUP_ID = 'OCI_CORE_VCN_NETWORKSECURITYGROUP_ID'.freeze, TYPE_OCI_STORAGE_FILESTORAGE_MOUNTTARGET_ID = 'OCI_STORAGE_FILESTORAGE_MOUNTTARGET_ID'.freeze, TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#description ⇒ String
Detailed information about this variable's purpose and usage.
-
#is_required ⇒ BOOLEAN
Indicates if this input variable is required for stack execution.
-
#title ⇒ String
The display name for the variable as shown in the UI.
-
#type ⇒ String
[Required] Type of the variable.
-
#visible ⇒ String
Hint to control whether this variable is visible.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ BaseVariable
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ BaseVariable
Initializes the object
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 227 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.type = attributes[:'type'] if attributes[:'type'] self.title = attributes[:'title'] if attributes[:'title'] self.description = attributes[:'description'] if attributes[:'description'] self.is_required = attributes[:'isRequired'] unless attributes[:'isRequired'].nil? self.is_required = false if is_required.nil? && !attributes.key?(:'isRequired') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isRequired and :is_required' if attributes.key?(:'isRequired') && attributes.key?(:'is_required') self.is_required = attributes[:'is_required'] unless attributes[:'is_required'].nil? self.is_required = false if is_required.nil? && !attributes.key?(:'isRequired') && !attributes.key?(:'is_required') # rubocop:disable Style/StringLiterals self.visible = attributes[:'visible'] if attributes[:'visible'] end |
Instance Attribute Details
#description ⇒ String
Detailed information about this variable's purpose and usage.
97 98 99 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 97 def description @description end |
#is_required ⇒ BOOLEAN
Indicates if this input variable is required for stack execution.
101 102 103 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 101 def is_required @is_required end |
#title ⇒ String
The display name for the variable as shown in the UI.
93 94 95 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 93 def title @title end |
#type ⇒ String
[Required] Type of the variable.
89 90 91 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 89 def type @type end |
#visible ⇒ String
Hint to control whether this variable is visible.
105 106 107 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 105 def visible @visible end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 108 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'title': :'title', 'description': :'description', 'is_required': :'isRequired', 'visible': :'visible' # rubocop:enable Style/SymbolLiteral } end |
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 138 def self.get_subtype(object_hash) type = object_hash[:'type'] # rubocop:disable Style/SymbolLiteral return 'OCI::FleetAppsManagement::Models::NetworkLoadBalancerId' if type == 'OCI_LOADBALANCER_NETWORKLOADBALANCER_ID' return 'OCI::FleetAppsManagement::Models::FileVariable' if type == 'FILE' return 'OCI::FleetAppsManagement::Models::NatGatewayVariable' if type == 'OCI_CORE_NATGATEWAY_ID' return 'OCI::FleetAppsManagement::Models::EnumVariable' if type == 'ENUM' return 'OCI::FleetAppsManagement::Models::InstanceShapeVariable' if type == 'OCI_CORE_INSTANCESHAPE_NAME' return 'OCI::FleetAppsManagement::Models::AutonomousContainerDbVariable' if type == 'OCI_DATABASE_AUTONOMOUSCONTAINERDATABASE_ID' return 'OCI::FleetAppsManagement::Models::DataBaseVariable' if type == 'OCI_DATABASE_DATABASE_ID' return 'OCI::FleetAppsManagement::Models::AutonomousDatabaseVersionVariable' if type == 'OCI_DATABASE_AUTONOMOUSDATABASEVERSION_ID' return 'OCI::FleetAppsManagement::Models::RegionVariable' if type == 'OCI_IDENTITY_REGION_NAME' return 'OCI::FleetAppsManagement::Models::VolumeId' if type == 'OCI_CORE_VOLUME_ID' return 'OCI::FleetAppsManagement::Models::VcnNetworkSecurityGroupId' if type == 'OCI_CORE_VCN_NETWORKSECURITYGROUP_ID' return 'OCI::FleetAppsManagement::Models::IntegerVariable' if type == 'INTEGER' return 'OCI::FleetAppsManagement::Models::DatabaseDbNodeId' if type == 'OCI_DATABASE_DBNODE_ID' return 'OCI::FleetAppsManagement::Models::MultilineVariable' if type == 'TEXT' return 'OCI::FleetAppsManagement::Models::PasswordVariable' if type == 'PASSWORD' return 'OCI::FleetAppsManagement::Models::ArrayVariable' if type == 'ARRAY' return 'OCI::FleetAppsManagement::Models::ManagementAgents' if type == 'OCI_MGMT_AGENT_ID' return 'OCI::FleetAppsManagement::Models::VolumeBackupPoliciesVariable' if type == 'OCI_BLOCKSTORAGE_POLICIES_ID' return 'OCI::FleetAppsManagement::Models::LogAnalyticsScheduledTasks' if type == 'OCI_LOGAN_SCHEDULEDTASK_ID' return 'OCI::FleetAppsManagement::Models::KmsVaultVariable' if type == 'OCI_KMS_VAULT_ID' return 'OCI::FleetAppsManagement::Models::ServiceGatewayVariable' if type == 'OCI_CORE_SERVICEGATEWAY_ID' return 'OCI::FleetAppsManagement::Models::LogAnalyticsLogEntities' if type == 'OCI_LOGAN_LOGENTITY_ID' return 'OCI::FleetAppsManagement::Models::VcnSecListId' if type == 'OCI_CORE_VCN_SECLIST_ID' return 'OCI::FleetAppsManagement::Models::NsgVariable' if type == 'OCI_CORE_NSG_ID' return 'OCI::FleetAppsManagement::Models::DynamicGroupsVariable' if type == 'OCI_IDENTITY_DYNAMICGROUPS_ID' return 'OCI::FleetAppsManagement::Models::OdsProjectVariable' if type == 'OCI_ODS_PROJECT_ID' return 'OCI::FleetAppsManagement::Models::MountTargetsVariable' if type == 'OCI_MOUNT_TARGET_ID' return 'OCI::FleetAppsManagement::Models::IdentityDomainVariable' if type == 'OCI_IDENTITY_DOMAINS_ID' return 'OCI::FleetAppsManagement::Models::ObjectStorageBucketName' if type == 'OCI_STORAGE_OBJECTSTORAGE_BUCKET_NAME' return 'OCI::FleetAppsManagement::Models::MysqlConfigurationId' if type == 'OCI_DATABASE_MYSQL_CONFIGURATION_ID' return 'OCI::FleetAppsManagement::Models::FileStorageExportSetId' if type == 'OCI_STORAGE_FILESTORAGE_EXPORTSET_ID' return 'OCI::FleetAppsManagement::Models::KmsSecretVariable' if type == 'OCI_KMS_SECRET_ID' return 'OCI::FleetAppsManagement::Models::DatetimeVariable' if type == 'DATETIME' return 'OCI::FleetAppsManagement::Models::DatabaseDataguardAssociationId' if type == 'OCI_DATABASE_DATAGUARDASSOCIATION_ID' return 'OCI::FleetAppsManagement::Models::LogAnalyticsEntityTypes' if type == 'OCI_LOGAN_ENTITYTYPE_ID' return 'OCI::FleetAppsManagement::Models::GroupsVariable' if type == 'OCI_IDENTITY_GROUPS_ID' return 'OCI::FleetAppsManagement::Models::ApmDomainVariable' if type == 'OCI_APM_DOMAIN_ID' return 'OCI::FleetAppsManagement::Models::AutonomousDataBaseVariable' if type == 'OCI_DATABASE_AUTONOMOUSDATABASE_ID' return 'OCI::FleetAppsManagement::Models::AvailabilityDomainVariable' if type == 'OCI_IDENTITY_AVAILABILITYDOMAIN_NAME' return 'OCI::FleetAppsManagement::Models::KubernetesVersionsVariable' if type == 'OCI_KUBERNETES_VERSIONS_ID' return 'OCI::FleetAppsManagement::Models::LoadBalancerVariable' if type == 'OCI_LOADBALANCER_LOADBALANCER_ID' return 'OCI::FleetAppsManagement::Models::ImageVariable' if type == 'OCI_CORE_IMAGE_ID' return 'OCI::FleetAppsManagement::Models::LoadBalancerReservedIps' if type == 'OCI_LOADBALANCER_LOADBALANCER_RESERVEDIPS_ID' return 'OCI::FleetAppsManagement::Models::KmsKeyVariable' if type == 'OCI_KMS_KEY_ID' return 'OCI::FleetAppsManagement::Models::LogAnalyticsSources' if type == 'OCI_LOGAN_SOURCE_ID' return 'OCI::FleetAppsManagement::Models::DatabaseDataGuardId' if type == 'OCI_DATABASE_DATAGUARD_ID' return 'OCI::FleetAppsManagement::Models::TagVariable' if type == 'OCI_IDENTITY_TAG_VALUE' return 'OCI::FleetAppsManagement::Models::CloudVmClusterId' if type == 'OCI_DATABASE_CLOUDVMCLUSTER_ID' return 'OCI::FleetAppsManagement::Models::PrivateEndpointVariable' if type == 'OCI_RESOURCEMANAGER_PRIVATEENDPOINT_ID' return 'OCI::FleetAppsManagement::Models::ContainerClusterVariable' if type == 'OCI_CONTAINER_CLUSTER_ID' return 'OCI::FleetAppsManagement::Models::MysqlShapeId' if type == 'OCI_DATABASE_MYSQL_SHAPE_ID' return 'OCI::FleetAppsManagement::Models::VcnVariable' if type == 'OCI_CORE_VCN_ID' return 'OCI::FleetAppsManagement::Models::CompartmentVariable' if type == 'OCI_IDENTITY_COMPARTMENT_ID' return 'OCI::FleetAppsManagement::Models::FaultDomainVariable' if type == 'OCI_IDENTITY_FAULTDOMAIN_NAME' return 'OCI::FleetAppsManagement::Models::InstanceShapeVariableWithFlex' if type == 'OCI_CORE_INSTANCESHAPEWITHFLEX_NAME' return 'OCI::FleetAppsManagement::Models::StringVariable' if type == 'STRING' return 'OCI::FleetAppsManagement::Models::InstanceVariable' if type == 'OCI_CORE_INSTANCE_ID' return 'OCI::FleetAppsManagement::Models::DatabaseExadataId' if type == 'OCI_DATABASE_EXADATA_ID' return 'OCI::FleetAppsManagement::Models::DbHomeVariable' if type == 'OCI_DATABASE_DBHOME_ID' return 'OCI::FleetAppsManagement::Models::FileStorageFilesystemId' if type == 'OCI_STORAGE_FILESTORAGE_FILESYSTEM_ID' return 'OCI::FleetAppsManagement::Models::NumberVariable' if type == 'NUMBER' return 'OCI::FleetAppsManagement::Models::SubnetVariable' if type == 'OCI_CORE_SUBNET_ID' return 'OCI::FleetAppsManagement::Models::SshPublicKeyVariable' if type == 'OCI_CORE_SSH_PUBLICKEY' return 'OCI::FleetAppsManagement::Models::LogAnalyticsLogGroup' if type == 'OCI_LOGAN_LOGGROUP_ID' return 'OCI::FleetAppsManagement::Models::BooleanVariable' if type == 'BOOLEAN' return 'OCI::FleetAppsManagement::Models::DbSystemVariable' if type == 'OCI_DATABASE_DBSYSTEM_ID' return 'OCI::FleetAppsManagement::Models::FileStorageMountTargetId' if type == 'OCI_STORAGE_FILESTORAGE_MOUNTTARGET_ID' return 'OCI::FleetAppsManagement::Models::DatabaseCdbId' if type == 'OCI_DATABASE_CDB_ID' return 'OCI::FleetAppsManagement::Models::DbHomeVersionVariable' if type == 'OCI_DATABASE_DBHOME_DBVERSION' # TODO: Log a warning when the subtype is not found. 'OCI::FleetAppsManagement::Models::BaseVariable' end |
.swagger_types ⇒ Object
Attribute type mapping.
121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 121 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'title': :'String', 'description': :'String', 'is_required': :'BOOLEAN', 'visible': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
270 271 272 273 274 275 276 277 278 279 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 270 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && title == other.title && description == other.description && is_required == other.is_required && visible == other.visible end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 304 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
284 285 286 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 284 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
293 294 295 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 293 def hash [type, title, description, is_required, visible].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
337 338 339 340 341 342 343 344 345 346 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 337 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
331 332 333 |
# File 'lib/oci/fleet_apps_management/models/base_variable.rb', line 331 def to_s to_hash.to_s end |