oci 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +82 -0
- data/README.md +262 -0
- data/lib/oci.rb +25 -0
- data/lib/oci/api_client.rb +389 -0
- data/lib/oci/config.rb +118 -0
- data/lib/oci/config_file_loader.rb +96 -0
- data/lib/oci/core/blockstorage_client.rb +462 -0
- data/lib/oci/core/compute_client.rb +1415 -0
- data/lib/oci/core/core.rb +114 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +137 -0
- data/lib/oci/core/models/attach_vnic_details.rb +144 -0
- data/lib/oci/core/models/attach_volume_details.rb +165 -0
- data/lib/oci/core/models/capture_console_history_details.rb +120 -0
- data/lib/oci/core/models/console_history.rb +213 -0
- data/lib/oci/core/models/cpe.rb +169 -0
- data/lib/oci/core/models/create_cpe_details.rb +145 -0
- data/lib/oci/core/models/create_cross_connect_details.rb +204 -0
- data/lib/oci/core/models/create_cross_connect_group_details.rb +133 -0
- data/lib/oci/core/models/create_dhcp_details.rb +153 -0
- data/lib/oci/core/models/create_drg_attachment_details.rb +142 -0
- data/lib/oci/core/models/create_drg_details.rb +131 -0
- data/lib/oci/core/models/create_image_details.rb +159 -0
- data/lib/oci/core/models/create_instance_console_connection_details.rb +131 -0
- data/lib/oci/core/models/create_internet_gateway_details.rb +153 -0
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +168 -0
- data/lib/oci/core/models/create_private_ip_details.rb +173 -0
- data/lib/oci/core/models/create_route_table_details.rb +153 -0
- data/lib/oci/core/models/create_security_list_details.rb +164 -0
- data/lib/oci/core/models/create_subnet_details.rb +257 -0
- data/lib/oci/core/models/create_vcn_details.rb +171 -0
- data/lib/oci/core/models/create_virtual_circuit_details.rb +260 -0
- data/lib/oci/core/models/create_vnic_details.rb +214 -0
- data/lib/oci/core/models/create_volume_backup_details.rb +133 -0
- data/lib/oci/core/models/create_volume_details.rb +170 -0
- data/lib/oci/core/models/cross_connect.rb +235 -0
- data/lib/oci/core/models/cross_connect_group.rb +187 -0
- data/lib/oci/core/models/cross_connect_location.rb +134 -0
- data/lib/oci/core/models/cross_connect_mapping.rb +190 -0
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +137 -0
- data/lib/oci/core/models/cross_connect_status.rb +200 -0
- data/lib/oci/core/models/dhcp_dns_option.rb +171 -0
- data/lib/oci/core/models/dhcp_option.rb +135 -0
- data/lib/oci/core/models/dhcp_options.rb +208 -0
- data/lib/oci/core/models/dhcp_search_domain_option.rb +141 -0
- data/lib/oci/core/models/drg.rb +186 -0
- data/lib/oci/core/models/drg_attachment.rb +208 -0
- data/lib/oci/core/models/egress_security_rule.rb +198 -0
- data/lib/oci/core/models/export_image_details.rb +134 -0
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +130 -0
- data/lib/oci/core/models/fast_connect_provider_service.rb +145 -0
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +212 -0
- data/lib/oci/core/models/icmp_options.rb +131 -0
- data/lib/oci/core/models/image.rb +245 -0
- data/lib/oci/core/models/image_source_details.rb +134 -0
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +128 -0
- data/lib/oci/core/models/ingress_security_rule.rb +198 -0
- data/lib/oci/core/models/instance.rb +307 -0
- data/lib/oci/core/models/instance_console_connection.rb +193 -0
- data/lib/oci/core/models/instance_credentials.rb +131 -0
- data/lib/oci/core/models/internet_gateway.rb +210 -0
- data/lib/oci/core/models/ip_sec_connection.rb +223 -0
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +153 -0
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +156 -0
- data/lib/oci/core/models/launch_instance_details.rb +336 -0
- data/lib/oci/core/models/letter_of_authority.rb +194 -0
- data/lib/oci/core/models/port_range.rb +133 -0
- data/lib/oci/core/models/private_ip.rb +248 -0
- data/lib/oci/core/models/route_rule.rb +135 -0
- data/lib/oci/core/models/route_table.rb +208 -0
- data/lib/oci/core/models/security_list.rb +219 -0
- data/lib/oci/core/models/shape.rb +122 -0
- data/lib/oci/core/models/subnet.rb +351 -0
- data/lib/oci/core/models/tcp_options.rb +135 -0
- data/lib/oci/core/models/tunnel_config.rb +151 -0
- data/lib/oci/core/models/tunnel_status.rb +178 -0
- data/lib/oci/core/models/udp_options.rb +135 -0
- data/lib/oci/core/models/update_cpe_details.rb +122 -0
- data/lib/oci/core/models/update_cross_connect_details.rb +138 -0
- data/lib/oci/core/models/update_cross_connect_group_details.rb +122 -0
- data/lib/oci/core/models/update_dhcp_details.rb +132 -0
- data/lib/oci/core/models/update_drg_attachment_details.rb +122 -0
- data/lib/oci/core/models/update_drg_details.rb +122 -0
- data/lib/oci/core/models/update_image_details.rb +124 -0
- data/lib/oci/core/models/update_instance_details.rb +124 -0
- data/lib/oci/core/models/update_internet_gateway_details.rb +133 -0
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +122 -0
- data/lib/oci/core/models/update_private_ip_details.rb +157 -0
- data/lib/oci/core/models/update_route_table_details.rb +133 -0
- data/lib/oci/core/models/update_security_list_details.rb +144 -0
- data/lib/oci/core/models/update_subnet_details.rb +122 -0
- data/lib/oci/core/models/update_vcn_details.rb +122 -0
- data/lib/oci/core/models/update_virtual_circuit_details.rb +240 -0
- data/lib/oci/core/models/update_vnic_details.rb +144 -0
- data/lib/oci/core/models/update_volume_backup_details.rb +122 -0
- data/lib/oci/core/models/update_volume_details.rb +122 -0
- data/lib/oci/core/models/vcn.rb +276 -0
- data/lib/oci/core/models/virtual_circuit.rb +395 -0
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +137 -0
- data/lib/oci/core/models/vnic.rb +287 -0
- data/lib/oci/core/models/vnic_attachment.rb +250 -0
- data/lib/oci/core/models/volume.rb +210 -0
- data/lib/oci/core/models/volume_attachment.rb +246 -0
- data/lib/oci/core/models/volume_backup.rb +235 -0
- data/lib/oci/core/util.rb +1 -0
- data/lib/oci/core/virtual_network_client.rb +3421 -0
- data/lib/oci/errors.rb +78 -0
- data/lib/oci/global_context.rb +20 -0
- data/lib/oci/identity/identity.rb +55 -0
- data/lib/oci/identity/identity_client.rb +2148 -0
- data/lib/oci/identity/models/add_user_to_group_details.rb +131 -0
- data/lib/oci/identity/models/api_key.rb +211 -0
- data/lib/oci/identity/models/availability_domain.rb +131 -0
- data/lib/oci/identity/models/compartment.rb +211 -0
- data/lib/oci/identity/models/create_api_key_details.rb +120 -0
- data/lib/oci/identity/models/create_compartment_details.rb +145 -0
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +121 -0
- data/lib/oci/identity/models/create_group_details.rb +144 -0
- data/lib/oci/identity/models/create_identity_provider_details.rb +215 -0
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +133 -0
- data/lib/oci/identity/models/create_policy_details.rb +173 -0
- data/lib/oci/identity/models/create_region_subscription_details.rb +128 -0
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +154 -0
- data/lib/oci/identity/models/create_swift_password_details.rb +121 -0
- data/lib/oci/identity/models/create_user_details.rb +144 -0
- data/lib/oci/identity/models/customer_secret_key.rb +225 -0
- data/lib/oci/identity/models/customer_secret_key_summary.rb +213 -0
- data/lib/oci/identity/models/group.rb +211 -0
- data/lib/oci/identity/models/identity_provider.rb +261 -0
- data/lib/oci/identity/models/idp_group_mapping.rb +220 -0
- data/lib/oci/identity/models/policy.rb +237 -0
- data/lib/oci/identity/models/region.rb +143 -0
- data/lib/oci/identity/models/region_subscription.rb +180 -0
- data/lib/oci/identity/models/saml2_identity_provider.rb +180 -0
- data/lib/oci/identity/models/swift_password.rb +226 -0
- data/lib/oci/identity/models/tenancy.rb +159 -0
- data/lib/oci/identity/models/ui_password.rb +187 -0
- data/lib/oci/identity/models/update_compartment_details.rb +132 -0
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +120 -0
- data/lib/oci/identity/models/update_group_details.rb +120 -0
- data/lib/oci/identity/models/update_identity_provider_details.rb +160 -0
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +131 -0
- data/lib/oci/identity/models/update_policy_details.rb +148 -0
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +145 -0
- data/lib/oci/identity/models/update_state_details.rb +121 -0
- data/lib/oci/identity/models/update_swift_password_details.rb +120 -0
- data/lib/oci/identity/models/update_user_details.rb +120 -0
- data/lib/oci/identity/models/user.rb +217 -0
- data/lib/oci/identity/models/user_group_membership.rb +209 -0
- data/lib/oci/identity/util.rb +1 -0
- data/lib/oci/internal/internal.rb +10 -0
- data/lib/oci/internal/util.rb +69 -0
- data/lib/oci/load_balancer/load_balancer.rb +51 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +1449 -0
- data/lib/oci/load_balancer/models/backend.rb +220 -0
- data/lib/oci/load_balancer/models/backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/backend_health.rb +158 -0
- data/lib/oci/load_balancer/models/backend_set.rb +182 -0
- data/lib/oci/load_balancer/models/backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/backend_set_health.rb +207 -0
- data/lib/oci/load_balancer/models/certificate.rb +169 -0
- data/lib/oci/load_balancer/models/certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +181 -0
- data/lib/oci/load_balancer/models/create_certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_listener_details.rb +175 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +220 -0
- data/lib/oci/load_balancer/models/health_check_result.rb +183 -0
- data/lib/oci/load_balancer/models/health_checker.rb +224 -0
- data/lib/oci/load_balancer/models/health_checker_details.rb +223 -0
- data/lib/oci/load_balancer/models/ip_address.rb +139 -0
- data/lib/oci/load_balancer/models/listener.rb +174 -0
- data/lib/oci/load_balancer/models/listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/load_balancer.rb +280 -0
- data/lib/oci/load_balancer/models/load_balancer_health.rb +215 -0
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +168 -0
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +120 -0
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +141 -0
- data/lib/oci/load_balancer/models/ssl_configuration.rb +155 -0
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +155 -0
- data/lib/oci/load_balancer/models/update_backend_details.rb +178 -0
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +222 -0
- data/lib/oci/load_balancer/models/update_listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +124 -0
- data/lib/oci/load_balancer/models/work_request.rb +229 -0
- data/lib/oci/load_balancer/models/work_request_error.rb +145 -0
- data/lib/oci/load_balancer/util.rb +58 -0
- data/lib/oci/object_storage/models/bucket.rb +216 -0
- data/lib/oci/object_storage/models/bucket_summary.rb +175 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +133 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +131 -0
- data/lib/oci/object_storage/models/create_bucket_details.rb +173 -0
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +166 -0
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +171 -0
- data/lib/oci/object_storage/models/list_objects.rb +146 -0
- data/lib/oci/object_storage/models/multipart_upload.rb +164 -0
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +153 -0
- data/lib/oci/object_storage/models/object_summary.rb +153 -0
- data/lib/oci/object_storage/models/preauthenticated_request.rb +207 -0
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +196 -0
- data/lib/oci/object_storage/models/update_bucket_details.rb +171 -0
- data/lib/oci/object_storage/object_storage.rb +30 -0
- data/lib/oci/object_storage/object_storage_client.rb +1185 -0
- data/lib/oci/object_storage/util.rb +1 -0
- data/lib/oci/regions.rb +43 -0
- data/lib/oci/response.rb +80 -0
- data/lib/oci/response_headers.rb +144 -0
- data/lib/oci/signer.rb +157 -0
- data/lib/oci/version.rb +5 -0
- data/lib/oci/waiter.rb +101 -0
- data/lib/oraclebmc.rb +3 -0
- metadata +375 -0
@@ -0,0 +1,143 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Identity::Models::Region
|
7
|
+
# The key of the region.
|
8
|
+
#
|
9
|
+
# Allowed values are:
|
10
|
+
# - `PHX`
|
11
|
+
# - `IAD`
|
12
|
+
# - 'FRA'
|
13
|
+
#
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :key
|
16
|
+
|
17
|
+
# The name of the region.
|
18
|
+
#
|
19
|
+
# Allowed values are:
|
20
|
+
# - `us-phoenix-1`
|
21
|
+
# - `us-ashburn-1`
|
22
|
+
# - 'de-frankfurt-1'
|
23
|
+
#
|
24
|
+
# @return [String]
|
25
|
+
attr_accessor :name
|
26
|
+
|
27
|
+
|
28
|
+
# Initializes the object
|
29
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
30
|
+
def initialize(attributes = {})
|
31
|
+
return unless attributes.is_a?(Hash)
|
32
|
+
|
33
|
+
# convert string to symbol for hash key
|
34
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
35
|
+
|
36
|
+
if attributes[:'key']
|
37
|
+
self.key = attributes[:'key']
|
38
|
+
end
|
39
|
+
|
40
|
+
if attributes[:'name']
|
41
|
+
self.name = attributes[:'name']
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
# Checks equality by comparing each attribute.
|
47
|
+
# @param [Object] other_object to be compared
|
48
|
+
def ==(other_object)
|
49
|
+
return true if self.equal?(other_object)
|
50
|
+
self.class == other_object.class &&
|
51
|
+
key == other_object.key &&
|
52
|
+
name == other_object.name
|
53
|
+
end
|
54
|
+
|
55
|
+
# @see the `==` method
|
56
|
+
# @param [Object] other_object to be compared
|
57
|
+
def eql?(other_object)
|
58
|
+
self == other_object
|
59
|
+
end
|
60
|
+
|
61
|
+
# Calculates hash code according to all attributes.
|
62
|
+
# @return [Fixnum] Hash code
|
63
|
+
def hash
|
64
|
+
[key, name].hash
|
65
|
+
end
|
66
|
+
|
67
|
+
# Builds the object from hash
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
69
|
+
# @return [Object] Returns the model itself
|
70
|
+
def build_from_hash(attributes)
|
71
|
+
return nil unless attributes.is_a?(Hash)
|
72
|
+
self.class.swagger_types.each_pair do |key, type|
|
73
|
+
if type =~ /^Array<(.*)>/i
|
74
|
+
# check to ensure the input is an array given that the the attribute
|
75
|
+
# is documented as an array but the input is not
|
76
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
77
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
78
|
+
end
|
79
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
80
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
81
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
82
|
+
end
|
83
|
+
|
84
|
+
self
|
85
|
+
end
|
86
|
+
|
87
|
+
# Returns the string representation of the object
|
88
|
+
# @return [String] String presentation of the object
|
89
|
+
def to_s
|
90
|
+
to_hash.to_s
|
91
|
+
end
|
92
|
+
|
93
|
+
# Returns the object in the form of hash
|
94
|
+
# @return [Hash] Returns the object in the form of hash
|
95
|
+
def to_hash
|
96
|
+
hash = {}
|
97
|
+
self.class.attribute_map.each_pair do |attr, param|
|
98
|
+
value = self.send(attr)
|
99
|
+
next if value.nil?
|
100
|
+
hash[param] = _to_hash(value)
|
101
|
+
end
|
102
|
+
hash
|
103
|
+
end
|
104
|
+
|
105
|
+
private
|
106
|
+
|
107
|
+
# Outputs non-array value in the form of hash
|
108
|
+
# For object, use to_hash. Otherwise, just return the value
|
109
|
+
# @param [Object] value Any valid value
|
110
|
+
# @return [Hash] Returns the value in the form of hash
|
111
|
+
def _to_hash(value)
|
112
|
+
if value.is_a?(Array)
|
113
|
+
value.compact.map{ |v| _to_hash(v) }
|
114
|
+
elsif value.is_a?(Hash)
|
115
|
+
{}.tap do |hash|
|
116
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
117
|
+
end
|
118
|
+
elsif value.respond_to? :to_hash
|
119
|
+
value.to_hash
|
120
|
+
else
|
121
|
+
value
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
128
|
+
def self.attribute_map
|
129
|
+
{
|
130
|
+
:'key' => :'key',
|
131
|
+
:'name' => :'name'
|
132
|
+
}
|
133
|
+
end
|
134
|
+
|
135
|
+
# Attribute type mapping.
|
136
|
+
def self.swagger_types
|
137
|
+
{
|
138
|
+
:'key' => :'String',
|
139
|
+
:'name' => :'String'
|
140
|
+
}
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,180 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
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
|
+
# - 'FRA'
|
18
|
+
#
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :region_key
|
21
|
+
|
22
|
+
# The region's name.
|
23
|
+
#
|
24
|
+
# Allowed values are:
|
25
|
+
# - `us-phoenix-1`
|
26
|
+
# - `us-ashburn-1`
|
27
|
+
# - 'de-frankfurt-1'
|
28
|
+
#
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :region_name
|
31
|
+
|
32
|
+
# The region subscription status.
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :status
|
35
|
+
|
36
|
+
# Indicates if the region is the home region or not.
|
37
|
+
# @return [BOOLEAN]
|
38
|
+
attr_accessor :is_home_region
|
39
|
+
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
48
|
+
|
49
|
+
if attributes[:'regionKey']
|
50
|
+
self.region_key = attributes[:'regionKey']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes[:'regionName']
|
54
|
+
self.region_name = attributes[:'regionName']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes[:'status']
|
58
|
+
self.status = attributes[:'status']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes[:'isHomeRegion']
|
62
|
+
self.is_home_region = attributes[:'isHomeRegion']
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
# Custom attribute writer method checking allowed values (enum).
|
68
|
+
# @param [Object] status Object to be assigned
|
69
|
+
def status=(status)
|
70
|
+
if status && !STATUS_ENUM.include?(status)
|
71
|
+
@status = STATUS_UNKNOWN_ENUM_VALUE
|
72
|
+
else
|
73
|
+
@status = status
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] other_object to be compared
|
79
|
+
def ==(other_object)
|
80
|
+
return true if self.equal?(other_object)
|
81
|
+
self.class == other_object.class &&
|
82
|
+
region_key == other_object.region_key &&
|
83
|
+
region_name == other_object.region_name &&
|
84
|
+
status == other_object.status &&
|
85
|
+
is_home_region == other_object.is_home_region
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see the `==` method
|
89
|
+
# @param [Object] other_object to be compared
|
90
|
+
def eql?(other_object)
|
91
|
+
self == other_object
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Fixnum] Hash code
|
96
|
+
def hash
|
97
|
+
[region_key, region_name, status, is_home_region].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
self.class.swagger_types.each_pair do |key, type|
|
106
|
+
if type =~ /^Array<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Returns the string representation of the object
|
121
|
+
# @return [String] String presentation of the object
|
122
|
+
def to_s
|
123
|
+
to_hash.to_s
|
124
|
+
end
|
125
|
+
|
126
|
+
# Returns the object in the form of hash
|
127
|
+
# @return [Hash] Returns the object in the form of hash
|
128
|
+
def to_hash
|
129
|
+
hash = {}
|
130
|
+
self.class.attribute_map.each_pair do |attr, param|
|
131
|
+
value = self.send(attr)
|
132
|
+
next if value.nil?
|
133
|
+
hash[param] = _to_hash(value)
|
134
|
+
end
|
135
|
+
hash
|
136
|
+
end
|
137
|
+
|
138
|
+
private
|
139
|
+
|
140
|
+
# Outputs non-array value in the form of hash
|
141
|
+
# For object, use to_hash. Otherwise, just return the value
|
142
|
+
# @param [Object] value Any valid value
|
143
|
+
# @return [Hash] Returns the value in the form of hash
|
144
|
+
def _to_hash(value)
|
145
|
+
if value.is_a?(Array)
|
146
|
+
value.compact.map{ |v| _to_hash(v) }
|
147
|
+
elsif value.is_a?(Hash)
|
148
|
+
{}.tap do |hash|
|
149
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
150
|
+
end
|
151
|
+
elsif value.respond_to? :to_hash
|
152
|
+
value.to_hash
|
153
|
+
else
|
154
|
+
value
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
161
|
+
def self.attribute_map
|
162
|
+
{
|
163
|
+
:'region_key' => :'regionKey',
|
164
|
+
:'region_name' => :'regionName',
|
165
|
+
:'status' => :'status',
|
166
|
+
:'is_home_region' => :'isHomeRegion'
|
167
|
+
}
|
168
|
+
end
|
169
|
+
|
170
|
+
# Attribute type mapping.
|
171
|
+
def self.swagger_types
|
172
|
+
{
|
173
|
+
:'region_key' => :'String',
|
174
|
+
:'region_name' => :'String',
|
175
|
+
:'status' => :'String',
|
176
|
+
:'is_home_region' => :'BOOLEAN'
|
177
|
+
}
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
@@ -0,0 +1,180 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require_relative 'identity_provider'
|
5
|
+
|
6
|
+
module OCI
|
7
|
+
class Identity::Models::Saml2IdentityProvider < Identity::Models::IdentityProvider
|
8
|
+
# The URL for retrieving the identity provider's metadata, which
|
9
|
+
# contains information required for federating.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :metadata_url
|
13
|
+
|
14
|
+
# The identity provider's signing certificate used by the IAM Service
|
15
|
+
# to validate the SAML2 token.
|
16
|
+
#
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :signing_certificate
|
19
|
+
|
20
|
+
# The URL to redirect federated users to for authentication with the
|
21
|
+
# identity provider.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
attr_accessor :redirect_url
|
25
|
+
|
26
|
+
|
27
|
+
# Initializes the object
|
28
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
29
|
+
def initialize(attributes = {})
|
30
|
+
return unless attributes.is_a?(Hash)
|
31
|
+
|
32
|
+
attributes['protocol'] = 'SAML2'
|
33
|
+
|
34
|
+
super(attributes)
|
35
|
+
|
36
|
+
# convert string to symbol for hash key
|
37
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
38
|
+
|
39
|
+
if attributes[:'metadataUrl']
|
40
|
+
self.metadata_url = attributes[:'metadataUrl']
|
41
|
+
end
|
42
|
+
|
43
|
+
if attributes[:'signingCertificate']
|
44
|
+
self.signing_certificate = attributes[:'signingCertificate']
|
45
|
+
end
|
46
|
+
|
47
|
+
if attributes[:'redirectUrl']
|
48
|
+
self.redirect_url = attributes[:'redirectUrl']
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
# Checks equality by comparing each attribute.
|
54
|
+
# @param [Object] other_object to be compared
|
55
|
+
def ==(other_object)
|
56
|
+
return true if self.equal?(other_object)
|
57
|
+
self.class == other_object.class &&
|
58
|
+
id == other_object.id &&
|
59
|
+
compartment_id == other_object.compartment_id &&
|
60
|
+
name == other_object.name &&
|
61
|
+
description == other_object.description &&
|
62
|
+
product_type == other_object.product_type &&
|
63
|
+
time_created == other_object.time_created &&
|
64
|
+
lifecycle_state == other_object.lifecycle_state &&
|
65
|
+
inactive_status == other_object.inactive_status &&
|
66
|
+
protocol == other_object.protocol &&
|
67
|
+
metadata_url == other_object.metadata_url &&
|
68
|
+
signing_certificate == other_object.signing_certificate &&
|
69
|
+
redirect_url == other_object.redirect_url
|
70
|
+
end
|
71
|
+
|
72
|
+
# @see the `==` method
|
73
|
+
# @param [Object] other_object to be compared
|
74
|
+
def eql?(other_object)
|
75
|
+
self == other_object
|
76
|
+
end
|
77
|
+
|
78
|
+
# Calculates hash code according to all attributes.
|
79
|
+
# @return [Fixnum] Hash code
|
80
|
+
def hash
|
81
|
+
[id, compartment_id, name, description, product_type, time_created, lifecycle_state, inactive_status, protocol, metadata_url, signing_certificate, redirect_url].hash
|
82
|
+
end
|
83
|
+
|
84
|
+
# Builds the object from hash
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
86
|
+
# @return [Object] Returns the model itself
|
87
|
+
def build_from_hash(attributes)
|
88
|
+
return nil unless attributes.is_a?(Hash)
|
89
|
+
self.class.swagger_types.each_pair do |key, type|
|
90
|
+
if type =~ /^Array<(.*)>/i
|
91
|
+
# check to ensure the input is an array given that the the attribute
|
92
|
+
# is documented as an array but the input is not
|
93
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
94
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
95
|
+
end
|
96
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
97
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
98
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
99
|
+
end
|
100
|
+
|
101
|
+
self
|
102
|
+
end
|
103
|
+
|
104
|
+
# Returns the string representation of the object
|
105
|
+
# @return [String] String presentation of the object
|
106
|
+
def to_s
|
107
|
+
to_hash.to_s
|
108
|
+
end
|
109
|
+
|
110
|
+
# Returns the object in the form of hash
|
111
|
+
# @return [Hash] Returns the object in the form of hash
|
112
|
+
def to_hash
|
113
|
+
hash = {}
|
114
|
+
self.class.attribute_map.each_pair do |attr, param|
|
115
|
+
value = self.send(attr)
|
116
|
+
next if value.nil?
|
117
|
+
hash[param] = _to_hash(value)
|
118
|
+
end
|
119
|
+
hash
|
120
|
+
end
|
121
|
+
|
122
|
+
private
|
123
|
+
|
124
|
+
# Outputs non-array value in the form of hash
|
125
|
+
# For object, use to_hash. Otherwise, just return the value
|
126
|
+
# @param [Object] value Any valid value
|
127
|
+
# @return [Hash] Returns the value in the form of hash
|
128
|
+
def _to_hash(value)
|
129
|
+
if value.is_a?(Array)
|
130
|
+
value.compact.map{ |v| _to_hash(v) }
|
131
|
+
elsif value.is_a?(Hash)
|
132
|
+
{}.tap do |hash|
|
133
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
134
|
+
end
|
135
|
+
elsif value.respond_to? :to_hash
|
136
|
+
value.to_hash
|
137
|
+
else
|
138
|
+
value
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
145
|
+
def self.attribute_map
|
146
|
+
{
|
147
|
+
:'id' => :'id',
|
148
|
+
:'compartment_id' => :'compartmentId',
|
149
|
+
:'name' => :'name',
|
150
|
+
:'description' => :'description',
|
151
|
+
:'product_type' => :'productType',
|
152
|
+
:'time_created' => :'timeCreated',
|
153
|
+
:'lifecycle_state' => :'lifecycleState',
|
154
|
+
:'inactive_status' => :'inactiveStatus',
|
155
|
+
:'protocol' => :'protocol',
|
156
|
+
:'metadata_url' => :'metadataUrl',
|
157
|
+
:'signing_certificate' => :'signingCertificate',
|
158
|
+
:'redirect_url' => :'redirectUrl'
|
159
|
+
}
|
160
|
+
end
|
161
|
+
|
162
|
+
# Attribute type mapping.
|
163
|
+
def self.swagger_types
|
164
|
+
{
|
165
|
+
:'id' => :'String',
|
166
|
+
:'compartment_id' => :'String',
|
167
|
+
:'name' => :'String',
|
168
|
+
:'description' => :'String',
|
169
|
+
:'product_type' => :'String',
|
170
|
+
:'time_created' => :'DateTime',
|
171
|
+
:'lifecycle_state' => :'String',
|
172
|
+
:'inactive_status' => :'Integer',
|
173
|
+
:'protocol' => :'String',
|
174
|
+
:'metadata_url' => :'String',
|
175
|
+
:'signing_certificate' => :'String',
|
176
|
+
:'redirect_url' => :'String'
|
177
|
+
}
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|