oraclebmc 1.2.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{README.md → README_BMCS.md} +21 -26
- data/lib/oraclebmc.rb +1 -19
- metadata +16 -259
- data/lib/oraclebmc/api_client.rb +0 -306
- data/lib/oraclebmc/config.rb +0 -80
- data/lib/oraclebmc/config_file_loader.rb +0 -85
- data/lib/oraclebmc/core/blockstorage_client.rb +0 -460
- data/lib/oraclebmc/core/compute_client.rb +0 -1267
- data/lib/oraclebmc/core/core.rb +0 -112
- data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +0 -137
- data/lib/oraclebmc/core/models/attach_vnic_details.rb +0 -144
- data/lib/oraclebmc/core/models/attach_volume_details.rb +0 -165
- data/lib/oraclebmc/core/models/capture_console_history_details.rb +0 -120
- data/lib/oraclebmc/core/models/console_history.rb +0 -213
- data/lib/oraclebmc/core/models/cpe.rb +0 -169
- data/lib/oraclebmc/core/models/create_cpe_details.rb +0 -145
- data/lib/oraclebmc/core/models/create_cross_connect_details.rb +0 -204
- data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +0 -133
- data/lib/oraclebmc/core/models/create_dhcp_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +0 -142
- data/lib/oraclebmc/core/models/create_drg_details.rb +0 -131
- data/lib/oraclebmc/core/models/create_image_details.rb +0 -159
- data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +0 -168
- data/lib/oraclebmc/core/models/create_private_ip_details.rb +0 -173
- data/lib/oraclebmc/core/models/create_route_table_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_security_list_details.rb +0 -164
- data/lib/oraclebmc/core/models/create_subnet_details.rb +0 -257
- data/lib/oraclebmc/core/models/create_vcn_details.rb +0 -171
- data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +0 -260
- data/lib/oraclebmc/core/models/create_vnic_details.rb +0 -214
- data/lib/oraclebmc/core/models/create_volume_backup_details.rb +0 -133
- data/lib/oraclebmc/core/models/create_volume_details.rb +0 -170
- data/lib/oraclebmc/core/models/cross_connect.rb +0 -235
- data/lib/oraclebmc/core/models/cross_connect_group.rb +0 -187
- data/lib/oraclebmc/core/models/cross_connect_location.rb +0 -134
- data/lib/oraclebmc/core/models/cross_connect_mapping.rb +0 -190
- data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +0 -137
- data/lib/oraclebmc/core/models/cross_connect_status.rb +0 -200
- data/lib/oraclebmc/core/models/dhcp_dns_option.rb +0 -171
- data/lib/oraclebmc/core/models/dhcp_option.rb +0 -135
- data/lib/oraclebmc/core/models/dhcp_options.rb +0 -208
- data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +0 -141
- data/lib/oraclebmc/core/models/drg.rb +0 -186
- data/lib/oraclebmc/core/models/drg_attachment.rb +0 -208
- data/lib/oraclebmc/core/models/egress_security_rule.rb +0 -198
- data/lib/oraclebmc/core/models/export_image_details.rb +0 -134
- data/lib/oraclebmc/core/models/export_image_via_object_storage_tuple_details.rb +0 -150
- data/lib/oraclebmc/core/models/export_image_via_object_storage_uri_details.rb +0 -130
- data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +0 -145
- data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +0 -212
- data/lib/oraclebmc/core/models/icmp_options.rb +0 -131
- data/lib/oraclebmc/core/models/image.rb +0 -245
- data/lib/oraclebmc/core/models/image_source_details.rb +0 -134
- data/lib/oraclebmc/core/models/image_source_via_object_storage_tuple_details.rb +0 -150
- data/lib/oraclebmc/core/models/image_source_via_object_storage_uri_details.rb +0 -128
- data/lib/oraclebmc/core/models/ingress_security_rule.rb +0 -198
- data/lib/oraclebmc/core/models/instance.rb +0 -307
- data/lib/oraclebmc/core/models/instance_credentials.rb +0 -131
- data/lib/oraclebmc/core/models/internet_gateway.rb +0 -210
- data/lib/oraclebmc/core/models/ip_sec_connection.rb +0 -223
- data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +0 -153
- data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +0 -156
- data/lib/oraclebmc/core/models/launch_instance_details.rb +0 -336
- data/lib/oraclebmc/core/models/letter_of_authority.rb +0 -194
- data/lib/oraclebmc/core/models/port_range.rb +0 -133
- data/lib/oraclebmc/core/models/private_ip.rb +0 -248
- data/lib/oraclebmc/core/models/route_rule.rb +0 -135
- data/lib/oraclebmc/core/models/route_table.rb +0 -208
- data/lib/oraclebmc/core/models/security_list.rb +0 -219
- data/lib/oraclebmc/core/models/shape.rb +0 -122
- data/lib/oraclebmc/core/models/subnet.rb +0 -351
- data/lib/oraclebmc/core/models/tcp_options.rb +0 -135
- data/lib/oraclebmc/core/models/tunnel_config.rb +0 -151
- data/lib/oraclebmc/core/models/tunnel_status.rb +0 -178
- data/lib/oraclebmc/core/models/udp_options.rb +0 -135
- data/lib/oraclebmc/core/models/update_cpe_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_cross_connect_details.rb +0 -138
- data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_dhcp_details.rb +0 -132
- data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_drg_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_image_details.rb +0 -124
- data/lib/oraclebmc/core/models/update_instance_details.rb +0 -124
- data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +0 -133
- data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_private_ip_details.rb +0 -157
- data/lib/oraclebmc/core/models/update_route_table_details.rb +0 -133
- data/lib/oraclebmc/core/models/update_security_list_details.rb +0 -144
- data/lib/oraclebmc/core/models/update_subnet_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_vcn_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +0 -240
- data/lib/oraclebmc/core/models/update_vnic_details.rb +0 -144
- data/lib/oraclebmc/core/models/update_volume_backup_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_volume_details.rb +0 -122
- data/lib/oraclebmc/core/models/vcn.rb +0 -276
- data/lib/oraclebmc/core/models/virtual_circuit.rb +0 -395
- data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +0 -137
- data/lib/oraclebmc/core/models/vnic.rb +0 -287
- data/lib/oraclebmc/core/models/vnic_attachment.rb +0 -250
- data/lib/oraclebmc/core/models/volume.rb +0 -210
- data/lib/oraclebmc/core/models/volume_attachment.rb +0 -246
- data/lib/oraclebmc/core/models/volume_backup.rb +0 -235
- data/lib/oraclebmc/core/util.rb +0 -1
- data/lib/oraclebmc/core/virtual_network_client.rb +0 -3419
- data/lib/oraclebmc/errors.rb +0 -80
- data/lib/oraclebmc/global_context.rb +0 -21
- data/lib/oraclebmc/identity/identity.rb +0 -51
- data/lib/oraclebmc/identity/identity_client.rb +0 -1983
- data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +0 -131
- data/lib/oraclebmc/identity/models/api_key.rb +0 -211
- data/lib/oraclebmc/identity/models/availability_domain.rb +0 -131
- data/lib/oraclebmc/identity/models/compartment.rb +0 -211
- data/lib/oraclebmc/identity/models/create_api_key_details.rb +0 -120
- data/lib/oraclebmc/identity/models/create_compartment_details.rb +0 -145
- data/lib/oraclebmc/identity/models/create_group_details.rb +0 -144
- data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +0 -212
- data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +0 -133
- data/lib/oraclebmc/identity/models/create_policy_details.rb +0 -173
- data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +0 -127
- data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +0 -154
- data/lib/oraclebmc/identity/models/create_swift_password_details.rb +0 -121
- data/lib/oraclebmc/identity/models/create_user_details.rb +0 -144
- data/lib/oraclebmc/identity/models/group.rb +0 -211
- data/lib/oraclebmc/identity/models/identity_provider.rb +0 -256
- data/lib/oraclebmc/identity/models/idp_group_mapping.rb +0 -220
- data/lib/oraclebmc/identity/models/policy.rb +0 -237
- data/lib/oraclebmc/identity/models/region.rb +0 -141
- data/lib/oraclebmc/identity/models/region_subscription.rb +0 -178
- data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +0 -180
- data/lib/oraclebmc/identity/models/swift_password.rb +0 -226
- data/lib/oraclebmc/identity/models/tenancy.rb +0 -158
- data/lib/oraclebmc/identity/models/ui_password.rb +0 -187
- data/lib/oraclebmc/identity/models/update_compartment_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_group_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +0 -160
- data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +0 -131
- data/lib/oraclebmc/identity/models/update_policy_details.rb +0 -148
- data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +0 -145
- data/lib/oraclebmc/identity/models/update_state_details.rb +0 -121
- data/lib/oraclebmc/identity/models/update_swift_password_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_user_details.rb +0 -120
- data/lib/oraclebmc/identity/models/user.rb +0 -217
- data/lib/oraclebmc/identity/models/user_group_membership.rb +0 -209
- data/lib/oraclebmc/identity/util.rb +0 -1
- data/lib/oraclebmc/internal/internal.rb +0 -11
- data/lib/oraclebmc/internal/util.rb +0 -69
- data/lib/oraclebmc/load_balancer/load_balancer.rb +0 -46
- data/lib/oraclebmc/load_balancer/load_balancer_client.rb +0 -1281
- data/lib/oraclebmc/load_balancer/models/backend.rb +0 -220
- data/lib/oraclebmc/load_balancer/models/backend_details.rb +0 -206
- data/lib/oraclebmc/load_balancer/models/backend_set.rb +0 -179
- data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +0 -165
- data/lib/oraclebmc/load_balancer/models/certificate.rb +0 -167
- data/lib/oraclebmc/load_balancer/models/certificate_details.rb +0 -203
- data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +0 -206
- data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +0 -178
- data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +0 -203
- data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +0 -174
- data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +0 -219
- data/lib/oraclebmc/load_balancer/models/health_checker.rb +0 -223
- data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +0 -222
- data/lib/oraclebmc/load_balancer/models/ip_address.rb +0 -139
- data/lib/oraclebmc/load_balancer/models/listener.rb +0 -174
- data/lib/oraclebmc/load_balancer/models/listener_details.rb +0 -160
- data/lib/oraclebmc/load_balancer/models/load_balancer.rb +0 -280
- data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/session_persistence_configuration_details.rb +0 -141
- data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +0 -153
- data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +0 -153
- data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +0 -178
- data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +0 -165
- data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +0 -221
- data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +0 -160
- data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +0 -123
- data/lib/oraclebmc/load_balancer/models/work_request.rb +0 -229
- data/lib/oraclebmc/load_balancer/models/work_request_error.rb +0 -145
- data/lib/oraclebmc/load_balancer/util.rb +0 -55
- data/lib/oraclebmc/regions.rb +0 -41
- data/lib/oraclebmc/response.rb +0 -86
- data/lib/oraclebmc/signer.rb +0 -119
- data/lib/oraclebmc/version.rb +0 -5
- data/lib/oraclebmc/waiter.rb +0 -111
@@ -1,237 +0,0 @@
|
|
1
|
-
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
-
|
3
|
-
require 'date'
|
4
|
-
|
5
|
-
module OracleBMC
|
6
|
-
class Identity::Models::Policy
|
7
|
-
|
8
|
-
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
|
9
|
-
LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
|
10
|
-
LIFECYCLE_STATE_INACTIVE = 'INACTIVE',
|
11
|
-
LIFECYCLE_STATE_DELETING = 'DELETING',
|
12
|
-
LIFECYCLE_STATE_DELETED = 'DELETED',
|
13
|
-
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
14
|
-
|
15
|
-
# The OCID of the policy.
|
16
|
-
# @return [String]
|
17
|
-
attr_accessor :id
|
18
|
-
|
19
|
-
# The OCID of the compartment containing the policy (either the tenancy or another compartment).
|
20
|
-
#
|
21
|
-
# @return [String]
|
22
|
-
attr_accessor :compartment_id
|
23
|
-
|
24
|
-
# The name you assign to the policy during creation. The name must be unique across all policies
|
25
|
-
# in the tenancy and cannot be changed.
|
26
|
-
#
|
27
|
-
# @return [String]
|
28
|
-
attr_accessor :name
|
29
|
-
|
30
|
-
# An array of one or more policy statements written in the policy language.
|
31
|
-
# @return [Array<String>]
|
32
|
-
attr_accessor :statements
|
33
|
-
|
34
|
-
# The description you assign to the policy. Does not have to be unique, and it's changeable.
|
35
|
-
# @return [String]
|
36
|
-
attr_accessor :description
|
37
|
-
|
38
|
-
# Date and time the policy was created, in the format defined by RFC3339.
|
39
|
-
#
|
40
|
-
# Example: `2016-08-25T21:10:29.600Z`
|
41
|
-
#
|
42
|
-
# @return [DateTime]
|
43
|
-
attr_accessor :time_created
|
44
|
-
|
45
|
-
# The policy's current state. After creating a policy, make sure its `lifecycleState` changes from CREATING to
|
46
|
-
# ACTIVE before using it.
|
47
|
-
#
|
48
|
-
# @return [String]
|
49
|
-
attr_accessor :lifecycle_state
|
50
|
-
|
51
|
-
# The detailed status of INACTIVE lifecycleState.
|
52
|
-
# @return [Integer]
|
53
|
-
attr_accessor :inactive_status
|
54
|
-
|
55
|
-
# The version of the policy. If null or set to an empty string, when a request comes in for authorization, the
|
56
|
-
# policy will be evaluated according to the current behavior of the services at that moment. If set to a particular
|
57
|
-
# date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date.
|
58
|
-
#
|
59
|
-
# @return [DateTime]
|
60
|
-
attr_accessor :version_date
|
61
|
-
|
62
|
-
|
63
|
-
# Initializes the object
|
64
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
-
def initialize(attributes = {})
|
66
|
-
return unless attributes.is_a?(Hash)
|
67
|
-
|
68
|
-
# convert string to symbol for hash key
|
69
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
70
|
-
|
71
|
-
if attributes[:'id']
|
72
|
-
self.id = attributes[:'id']
|
73
|
-
end
|
74
|
-
|
75
|
-
if attributes[:'compartmentId']
|
76
|
-
self.compartment_id = attributes[:'compartmentId']
|
77
|
-
end
|
78
|
-
|
79
|
-
if attributes[:'name']
|
80
|
-
self.name = attributes[:'name']
|
81
|
-
end
|
82
|
-
|
83
|
-
if attributes[:'statements']
|
84
|
-
self.statements = attributes[:'statements']
|
85
|
-
end
|
86
|
-
|
87
|
-
if attributes[:'description']
|
88
|
-
self.description = attributes[:'description']
|
89
|
-
end
|
90
|
-
|
91
|
-
if attributes[:'timeCreated']
|
92
|
-
self.time_created = attributes[:'timeCreated']
|
93
|
-
end
|
94
|
-
|
95
|
-
if attributes[:'lifecycleState']
|
96
|
-
self.lifecycle_state = attributes[:'lifecycleState']
|
97
|
-
end
|
98
|
-
|
99
|
-
if attributes[:'inactiveStatus']
|
100
|
-
self.inactive_status = attributes[:'inactiveStatus']
|
101
|
-
end
|
102
|
-
|
103
|
-
if attributes[:'versionDate']
|
104
|
-
self.version_date = attributes[:'versionDate']
|
105
|
-
end
|
106
|
-
|
107
|
-
end
|
108
|
-
|
109
|
-
# Custom attribute writer method checking allowed values (enum).
|
110
|
-
# @param [Object] lifecycle_state Object to be assigned
|
111
|
-
def lifecycle_state=(lifecycle_state)
|
112
|
-
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
113
|
-
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
114
|
-
else
|
115
|
-
@lifecycle_state = lifecycle_state
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
# Checks equality by comparing each attribute.
|
120
|
-
# @param [Object] other_object to be compared
|
121
|
-
def ==(other_object)
|
122
|
-
return true if self.equal?(other_object)
|
123
|
-
self.class == other_object.class &&
|
124
|
-
id == other_object.id &&
|
125
|
-
compartment_id == other_object.compartment_id &&
|
126
|
-
name == other_object.name &&
|
127
|
-
statements == other_object.statements &&
|
128
|
-
description == other_object.description &&
|
129
|
-
time_created == other_object.time_created &&
|
130
|
-
lifecycle_state == other_object.lifecycle_state &&
|
131
|
-
inactive_status == other_object.inactive_status &&
|
132
|
-
version_date == other_object.version_date
|
133
|
-
end
|
134
|
-
|
135
|
-
# @see the `==` method
|
136
|
-
# @param [Object] other_object to be compared
|
137
|
-
def eql?(other_object)
|
138
|
-
self == other_object
|
139
|
-
end
|
140
|
-
|
141
|
-
# Calculates hash code according to all attributes.
|
142
|
-
# @return [Fixnum] Hash code
|
143
|
-
def hash
|
144
|
-
[id, compartment_id, name, statements, description, time_created, lifecycle_state, inactive_status, version_date].hash
|
145
|
-
end
|
146
|
-
|
147
|
-
# Builds the object from hash
|
148
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
149
|
-
# @return [Object] Returns the model itself
|
150
|
-
def build_from_hash(attributes)
|
151
|
-
return nil unless attributes.is_a?(Hash)
|
152
|
-
self.class.swagger_types.each_pair do |key, type|
|
153
|
-
if type =~ /^Array<(.*)>/i
|
154
|
-
# check to ensure the input is an array given that the the attribute
|
155
|
-
# is documented as an array but the input is not
|
156
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
157
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
158
|
-
end
|
159
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
160
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
161
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
162
|
-
end
|
163
|
-
|
164
|
-
self
|
165
|
-
end
|
166
|
-
|
167
|
-
# Returns the string representation of the object
|
168
|
-
# @return [String] String presentation of the object
|
169
|
-
def to_s
|
170
|
-
to_hash.to_s
|
171
|
-
end
|
172
|
-
|
173
|
-
# Returns the object in the form of hash
|
174
|
-
# @return [Hash] Returns the object in the form of hash
|
175
|
-
def to_hash
|
176
|
-
hash = {}
|
177
|
-
self.class.attribute_map.each_pair do |attr, param|
|
178
|
-
value = self.send(attr)
|
179
|
-
next if value.nil?
|
180
|
-
hash[param] = _to_hash(value)
|
181
|
-
end
|
182
|
-
hash
|
183
|
-
end
|
184
|
-
|
185
|
-
private
|
186
|
-
|
187
|
-
# Outputs non-array value in the form of hash
|
188
|
-
# For object, use to_hash. Otherwise, just return the value
|
189
|
-
# @param [Object] value Any valid value
|
190
|
-
# @return [Hash] Returns the value in the form of hash
|
191
|
-
def _to_hash(value)
|
192
|
-
if value.is_a?(Array)
|
193
|
-
value.compact.map{ |v| _to_hash(v) }
|
194
|
-
elsif value.is_a?(Hash)
|
195
|
-
{}.tap do |hash|
|
196
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
197
|
-
end
|
198
|
-
elsif value.respond_to? :to_hash
|
199
|
-
value.to_hash
|
200
|
-
else
|
201
|
-
value
|
202
|
-
end
|
203
|
-
end
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
208
|
-
def self.attribute_map
|
209
|
-
{
|
210
|
-
:'id' => :'id',
|
211
|
-
:'compartment_id' => :'compartmentId',
|
212
|
-
:'name' => :'name',
|
213
|
-
:'statements' => :'statements',
|
214
|
-
:'description' => :'description',
|
215
|
-
:'time_created' => :'timeCreated',
|
216
|
-
:'lifecycle_state' => :'lifecycleState',
|
217
|
-
:'inactive_status' => :'inactiveStatus',
|
218
|
-
:'version_date' => :'versionDate'
|
219
|
-
}
|
220
|
-
end
|
221
|
-
|
222
|
-
# Attribute type mapping.
|
223
|
-
def self.swagger_types
|
224
|
-
{
|
225
|
-
:'id' => :'String',
|
226
|
-
:'compartment_id' => :'String',
|
227
|
-
:'name' => :'String',
|
228
|
-
:'statements' => :'Array<String>',
|
229
|
-
:'description' => :'String',
|
230
|
-
:'time_created' => :'DateTime',
|
231
|
-
:'lifecycle_state' => :'String',
|
232
|
-
:'inactive_status' => :'Integer',
|
233
|
-
:'version_date' => :'DateTime'
|
234
|
-
}
|
235
|
-
end
|
236
|
-
end
|
237
|
-
end
|
@@ -1,141 +0,0 @@
|
|
1
|
-
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
-
|
3
|
-
require 'date'
|
4
|
-
|
5
|
-
module OracleBMC
|
6
|
-
class Identity::Models::Region
|
7
|
-
# The key of the region.
|
8
|
-
#
|
9
|
-
# Allowed values are:
|
10
|
-
# - `PHX`
|
11
|
-
# - `IAD`
|
12
|
-
#
|
13
|
-
# @return [String]
|
14
|
-
attr_accessor :key
|
15
|
-
|
16
|
-
# The name of the region.
|
17
|
-
#
|
18
|
-
# Allowed values are:
|
19
|
-
# - `us-phoenix-1`
|
20
|
-
# - `us-ashburn-1`
|
21
|
-
#
|
22
|
-
# @return [String]
|
23
|
-
attr_accessor :name
|
24
|
-
|
25
|
-
|
26
|
-
# Initializes the object
|
27
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
28
|
-
def initialize(attributes = {})
|
29
|
-
return unless attributes.is_a?(Hash)
|
30
|
-
|
31
|
-
# convert string to symbol for hash key
|
32
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
33
|
-
|
34
|
-
if attributes[:'key']
|
35
|
-
self.key = attributes[:'key']
|
36
|
-
end
|
37
|
-
|
38
|
-
if attributes[:'name']
|
39
|
-
self.name = attributes[:'name']
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
43
|
-
|
44
|
-
# Checks equality by comparing each attribute.
|
45
|
-
# @param [Object] other_object to be compared
|
46
|
-
def ==(other_object)
|
47
|
-
return true if self.equal?(other_object)
|
48
|
-
self.class == other_object.class &&
|
49
|
-
key == other_object.key &&
|
50
|
-
name == other_object.name
|
51
|
-
end
|
52
|
-
|
53
|
-
# @see the `==` method
|
54
|
-
# @param [Object] other_object to be compared
|
55
|
-
def eql?(other_object)
|
56
|
-
self == other_object
|
57
|
-
end
|
58
|
-
|
59
|
-
# Calculates hash code according to all attributes.
|
60
|
-
# @return [Fixnum] Hash code
|
61
|
-
def hash
|
62
|
-
[key, name].hash
|
63
|
-
end
|
64
|
-
|
65
|
-
# Builds the object from hash
|
66
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
-
# @return [Object] Returns the model itself
|
68
|
-
def build_from_hash(attributes)
|
69
|
-
return nil unless attributes.is_a?(Hash)
|
70
|
-
self.class.swagger_types.each_pair do |key, type|
|
71
|
-
if type =~ /^Array<(.*)>/i
|
72
|
-
# check to ensure the input is an array given that the the attribute
|
73
|
-
# is documented as an array but the input is not
|
74
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
75
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
76
|
-
end
|
77
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
78
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
79
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
80
|
-
end
|
81
|
-
|
82
|
-
self
|
83
|
-
end
|
84
|
-
|
85
|
-
# Returns the string representation of the object
|
86
|
-
# @return [String] String presentation of the object
|
87
|
-
def to_s
|
88
|
-
to_hash.to_s
|
89
|
-
end
|
90
|
-
|
91
|
-
# Returns the object in the form of hash
|
92
|
-
# @return [Hash] Returns the object in the form of hash
|
93
|
-
def to_hash
|
94
|
-
hash = {}
|
95
|
-
self.class.attribute_map.each_pair do |attr, param|
|
96
|
-
value = self.send(attr)
|
97
|
-
next if value.nil?
|
98
|
-
hash[param] = _to_hash(value)
|
99
|
-
end
|
100
|
-
hash
|
101
|
-
end
|
102
|
-
|
103
|
-
private
|
104
|
-
|
105
|
-
# Outputs non-array value in the form of hash
|
106
|
-
# For object, use to_hash. Otherwise, just return the value
|
107
|
-
# @param [Object] value Any valid value
|
108
|
-
# @return [Hash] Returns the value in the form of hash
|
109
|
-
def _to_hash(value)
|
110
|
-
if value.is_a?(Array)
|
111
|
-
value.compact.map{ |v| _to_hash(v) }
|
112
|
-
elsif value.is_a?(Hash)
|
113
|
-
{}.tap do |hash|
|
114
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
115
|
-
end
|
116
|
-
elsif value.respond_to? :to_hash
|
117
|
-
value.to_hash
|
118
|
-
else
|
119
|
-
value
|
120
|
-
end
|
121
|
-
end
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
126
|
-
def self.attribute_map
|
127
|
-
{
|
128
|
-
:'key' => :'key',
|
129
|
-
:'name' => :'name'
|
130
|
-
}
|
131
|
-
end
|
132
|
-
|
133
|
-
# Attribute type mapping.
|
134
|
-
def self.swagger_types
|
135
|
-
{
|
136
|
-
:'key' => :'String',
|
137
|
-
:'name' => :'String'
|
138
|
-
}
|
139
|
-
end
|
140
|
-
end
|
141
|
-
end
|
@@ -1,178 +0,0 @@
|
|
1
|
-
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
-
|
3
|
-
require 'date'
|
4
|
-
|
5
|
-
module OracleBMC
|
6
|
-
class Identity::Models::RegionSubscription
|
7
|
-
|
8
|
-
STATUS_ENUM = [STATUS_READY = 'READY',
|
9
|
-
STATUS_IN_PROGRESS = 'IN_PROGRESS',
|
10
|
-
STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
11
|
-
|
12
|
-
# The region's key.
|
13
|
-
#
|
14
|
-
# Allowed values are:
|
15
|
-
# - `PHX`
|
16
|
-
# - `IAD`
|
17
|
-
#
|
18
|
-
# @return [String]
|
19
|
-
attr_accessor :region_key
|
20
|
-
|
21
|
-
# The region's name.
|
22
|
-
#
|
23
|
-
# Allowed values are:
|
24
|
-
# - `us-phoenix-1`
|
25
|
-
# - `us-ashburn-1`
|
26
|
-
#
|
27
|
-
# @return [String]
|
28
|
-
attr_accessor :region_name
|
29
|
-
|
30
|
-
# The region subscription status.
|
31
|
-
# @return [String]
|
32
|
-
attr_accessor :status
|
33
|
-
|
34
|
-
# Indicates if the region is the home region or not.
|
35
|
-
# @return [BOOLEAN]
|
36
|
-
attr_accessor :is_home_region
|
37
|
-
|
38
|
-
|
39
|
-
# Initializes the object
|
40
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
-
def initialize(attributes = {})
|
42
|
-
return unless attributes.is_a?(Hash)
|
43
|
-
|
44
|
-
# convert string to symbol for hash key
|
45
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
46
|
-
|
47
|
-
if attributes[:'regionKey']
|
48
|
-
self.region_key = attributes[:'regionKey']
|
49
|
-
end
|
50
|
-
|
51
|
-
if attributes[:'regionName']
|
52
|
-
self.region_name = attributes[:'regionName']
|
53
|
-
end
|
54
|
-
|
55
|
-
if attributes[:'status']
|
56
|
-
self.status = attributes[:'status']
|
57
|
-
end
|
58
|
-
|
59
|
-
if attributes[:'isHomeRegion']
|
60
|
-
self.is_home_region = attributes[:'isHomeRegion']
|
61
|
-
end
|
62
|
-
|
63
|
-
end
|
64
|
-
|
65
|
-
# Custom attribute writer method checking allowed values (enum).
|
66
|
-
# @param [Object] status Object to be assigned
|
67
|
-
def status=(status)
|
68
|
-
if status && !STATUS_ENUM.include?(status)
|
69
|
-
@status = STATUS_UNKNOWN_ENUM_VALUE
|
70
|
-
else
|
71
|
-
@status = status
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
# Checks equality by comparing each attribute.
|
76
|
-
# @param [Object] other_object to be compared
|
77
|
-
def ==(other_object)
|
78
|
-
return true if self.equal?(other_object)
|
79
|
-
self.class == other_object.class &&
|
80
|
-
region_key == other_object.region_key &&
|
81
|
-
region_name == other_object.region_name &&
|
82
|
-
status == other_object.status &&
|
83
|
-
is_home_region == other_object.is_home_region
|
84
|
-
end
|
85
|
-
|
86
|
-
# @see the `==` method
|
87
|
-
# @param [Object] other_object to be compared
|
88
|
-
def eql?(other_object)
|
89
|
-
self == other_object
|
90
|
-
end
|
91
|
-
|
92
|
-
# Calculates hash code according to all attributes.
|
93
|
-
# @return [Fixnum] Hash code
|
94
|
-
def hash
|
95
|
-
[region_key, region_name, status, is_home_region].hash
|
96
|
-
end
|
97
|
-
|
98
|
-
# Builds the object from hash
|
99
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
-
# @return [Object] Returns the model itself
|
101
|
-
def build_from_hash(attributes)
|
102
|
-
return nil unless attributes.is_a?(Hash)
|
103
|
-
self.class.swagger_types.each_pair do |key, type|
|
104
|
-
if type =~ /^Array<(.*)>/i
|
105
|
-
# check to ensure the input is an array given that the the attribute
|
106
|
-
# is documented as an array but the input is not
|
107
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
108
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
109
|
-
end
|
110
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
111
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
112
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
113
|
-
end
|
114
|
-
|
115
|
-
self
|
116
|
-
end
|
117
|
-
|
118
|
-
# Returns the string representation of the object
|
119
|
-
# @return [String] String presentation of the object
|
120
|
-
def to_s
|
121
|
-
to_hash.to_s
|
122
|
-
end
|
123
|
-
|
124
|
-
# Returns the object in the form of hash
|
125
|
-
# @return [Hash] Returns the object in the form of hash
|
126
|
-
def to_hash
|
127
|
-
hash = {}
|
128
|
-
self.class.attribute_map.each_pair do |attr, param|
|
129
|
-
value = self.send(attr)
|
130
|
-
next if value.nil?
|
131
|
-
hash[param] = _to_hash(value)
|
132
|
-
end
|
133
|
-
hash
|
134
|
-
end
|
135
|
-
|
136
|
-
private
|
137
|
-
|
138
|
-
# Outputs non-array value in the form of hash
|
139
|
-
# For object, use to_hash. Otherwise, just return the value
|
140
|
-
# @param [Object] value Any valid value
|
141
|
-
# @return [Hash] Returns the value in the form of hash
|
142
|
-
def _to_hash(value)
|
143
|
-
if value.is_a?(Array)
|
144
|
-
value.compact.map{ |v| _to_hash(v) }
|
145
|
-
elsif value.is_a?(Hash)
|
146
|
-
{}.tap do |hash|
|
147
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
148
|
-
end
|
149
|
-
elsif value.respond_to? :to_hash
|
150
|
-
value.to_hash
|
151
|
-
else
|
152
|
-
value
|
153
|
-
end
|
154
|
-
end
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
159
|
-
def self.attribute_map
|
160
|
-
{
|
161
|
-
:'region_key' => :'regionKey',
|
162
|
-
:'region_name' => :'regionName',
|
163
|
-
:'status' => :'status',
|
164
|
-
:'is_home_region' => :'isHomeRegion'
|
165
|
-
}
|
166
|
-
end
|
167
|
-
|
168
|
-
# Attribute type mapping.
|
169
|
-
def self.swagger_types
|
170
|
-
{
|
171
|
-
:'region_key' => :'String',
|
172
|
-
:'region_name' => :'String',
|
173
|
-
:'status' => :'String',
|
174
|
-
:'is_home_region' => :'BOOLEAN'
|
175
|
-
}
|
176
|
-
end
|
177
|
-
end
|
178
|
-
end
|