ory-client-client 0.0.1.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +231 -0
- data/Rakefile +10 -0
- data/docs/AuthenticateOKBody.md +20 -0
- data/docs/ContainerChangeResponseItem.md +20 -0
- data/docs/ContainerCreateCreatedBody.md +20 -0
- data/docs/ContainerTopOKBody.md +20 -0
- data/docs/ContainerUpdateOKBody.md +18 -0
- data/docs/ContainerWaitOKBody.md +20 -0
- data/docs/ContainerWaitOKBodyError.md +18 -0
- data/docs/CreateIdentity.md +20 -0
- data/docs/CreateRecoveryLink.md +20 -0
- data/docs/DefaultApi.md +2902 -0
- data/docs/ErrorContainer.md +20 -0
- data/docs/ErrorResponse.md +18 -0
- data/docs/GenericError.md +30 -0
- data/docs/GraphDriverData.md +20 -0
- data/docs/HealthNotReadyStatus.md +18 -0
- data/docs/HealthStatus.md +18 -0
- data/docs/IdResponse.md +18 -0
- data/docs/Identity.md +28 -0
- data/docs/IdentityCredentials.md +22 -0
- data/docs/ImageDeleteResponseItem.md +20 -0
- data/docs/ImageSummary.md +36 -0
- data/docs/InlineResponse200.md +18 -0
- data/docs/InlineResponse2001.md +18 -0
- data/docs/InlineResponse503.md +18 -0
- data/docs/JsonError.md +18 -0
- data/docs/LoginFlow.md +32 -0
- data/docs/LoginViaApiResponse.md +20 -0
- data/docs/Meta.md +18 -0
- data/docs/Plugin.md +28 -0
- data/docs/PluginConfig.md +48 -0
- data/docs/PluginConfigArgs.md +24 -0
- data/docs/PluginConfigInterface.md +20 -0
- data/docs/PluginConfigLinux.md +22 -0
- data/docs/PluginConfigNetwork.md +18 -0
- data/docs/PluginConfigRootfs.md +20 -0
- data/docs/PluginConfigUser.md +20 -0
- data/docs/PluginDevice.md +24 -0
- data/docs/PluginEnv.md +24 -0
- data/docs/PluginInterfaceType.md +22 -0
- data/docs/PluginMount.md +30 -0
- data/docs/PluginSettings.md +24 -0
- data/docs/Port.md +24 -0
- data/docs/RecoveryAddress.md +22 -0
- data/docs/RecoveryFlow.md +32 -0
- data/docs/RecoveryLink.md +20 -0
- data/docs/RegistrationFlow.md +30 -0
- data/docs/RegistrationViaApiResponse.md +22 -0
- data/docs/RevokeSession.md +18 -0
- data/docs/ServiceUpdateResponse.md +18 -0
- data/docs/Session.md +28 -0
- data/docs/SettingsFlow.md +34 -0
- data/docs/SettingsProfileFormConfig.md +24 -0
- data/docs/SettingsViaApiResponse.md +20 -0
- data/docs/SubmitSelfServiceBrowserSettingsOIDCFlowPayload.md +22 -0
- data/docs/SubmitSelfServiceLoginFlow.md +47 -0
- data/docs/SubmitSelfServiceLoginFlowWithPasswordMethod.md +24 -0
- data/docs/SubmitSelfServiceRecoveryFlowWithLinkMethod.md +20 -0
- data/docs/SubmitSelfServiceRegistrationFlow.md +47 -0
- data/docs/SubmitSelfServiceRegistrationFlowWithPasswordMethod.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlow.md +49 -0
- data/docs/SubmitSelfServiceSettingsFlowWithPasswordMethod.md +22 -0
- data/docs/SubmitSelfServiceSettingsFlowWithProfileMethod.md +22 -0
- data/docs/SubmitSelfServiceVerificationFlowWithLinkMethod.md +20 -0
- data/docs/UiContainer.md +24 -0
- data/docs/UiNode.md +26 -0
- data/docs/UiNodeAnchorAttributes.md +20 -0
- data/docs/UiNodeAttributes.md +53 -0
- data/docs/UiNodeImageAttributes.md +18 -0
- data/docs/UiNodeInputAttributes.md +30 -0
- data/docs/UiNodeInputAttributesValue.md +51 -0
- data/docs/UiNodeTextAttributes.md +18 -0
- data/docs/UiText.md +24 -0
- data/docs/UpdateIdentity.md +20 -0
- data/docs/VerifiableIdentityAddress.md +32 -0
- data/docs/VerificationFlow.md +32 -0
- data/docs/Version.md +18 -0
- data/docs/Volume.md +34 -0
- data/docs/VolumeUsageData.md +20 -0
- data/lib/ory-client-client.rb +117 -0
- data/lib/ory-client-client/api/default_api.rb +2690 -0
- data/lib/ory-client-client/api_client.rb +390 -0
- data/lib/ory-client-client/api_error.rb +57 -0
- data/lib/ory-client-client/configuration.rb +297 -0
- data/lib/ory-client-client/models/authenticate_ok_body.rb +240 -0
- data/lib/ory-client-client/models/container_change_response_item.rb +240 -0
- data/lib/ory-client-client/models/container_create_created_body.rb +242 -0
- data/lib/ory-client-client/models/container_top_ok_body.rb +244 -0
- data/lib/ory-client-client/models/container_update_ok_body.rb +227 -0
- data/lib/ory-client-client/models/container_wait_ok_body.rb +239 -0
- data/lib/ory-client-client/models/container_wait_ok_body_error.rb +220 -0
- data/lib/ory-client-client/models/create_identity.rb +239 -0
- data/lib/ory-client-client/models/create_recovery_link.rb +250 -0
- data/lib/ory-client-client/models/error_container.rb +240 -0
- data/lib/ory-client-client/models/error_response.rb +224 -0
- data/lib/ory-client-client/models/generic_error.rb +286 -0
- data/lib/ory-client-client/models/graph_driver_data.rb +241 -0
- data/lib/ory-client-client/models/health_not_ready_status.rb +221 -0
- data/lib/ory-client-client/models/health_status.rb +219 -0
- data/lib/ory-client-client/models/id_response.rb +225 -0
- data/lib/ory-client-client/models/identity.rb +289 -0
- data/lib/ory-client-client/models/identity_credentials.rb +241 -0
- data/lib/ory-client-client/models/image_delete_response_item.rb +230 -0
- data/lib/ory-client-client/models/image_summary.rb +366 -0
- data/lib/ory-client-client/models/inline_response200.rb +224 -0
- data/lib/ory-client-client/models/inline_response2001.rb +224 -0
- data/lib/ory-client-client/models/inline_response503.rb +226 -0
- data/lib/ory-client-client/models/json_error.rb +224 -0
- data/lib/ory-client-client/models/login_flow.rb +318 -0
- data/lib/ory-client-client/models/login_via_api_response.rb +239 -0
- data/lib/ory-client-client/models/meta.rb +219 -0
- data/lib/ory-client-client/models/plugin.rb +288 -0
- data/lib/ory-client-client/models/plugin_config.rb +434 -0
- data/lib/ory-client-client/models/plugin_config_args.rb +274 -0
- data/lib/ory-client-client/models/plugin_config_interface.rb +242 -0
- data/lib/ory-client-client/models/plugin_config_linux.rb +259 -0
- data/lib/ory-client-client/models/plugin_config_network.rb +225 -0
- data/lib/ory-client-client/models/plugin_config_rootfs.rb +232 -0
- data/lib/ory-client-client/models/plugin_config_user.rb +230 -0
- data/lib/ory-client-client/models/plugin_device.rb +272 -0
- data/lib/ory-client-client/models/plugin_env.rb +272 -0
- data/lib/ory-client-client/models/plugin_interface_type.rb +255 -0
- data/lib/ory-client-client/models/plugin_mount.rb +319 -0
- data/lib/ory-client-client/models/plugin_settings.rb +277 -0
- data/lib/ory-client-client/models/port.rb +260 -0
- data/lib/ory-client-client/models/recovery_address.rb +251 -0
- data/lib/ory-client-client/models/recovery_flow.rb +317 -0
- data/lib/ory-client-client/models/recovery_link.rb +234 -0
- data/lib/ory-client-client/models/registration_flow.rb +302 -0
- data/lib/ory-client-client/models/registration_via_api_response.rb +248 -0
- data/lib/ory-client-client/models/revoke_session.rb +224 -0
- data/lib/ory-client-client/models/service_update_response.rb +222 -0
- data/lib/ory-client-client/models/session.rb +288 -0
- data/lib/ory-client-client/models/settings_flow.rb +331 -0
- data/lib/ory-client-client/models/settings_profile_form_config.rb +266 -0
- data/lib/ory-client-client/models/settings_via_api_response.rb +238 -0
- data/lib/ory-client-client/models/submit_self_service_browser_settings_oidc_flow_payload.rb +239 -0
- data/lib/ory-client-client/models/submit_self_service_login_flow.rb +104 -0
- data/lib/ory-client-client/models/submit_self_service_login_flow_with_password_method.rb +249 -0
- data/lib/ory-client-client/models/submit_self_service_recovery_flow_with_link_method.rb +229 -0
- data/lib/ory-client-client/models/submit_self_service_registration_flow.rb +104 -0
- data/lib/ory-client-client/models/submit_self_service_registration_flow_with_password_method.rb +276 -0
- data/lib/ory-client-client/models/submit_self_service_settings_flow.rb +105 -0
- data/lib/ory-client-client/models/submit_self_service_settings_flow_with_password_method.rb +244 -0
- data/lib/ory-client-client/models/submit_self_service_settings_flow_with_profile_method.rb +245 -0
- data/lib/ory-client-client/models/submit_self_service_verification_flow_with_link_method.rb +230 -0
- data/lib/ory-client-client/models/ui_container.rb +267 -0
- data/lib/ory-client-client/models/ui_node.rb +282 -0
- data/lib/ory-client-client/models/ui_node_anchor_attributes.rb +238 -0
- data/lib/ory-client-client/models/ui_node_attributes.rb +107 -0
- data/lib/ory-client-client/models/ui_node_image_attributes.rb +224 -0
- data/lib/ory-client-client/models/ui_node_input_attributes.rb +292 -0
- data/lib/ory-client-client/models/ui_node_input_attributes_value.rb +106 -0
- data/lib/ory-client-client/models/ui_node_text_attributes.rb +223 -0
- data/lib/ory-client-client/models/ui_text.rb +262 -0
- data/lib/ory-client-client/models/update_identity.rb +234 -0
- data/lib/ory-client-client/models/verifiable_identity_address.rb +313 -0
- data/lib/ory-client-client/models/verification_flow.rb +307 -0
- data/lib/ory-client-client/models/version.rb +219 -0
- data/lib/ory-client-client/models/volume.rb +335 -0
- data/lib/ory-client-client/models/volume_usage_data.rb +240 -0
- data/lib/ory-client-client/version.rb +15 -0
- data/ory-client-client.gemspec +38 -0
- data/spec/api/default_api_spec.rb +544 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/authenticate_ok_body_spec.rb +40 -0
- data/spec/models/container_change_response_item_spec.rb +40 -0
- data/spec/models/container_create_created_body_spec.rb +40 -0
- data/spec/models/container_top_ok_body_spec.rb +40 -0
- data/spec/models/container_update_ok_body_spec.rb +34 -0
- data/spec/models/container_wait_ok_body_error_spec.rb +34 -0
- data/spec/models/container_wait_ok_body_spec.rb +40 -0
- data/spec/models/create_identity_spec.rb +40 -0
- data/spec/models/create_recovery_link_spec.rb +40 -0
- data/spec/models/error_container_spec.rb +40 -0
- data/spec/models/error_response_spec.rb +34 -0
- data/spec/models/generic_error_spec.rb +70 -0
- data/spec/models/graph_driver_data_spec.rb +40 -0
- data/spec/models/health_not_ready_status_spec.rb +34 -0
- data/spec/models/health_status_spec.rb +34 -0
- data/spec/models/id_response_spec.rb +34 -0
- data/spec/models/identity_credentials_spec.rb +46 -0
- data/spec/models/identity_spec.rb +64 -0
- data/spec/models/image_delete_response_item_spec.rb +40 -0
- data/spec/models/image_summary_spec.rb +88 -0
- data/spec/models/inline_response2001_spec.rb +34 -0
- data/spec/models/inline_response200_spec.rb +34 -0
- data/spec/models/inline_response503_spec.rb +34 -0
- data/spec/models/json_error_spec.rb +34 -0
- data/spec/models/login_flow_spec.rb +76 -0
- data/spec/models/login_via_api_response_spec.rb +40 -0
- data/spec/models/meta_spec.rb +34 -0
- data/spec/models/plugin_config_args_spec.rb +52 -0
- data/spec/models/plugin_config_interface_spec.rb +40 -0
- data/spec/models/plugin_config_linux_spec.rb +46 -0
- data/spec/models/plugin_config_network_spec.rb +34 -0
- data/spec/models/plugin_config_rootfs_spec.rb +40 -0
- data/spec/models/plugin_config_spec.rb +124 -0
- data/spec/models/plugin_config_user_spec.rb +40 -0
- data/spec/models/plugin_device_spec.rb +52 -0
- data/spec/models/plugin_env_spec.rb +52 -0
- data/spec/models/plugin_interface_type_spec.rb +46 -0
- data/spec/models/plugin_mount_spec.rb +70 -0
- data/spec/models/plugin_settings_spec.rb +52 -0
- data/spec/models/plugin_spec.rb +64 -0
- data/spec/models/port_spec.rb +52 -0
- data/spec/models/recovery_address_spec.rb +46 -0
- data/spec/models/recovery_flow_spec.rb +76 -0
- data/spec/models/recovery_link_spec.rb +40 -0
- data/spec/models/registration_flow_spec.rb +70 -0
- data/spec/models/registration_via_api_response_spec.rb +46 -0
- data/spec/models/revoke_session_spec.rb +34 -0
- data/spec/models/service_update_response_spec.rb +34 -0
- data/spec/models/session_spec.rb +64 -0
- data/spec/models/settings_flow_spec.rb +82 -0
- data/spec/models/settings_profile_form_config_spec.rb +52 -0
- data/spec/models/settings_via_api_response_spec.rb +40 -0
- data/spec/models/submit_self_service_browser_settings_oidc_flow_payload_spec.rb +46 -0
- data/spec/models/submit_self_service_login_flow_spec.rb +31 -0
- data/spec/models/submit_self_service_login_flow_with_password_method_spec.rb +52 -0
- data/spec/models/submit_self_service_recovery_flow_with_link_method_spec.rb +40 -0
- data/spec/models/submit_self_service_registration_flow_spec.rb +31 -0
- data/spec/models/submit_self_service_registration_flow_with_password_method_spec.rb +52 -0
- data/spec/models/submit_self_service_settings_flow_spec.rb +31 -0
- data/spec/models/submit_self_service_settings_flow_with_password_method_spec.rb +46 -0
- data/spec/models/submit_self_service_settings_flow_with_profile_method_spec.rb +46 -0
- data/spec/models/submit_self_service_verification_flow_with_link_method_spec.rb +40 -0
- data/spec/models/ui_container_spec.rb +52 -0
- data/spec/models/ui_node_anchor_attributes_spec.rb +40 -0
- data/spec/models/ui_node_attributes_spec.rb +31 -0
- data/spec/models/ui_node_image_attributes_spec.rb +34 -0
- data/spec/models/ui_node_input_attributes_spec.rb +70 -0
- data/spec/models/ui_node_input_attributes_value_spec.rb +31 -0
- data/spec/models/ui_node_spec.rb +58 -0
- data/spec/models/ui_node_text_attributes_spec.rb +34 -0
- data/spec/models/ui_text_spec.rb +52 -0
- data/spec/models/update_identity_spec.rb +40 -0
- data/spec/models/verifiable_identity_address_spec.rb +76 -0
- data/spec/models/verification_flow_spec.rb +76 -0
- data/spec/models/version_spec.rb +34 -0
- data/spec/models/volume_spec.rb +82 -0
- data/spec/models/volume_usage_data_spec.rb +40 -0
- data/spec/spec_helper.rb +111 -0
- metadata +413 -0
@@ -0,0 +1,227 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory APIs
|
3
|
+
|
4
|
+
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.0.1-alpha.1
|
7
|
+
Contact: support@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryHydraClient
|
17
|
+
# ContainerUpdateOKBody OK response to ContainerUpdate operation
|
18
|
+
class ContainerUpdateOKBody
|
19
|
+
# warnings
|
20
|
+
attr_accessor :warnings
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'warnings' => :'Warnings'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns all the JSON keys this model knows about
|
30
|
+
def self.acceptable_attributes
|
31
|
+
attribute_map.values
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'warnings' => :'Array<String>'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# List of attributes with nullable: true
|
42
|
+
def self.openapi_nullable
|
43
|
+
Set.new([
|
44
|
+
])
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
49
|
+
def initialize(attributes = {})
|
50
|
+
if (!attributes.is_a?(Hash))
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::ContainerUpdateOKBody` initialize method"
|
52
|
+
end
|
53
|
+
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::ContainerUpdateOKBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
|
+
end
|
59
|
+
h[k.to_sym] = v
|
60
|
+
}
|
61
|
+
|
62
|
+
if attributes.key?(:'warnings')
|
63
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
64
|
+
self.warnings = value
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
+
# @return Array for valid properties with the reasons
|
71
|
+
def list_invalid_properties
|
72
|
+
invalid_properties = Array.new
|
73
|
+
if @warnings.nil?
|
74
|
+
invalid_properties.push('invalid value for "warnings", warnings cannot be nil.')
|
75
|
+
end
|
76
|
+
|
77
|
+
invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
return false if @warnings.nil?
|
84
|
+
true
|
85
|
+
end
|
86
|
+
|
87
|
+
# Checks equality by comparing each attribute.
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def ==(o)
|
90
|
+
return true if self.equal?(o)
|
91
|
+
self.class == o.class &&
|
92
|
+
warnings == o.warnings
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[warnings].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
new.build_from_hash(attributes)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
self.class.openapi_types.each_pair do |key, type|
|
120
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :Time
|
143
|
+
Time.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :Boolean
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
# models (e.g. Pet) or oneOf
|
174
|
+
klass = OryHydraClient.const_get(type)
|
175
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
if value.nil?
|
198
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
|
+
end
|
201
|
+
|
202
|
+
hash[param] = _to_hash(value)
|
203
|
+
end
|
204
|
+
hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Outputs non-array value in the form of hash
|
208
|
+
# For object, use to_hash. Otherwise, just return the value
|
209
|
+
# @param [Object] value Any valid value
|
210
|
+
# @return [Hash] Returns the value in the form of hash
|
211
|
+
def _to_hash(value)
|
212
|
+
if value.is_a?(Array)
|
213
|
+
value.compact.map { |v| _to_hash(v) }
|
214
|
+
elsif value.is_a?(Hash)
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
217
|
+
end
|
218
|
+
elsif value.respond_to? :to_hash
|
219
|
+
value.to_hash
|
220
|
+
else
|
221
|
+
value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
@@ -0,0 +1,239 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory APIs
|
3
|
+
|
4
|
+
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.0.1-alpha.1
|
7
|
+
Contact: support@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryHydraClient
|
17
|
+
# ContainerWaitOKBody OK response to ContainerWait operation
|
18
|
+
class ContainerWaitOKBody
|
19
|
+
attr_accessor :error
|
20
|
+
|
21
|
+
# Exit code of the container
|
22
|
+
attr_accessor :status_code
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'error' => :'Error',
|
28
|
+
:'status_code' => :'StatusCode'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'error' => :'ContainerWaitOKBodyError',
|
41
|
+
:'status_code' => :'Integer'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::ContainerWaitOKBody` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::ContainerWaitOKBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'error')
|
67
|
+
self.error = attributes[:'error']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'status_code')
|
71
|
+
self.status_code = attributes[:'status_code']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
if @error.nil?
|
80
|
+
invalid_properties.push('invalid value for "error", error cannot be nil.')
|
81
|
+
end
|
82
|
+
|
83
|
+
if @status_code.nil?
|
84
|
+
invalid_properties.push('invalid value for "status_code", status_code cannot be nil.')
|
85
|
+
end
|
86
|
+
|
87
|
+
invalid_properties
|
88
|
+
end
|
89
|
+
|
90
|
+
# Check to see if the all the properties in the model are valid
|
91
|
+
# @return true if the model is valid
|
92
|
+
def valid?
|
93
|
+
return false if @error.nil?
|
94
|
+
return false if @status_code.nil?
|
95
|
+
true
|
96
|
+
end
|
97
|
+
|
98
|
+
# Checks equality by comparing each attribute.
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
error == o.error &&
|
104
|
+
status_code == o.status_code
|
105
|
+
end
|
106
|
+
|
107
|
+
# @see the `==` method
|
108
|
+
# @param [Object] Object to be compared
|
109
|
+
def eql?(o)
|
110
|
+
self == o
|
111
|
+
end
|
112
|
+
|
113
|
+
# Calculates hash code according to all attributes.
|
114
|
+
# @return [Integer] Hash code
|
115
|
+
def hash
|
116
|
+
[error, status_code].hash
|
117
|
+
end
|
118
|
+
|
119
|
+
# Builds the object from hash
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
+
# @return [Object] Returns the model itself
|
122
|
+
def self.build_from_hash(attributes)
|
123
|
+
new.build_from_hash(attributes)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Builds the object from hash
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
+
# @return [Object] Returns the model itself
|
129
|
+
def build_from_hash(attributes)
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
131
|
+
self.class.openapi_types.each_pair do |key, type|
|
132
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
133
|
+
self.send("#{key}=", nil)
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
135
|
+
# check to ensure the input is an array given that the attribute
|
136
|
+
# is documented as an array but the input is not
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
139
|
+
end
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
self
|
146
|
+
end
|
147
|
+
|
148
|
+
# Deserializes the data based on type
|
149
|
+
# @param string type Data type
|
150
|
+
# @param string value Value to be deserialized
|
151
|
+
# @return [Object] Deserialized data
|
152
|
+
def _deserialize(type, value)
|
153
|
+
case type.to_sym
|
154
|
+
when :Time
|
155
|
+
Time.parse(value)
|
156
|
+
when :Date
|
157
|
+
Date.parse(value)
|
158
|
+
when :String
|
159
|
+
value.to_s
|
160
|
+
when :Integer
|
161
|
+
value.to_i
|
162
|
+
when :Float
|
163
|
+
value.to_f
|
164
|
+
when :Boolean
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
166
|
+
true
|
167
|
+
else
|
168
|
+
false
|
169
|
+
end
|
170
|
+
when :Object
|
171
|
+
# generic object (usually a Hash), return directly
|
172
|
+
value
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each do |k, v|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
else # model
|
185
|
+
# models (e.g. Pet) or oneOf
|
186
|
+
klass = OryHydraClient.const_get(type)
|
187
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the string representation of the object
|
192
|
+
# @return [String] String presentation of the object
|
193
|
+
def to_s
|
194
|
+
to_hash.to_s
|
195
|
+
end
|
196
|
+
|
197
|
+
# to_body is an alias to to_hash (backward compatibility)
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_body
|
200
|
+
to_hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the object in the form of hash
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
205
|
+
def to_hash
|
206
|
+
hash = {}
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
208
|
+
value = self.send(attr)
|
209
|
+
if value.nil?
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
212
|
+
end
|
213
|
+
|
214
|
+
hash[param] = _to_hash(value)
|
215
|
+
end
|
216
|
+
hash
|
217
|
+
end
|
218
|
+
|
219
|
+
# Outputs non-array value in the form of hash
|
220
|
+
# For object, use to_hash. Otherwise, just return the value
|
221
|
+
# @param [Object] value Any valid value
|
222
|
+
# @return [Hash] Returns the value in the form of hash
|
223
|
+
def _to_hash(value)
|
224
|
+
if value.is_a?(Array)
|
225
|
+
value.compact.map { |v| _to_hash(v) }
|
226
|
+
elsif value.is_a?(Hash)
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
229
|
+
end
|
230
|
+
elsif value.respond_to? :to_hash
|
231
|
+
value.to_hash
|
232
|
+
else
|
233
|
+
value
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|