launchdarkly_api 2.0.10 → 2.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +153 -151
- data/docs/AuditLogApi.md +7 -7
- data/docs/{Action.md → CopyActions.md} +1 -1
- data/docs/CustomProperty.md +1 -1
- data/docs/CustomRole.md +1 -1
- data/docs/CustomRoleBody.md +1 -1
- data/docs/CustomRoles.md +1 -1
- data/docs/CustomRolesApi.md +7 -6
- data/docs/CustomerMetricsApi.md +511 -0
- data/docs/DataExportDestinationsApi.md +293 -0
- data/docs/Destination.md +14 -0
- data/docs/DestinationAmazonKinesis.md +10 -0
- data/docs/DestinationBody.md +11 -0
- data/docs/DestinationGooglePubSub.md +9 -0
- data/docs/DestinationMParticle.md +11 -0
- data/docs/{CustomRoleKeyOrId.md → DestinationSegment.md} +2 -1
- data/docs/Destinations.md +9 -0
- data/docs/Environment.md +2 -0
- data/docs/EnvironmentPost.md +5 -0
- data/docs/EnvironmentsApi.md +11 -10
- data/docs/EvaluationUsageError.md +9 -0
- data/docs/Events.md +8 -0
- data/docs/FeatureFlag.md +4 -1
- data/docs/FeatureFlagConfig.md +0 -1
- data/docs/FeatureFlagCopyBody.md +12 -0
- data/docs/FeatureFlagCopyObject.md +9 -0
- data/docs/FeatureFlagStatus.md +1 -1
- data/docs/FeatureFlagStatusAcrossEnvironments.md +10 -0
- data/docs/FeatureFlagStatusForQueriedEnvironment.md +10 -0
- data/docs/FeatureFlagsApi.md +136 -17
- data/docs/MAU.md +10 -0
- data/docs/{Actions.md → MAUMetadata.md} +1 -1
- data/docs/MAUbyCategory.md +10 -0
- data/docs/Member.md +2 -0
- data/docs/Members.md +1 -1
- data/docs/MembersBody.md +1 -1
- data/docs/Policy.md +4 -2
- data/docs/ProjectBody.md +2 -0
- data/docs/ProjectsApi.md +7 -6
- data/docs/Rollout.md +1 -0
- data/docs/Statement.md +4 -4
- data/docs/Stream.md +10 -0
- data/docs/StreamBySDK.md +10 -0
- data/docs/StreamBySDKLinks.md +9 -0
- data/docs/StreamBySDKLinksMetadata.md +10 -0
- data/docs/StreamLinks.md +10 -0
- data/docs/StreamSDKVersion.md +9 -0
- data/docs/StreamSDKVersionData.md +9 -0
- data/docs/StreamUsageError.md +9 -0
- data/docs/StreamUsageLinks.md +10 -0
- data/docs/StreamUsageMetadata.md +10 -0
- data/docs/StreamUsageSeries.md +9 -0
- data/docs/Streams.md +8 -0
- data/docs/TeamMembersApi.md +7 -6
- data/docs/Usage.md +9 -0
- data/docs/{CustomProperties.md → UsageError.md} +2 -1
- data/docs/UsageLinks.md +10 -0
- data/docs/UserSegmentsApi.md +18 -17
- data/docs/UserSettingsApi.md +11 -11
- data/docs/UsersApi.md +15 -15
- data/docs/Webhook.md +1 -0
- data/docs/WebhookBody.md +2 -0
- data/docs/WebhooksApi.md +7 -6
- data/launchdarkly_api.gemspec +5 -6
- data/lib/launchdarkly_api/api/audit_log_api.rb +13 -19
- data/lib/launchdarkly_api/api/custom_roles_api.rb +23 -37
- data/lib/launchdarkly_api/api/customer_metrics_api.rb +519 -0
- data/lib/launchdarkly_api/api/data_export_destinations_api.rb +330 -0
- data/lib/launchdarkly_api/api/environments_api.rb +20 -31
- data/lib/launchdarkly_api/api/feature_flags_api.rb +150 -43
- data/lib/launchdarkly_api/api/projects_api.rb +23 -37
- data/lib/launchdarkly_api/api/root_api.rb +6 -9
- data/lib/launchdarkly_api/api/team_members_api.rb +23 -37
- data/lib/launchdarkly_api/api/user_segments_api.rb +23 -37
- data/lib/launchdarkly_api/api/user_settings_api.rb +12 -21
- data/lib/launchdarkly_api/api/users_api.rb +17 -29
- data/lib/launchdarkly_api/api/webhooks_api.rb +23 -37
- data/lib/launchdarkly_api/api_client.rb +10 -10
- data/lib/launchdarkly_api/api_error.rb +2 -2
- data/lib/launchdarkly_api/configuration.rb +3 -3
- data/lib/launchdarkly_api/models/audit_log_entries.rb +7 -12
- data/lib/launchdarkly_api/models/audit_log_entry.rb +7 -12
- data/lib/launchdarkly_api/models/audit_log_entry_target.rb +7 -12
- data/lib/launchdarkly_api/models/clause.rb +7 -12
- data/lib/launchdarkly_api/models/copy_actions.rb +34 -0
- data/lib/launchdarkly_api/models/custom_property.rb +13 -14
- data/lib/launchdarkly_api/models/custom_property_values.rb +7 -11
- data/lib/launchdarkly_api/models/custom_role.rb +9 -13
- data/lib/launchdarkly_api/models/custom_role_body.rb +12 -16
- data/lib/launchdarkly_api/models/custom_roles.rb +11 -14
- data/lib/launchdarkly_api/models/destination.rb +276 -0
- data/lib/launchdarkly_api/models/destination_amazon_kinesis.rb +201 -0
- data/lib/launchdarkly_api/models/destination_body.rb +263 -0
- data/lib/launchdarkly_api/models/destination_google_pub_sub.rb +192 -0
- data/lib/launchdarkly_api/models/destination_m_particle.rb +210 -0
- data/lib/launchdarkly_api/models/destination_segment.rb +183 -0
- data/lib/launchdarkly_api/models/destinations.rb +194 -0
- data/lib/launchdarkly_api/models/environment.rb +29 -14
- data/lib/launchdarkly_api/models/environment_post.rb +64 -17
- data/lib/launchdarkly_api/models/evaluation_usage_error.rb +192 -0
- data/lib/launchdarkly_api/models/{action.rb → events.rb} +17 -13
- data/lib/launchdarkly_api/models/fallthrough.rb +7 -12
- data/lib/launchdarkly_api/models/feature_flag.rb +46 -16
- data/lib/launchdarkly_api/models/feature_flag_body.rb +10 -15
- data/lib/launchdarkly_api/models/feature_flag_config.rb +8 -24
- data/lib/launchdarkly_api/models/feature_flag_copy_body.rb +226 -0
- data/lib/launchdarkly_api/models/feature_flag_copy_object.rb +199 -0
- data/lib/launchdarkly_api/models/feature_flag_status.rb +22 -26
- data/lib/launchdarkly_api/models/feature_flag_status_across_environments.rb +203 -0
- data/lib/launchdarkly_api/models/feature_flag_status_for_queried_environment.rb +236 -0
- data/lib/launchdarkly_api/models/feature_flag_statuses.rb +7 -12
- data/lib/launchdarkly_api/models/feature_flags.rb +7 -12
- data/lib/launchdarkly_api/models/id.rb +7 -11
- data/lib/launchdarkly_api/models/link.rb +7 -12
- data/lib/launchdarkly_api/models/links.rb +7 -12
- data/lib/launchdarkly_api/models/ma_uby_category.rb +205 -0
- data/lib/launchdarkly_api/models/mau.rb +205 -0
- data/lib/launchdarkly_api/models/{actions.rb → mau_metadata.rb} +8 -13
- data/lib/launchdarkly_api/models/member.rb +26 -13
- data/lib/launchdarkly_api/models/members.rb +11 -14
- data/lib/launchdarkly_api/models/members_body.rb +9 -14
- data/lib/launchdarkly_api/models/patch_comment.rb +7 -12
- data/lib/launchdarkly_api/models/patch_operation.rb +10 -15
- data/lib/launchdarkly_api/models/policy.rb +40 -17
- data/lib/launchdarkly_api/models/prerequisite.rb +7 -12
- data/lib/launchdarkly_api/models/project.rb +7 -12
- data/lib/launchdarkly_api/models/project_body.rb +30 -15
- data/lib/launchdarkly_api/models/projects.rb +7 -12
- data/lib/launchdarkly_api/models/role.rb +7 -8
- data/lib/launchdarkly_api/models/rollout.rb +17 -13
- data/lib/launchdarkly_api/models/rule.rb +7 -12
- data/lib/launchdarkly_api/models/statement.rb +35 -31
- data/lib/launchdarkly_api/models/statements.rb +7 -12
- data/lib/launchdarkly_api/models/stream.rb +205 -0
- data/lib/launchdarkly_api/models/stream_by_sdk.rb +205 -0
- data/lib/launchdarkly_api/models/stream_by_sdk_links.rb +192 -0
- data/lib/launchdarkly_api/models/{resources.rb → stream_by_sdk_links_metadata.rb} +34 -12
- data/lib/launchdarkly_api/models/stream_links.rb +204 -0
- data/lib/launchdarkly_api/models/stream_sdk_version.rb +194 -0
- data/lib/launchdarkly_api/models/stream_sdk_version_data.rb +194 -0
- data/lib/launchdarkly_api/models/stream_usage_error.rb +192 -0
- data/lib/launchdarkly_api/models/stream_usage_links.rb +204 -0
- data/lib/launchdarkly_api/models/stream_usage_metadata.rb +203 -0
- data/lib/launchdarkly_api/models/stream_usage_series.rb +194 -0
- data/lib/launchdarkly_api/models/{custom_properties.rb → streams.rb} +17 -13
- data/lib/launchdarkly_api/models/target.rb +7 -12
- data/lib/launchdarkly_api/models/usage.rb +194 -0
- data/lib/launchdarkly_api/models/{custom_role_key_or_id.rb → usage_error.rb} +17 -13
- data/lib/launchdarkly_api/models/usage_links.rb +204 -0
- data/lib/launchdarkly_api/models/user.rb +7 -12
- data/lib/launchdarkly_api/models/user_flag_setting.rb +7 -12
- data/lib/launchdarkly_api/models/user_flag_settings.rb +7 -12
- data/lib/launchdarkly_api/models/user_record.rb +7 -12
- data/lib/launchdarkly_api/models/user_segment.rb +10 -15
- data/lib/launchdarkly_api/models/user_segment_body.rb +9 -14
- data/lib/launchdarkly_api/models/user_segment_rule.rb +7 -12
- data/lib/launchdarkly_api/models/user_segments.rb +7 -12
- data/lib/launchdarkly_api/models/user_settings_body.rb +7 -12
- data/lib/launchdarkly_api/models/users.rb +7 -12
- data/lib/launchdarkly_api/models/variation.rb +8 -13
- data/lib/launchdarkly_api/models/webhook.rb +17 -13
- data/lib/launchdarkly_api/models/webhook_body.rb +33 -17
- data/lib/launchdarkly_api/models/webhooks.rb +7 -12
- data/lib/launchdarkly_api/models/weighted_variation.rb +7 -12
- data/lib/launchdarkly_api/version.rb +3 -3
- data/lib/launchdarkly_api.rb +36 -8
- data/openapi.yml +1004 -115
- data/spec/api/audit_log_api_spec.rb +6 -8
- data/spec/api/custom_roles_api_spec.rb +8 -13
- data/spec/api/customer_metrics_api_spec.rb +141 -0
- data/spec/api/data_export_destinations_api_spec.rb +98 -0
- data/spec/api/environments_api_spec.rb +7 -11
- data/spec/api/feature_flags_api_spec.rb +36 -16
- data/spec/api/projects_api_spec.rb +8 -13
- data/spec/api/root_api_spec.rb +3 -4
- data/spec/api/team_members_api_spec.rb +8 -13
- data/spec/api/user_segments_api_spec.rb +8 -13
- data/spec/api/user_settings_api_spec.rb +5 -8
- data/spec/api/users_api_spec.rb +7 -11
- data/spec/api/webhooks_api_spec.rb +8 -13
- data/spec/api_client_spec.rb +36 -36
- data/spec/configuration_spec.rb +10 -10
- data/spec/models/audit_log_entries_spec.rb +4 -5
- data/spec/models/audit_log_entry_spec.rb +14 -15
- data/spec/models/audit_log_entry_target_spec.rb +5 -6
- data/spec/models/clause_spec.rb +6 -7
- data/spec/models/{action_spec.rb → copy_actions_spec.rb} +8 -9
- data/spec/models/custom_property_spec.rb +4 -5
- data/spec/models/custom_property_values_spec.rb +2 -3
- data/spec/models/custom_role_body_spec.rb +6 -7
- data/spec/models/custom_role_spec.rb +8 -9
- data/spec/models/custom_roles_spec.rb +4 -5
- data/spec/models/destination_amazon_kinesis_spec.rb +53 -0
- data/spec/models/destination_body_spec.rb +63 -0
- data/spec/models/destination_google_pub_sub_spec.rb +47 -0
- data/spec/models/destination_m_particle_spec.rb +59 -0
- data/spec/models/destination_segment_spec.rb +41 -0
- data/spec/models/destination_spec.rb +81 -0
- data/spec/models/destinations_spec.rb +47 -0
- data/spec/models/environment_post_spec.rb +36 -7
- data/spec/models/environment_spec.rb +25 -14
- data/spec/models/evaluation_usage_error_spec.rb +47 -0
- data/spec/models/events_spec.rb +41 -0
- data/spec/models/fallthrough_spec.rb +4 -5
- data/spec/models/feature_flag_body_spec.rb +9 -10
- data/spec/models/feature_flag_config_spec.rb +14 -21
- data/spec/models/feature_flag_copy_body_spec.rb +65 -0
- data/spec/models/feature_flag_copy_object_spec.rb +47 -0
- data/spec/models/feature_flag_spec.rb +35 -18
- data/spec/models/feature_flag_status_across_environments_spec.rb +53 -0
- data/spec/models/feature_flag_status_for_queried_environment_spec.rb +57 -0
- data/spec/models/feature_flag_status_spec.rb +14 -15
- data/spec/models/feature_flag_statuses_spec.rb +4 -5
- data/spec/models/feature_flags_spec.rb +4 -5
- data/spec/models/id_spec.rb +2 -3
- data/spec/models/link_spec.rb +4 -5
- data/spec/models/links_spec.rb +4 -5
- data/spec/models/ma_uby_category_spec.rb +53 -0
- data/spec/models/{actions_spec.rb → mau_metadata_spec.rb} +8 -9
- data/spec/models/mau_spec.rb +53 -0
- data/spec/models/member_spec.rb +21 -10
- data/spec/models/members_body_spec.rb +8 -9
- data/spec/models/members_spec.rb +4 -5
- data/spec/models/patch_comment_spec.rb +4 -5
- data/spec/models/patch_operation_spec.rb +5 -6
- data/spec/models/policy_spec.rb +17 -6
- data/spec/models/prerequisite_spec.rb +4 -5
- data/spec/models/project_body_spec.rb +17 -6
- data/spec/models/project_spec.rb +8 -9
- data/spec/models/projects_spec.rb +4 -5
- data/spec/models/role_spec.rb +2 -3
- data/spec/models/rollout_spec.rb +9 -4
- data/spec/models/rule_spec.rb +6 -7
- data/spec/models/statement_spec.rb +13 -14
- data/spec/models/statements_spec.rb +2 -3
- data/spec/models/stream_by_sdk_links_metadata_spec.rb +53 -0
- data/spec/models/stream_by_sdk_links_spec.rb +47 -0
- data/spec/models/stream_by_sdk_spec.rb +53 -0
- data/spec/models/stream_links_spec.rb +53 -0
- data/spec/models/stream_sdk_version_data_spec.rb +47 -0
- data/spec/models/stream_sdk_version_spec.rb +47 -0
- data/spec/models/stream_spec.rb +53 -0
- data/spec/models/stream_usage_error_spec.rb +47 -0
- data/spec/models/stream_usage_links_spec.rb +53 -0
- data/spec/models/stream_usage_metadata_spec.rb +53 -0
- data/spec/models/stream_usage_series_spec.rb +47 -0
- data/spec/models/streams_spec.rb +41 -0
- data/spec/models/target_spec.rb +4 -5
- data/spec/models/usage_error_spec.rb +41 -0
- data/spec/models/usage_links_spec.rb +53 -0
- data/spec/models/usage_spec.rb +47 -0
- data/spec/models/user_flag_setting_spec.rb +5 -6
- data/spec/models/user_flag_settings_spec.rb +4 -5
- data/spec/models/user_record_spec.rb +7 -8
- data/spec/models/user_segment_body_spec.rb +6 -7
- data/spec/models/user_segment_rule_spec.rb +5 -6
- data/spec/models/user_segment_spec.rb +12 -13
- data/spec/models/user_segments_spec.rb +4 -5
- data/spec/models/user_settings_body_spec.rb +3 -4
- data/spec/models/user_spec.rb +13 -14
- data/spec/models/users_spec.rb +5 -6
- data/spec/models/variation_spec.rb +5 -6
- data/spec/models/webhook_body_spec.rb +19 -8
- data/spec/models/webhook_spec.rb +15 -10
- data/spec/models/webhooks_spec.rb +4 -5
- data/spec/models/weighted_variation_spec.rb +4 -5
- data/spec/spec_helper.rb +2 -2
- metadata +187 -74
- data/docs/Resource.md +0 -7
- data/docs/Resources.md +0 -7
- data/lib/launchdarkly_api/models/resource.rb +0 -179
- data/spec/models/custom_properties_spec.rb +0 -36
- data/spec/models/custom_role_key_or_id_spec.rb +0 -36
- data/spec/models/resource_spec.rb +0 -36
- data/spec/models/resources_spec.rb +0 -36
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#LaunchDarkly REST API
|
|
3
|
+
|
|
4
|
+
#Build custom integrations with the LaunchDarkly REST API
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2.0.27
|
|
7
|
+
Contact: support@launchdarkly.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.8
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module LaunchDarklyApi
|
|
16
|
+
class MAU
|
|
17
|
+
attr_accessor :_links
|
|
18
|
+
|
|
19
|
+
attr_accessor :metadata
|
|
20
|
+
|
|
21
|
+
attr_accessor :series
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'_links' => :'_links',
|
|
27
|
+
:'metadata' => :'metadata',
|
|
28
|
+
:'series' => :'series'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Attribute type mapping.
|
|
33
|
+
def self.swagger_types
|
|
34
|
+
{
|
|
35
|
+
:'_links' => :'UsageLinks',
|
|
36
|
+
:'metadata' => :'Array<StreamBySDKLinksMetadata>',
|
|
37
|
+
:'series' => :'Array<StreamUsageSeries>'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
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.has_key?(:'_links')
|
|
50
|
+
self._links = attributes[:'_links']
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
if attributes.has_key?(:'metadata')
|
|
54
|
+
if (value = attributes[:'metadata']).is_a?(Array)
|
|
55
|
+
self.metadata = value
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if attributes.has_key?(:'series')
|
|
60
|
+
if (value = attributes[:'series']).is_a?(Array)
|
|
61
|
+
self.series = value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
67
|
+
# @return Array for valid properties with the reasons
|
|
68
|
+
def list_invalid_properties
|
|
69
|
+
invalid_properties = Array.new
|
|
70
|
+
invalid_properties
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Check to see if the all the properties in the model are valid
|
|
74
|
+
# @return true if the model is valid
|
|
75
|
+
def valid?
|
|
76
|
+
true
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Checks equality by comparing each attribute.
|
|
80
|
+
# @param [Object] Object to be compared
|
|
81
|
+
def ==(o)
|
|
82
|
+
return true if self.equal?(o)
|
|
83
|
+
self.class == o.class &&
|
|
84
|
+
_links == o._links &&
|
|
85
|
+
metadata == o.metadata &&
|
|
86
|
+
series == o.series
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @see the `==` method
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def eql?(o)
|
|
92
|
+
self == o
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Calculates hash code according to all attributes.
|
|
96
|
+
# @return [Fixnum] Hash code
|
|
97
|
+
def hash
|
|
98
|
+
[_links, metadata, series].hash
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Builds the object from hash
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
# @return [Object] Returns the model itself
|
|
104
|
+
def build_from_hash(attributes)
|
|
105
|
+
return nil unless attributes.is_a?(Hash)
|
|
106
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
107
|
+
if type =~ /\AArray<(.*)>/i
|
|
108
|
+
# check to ensure the input is an array given that the the attribute
|
|
109
|
+
# is documented as an array but the input is not
|
|
110
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
111
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
112
|
+
end
|
|
113
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
114
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
115
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
self
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Deserializes the data based on type
|
|
122
|
+
# @param string type Data type
|
|
123
|
+
# @param string value Value to be deserialized
|
|
124
|
+
# @return [Object] Deserialized data
|
|
125
|
+
def _deserialize(type, value)
|
|
126
|
+
case type.to_sym
|
|
127
|
+
when :DateTime
|
|
128
|
+
DateTime.parse(value)
|
|
129
|
+
when :Date
|
|
130
|
+
Date.parse(value)
|
|
131
|
+
when :String
|
|
132
|
+
value.to_s
|
|
133
|
+
when :Integer
|
|
134
|
+
value.to_i
|
|
135
|
+
when :Float
|
|
136
|
+
value.to_f
|
|
137
|
+
when :BOOLEAN
|
|
138
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
139
|
+
true
|
|
140
|
+
else
|
|
141
|
+
false
|
|
142
|
+
end
|
|
143
|
+
when :Object
|
|
144
|
+
# generic object (usually a Hash), return directly
|
|
145
|
+
value
|
|
146
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
147
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
148
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
149
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
150
|
+
k_type = Regexp.last_match[:k_type]
|
|
151
|
+
v_type = Regexp.last_match[:v_type]
|
|
152
|
+
{}.tap do |hash|
|
|
153
|
+
value.each do |k, v|
|
|
154
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
else # model
|
|
158
|
+
temp_model = LaunchDarklyApi.const_get(type).new
|
|
159
|
+
temp_model.build_from_hash(value)
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Returns the string representation of the object
|
|
164
|
+
# @return [String] String presentation of the object
|
|
165
|
+
def to_s
|
|
166
|
+
to_hash.to_s
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
170
|
+
# @return [Hash] Returns the object in the form of hash
|
|
171
|
+
def to_body
|
|
172
|
+
to_hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the object in the form of hash
|
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
|
177
|
+
def to_hash
|
|
178
|
+
hash = {}
|
|
179
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
180
|
+
value = self.send(attr)
|
|
181
|
+
next if value.nil?
|
|
182
|
+
hash[param] = _to_hash(value)
|
|
183
|
+
end
|
|
184
|
+
hash
|
|
185
|
+
end
|
|
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
|
+
end
|
|
205
|
+
end
|
|
@@ -3,19 +3,17 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0.
|
|
6
|
+
OpenAPI spec version: 2.0.27
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.8
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module LaunchDarklyApi
|
|
16
|
-
|
|
17
|
-
class Actions
|
|
18
|
-
|
|
16
|
+
class MAUMetadata
|
|
19
17
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
18
|
def self.attribute_map
|
|
21
19
|
{
|
|
@@ -34,21 +32,20 @@ module LaunchDarklyApi
|
|
|
34
32
|
return unless attributes.is_a?(Hash)
|
|
35
33
|
|
|
36
34
|
# convert string to symbol for hash key
|
|
37
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
38
|
-
|
|
35
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
39
36
|
end
|
|
40
37
|
|
|
41
38
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
42
39
|
# @return Array for valid properties with the reasons
|
|
43
40
|
def list_invalid_properties
|
|
44
41
|
invalid_properties = Array.new
|
|
45
|
-
|
|
42
|
+
invalid_properties
|
|
46
43
|
end
|
|
47
44
|
|
|
48
45
|
# Check to see if the all the properties in the model are valid
|
|
49
46
|
# @return true if the model is valid
|
|
50
47
|
def valid?
|
|
51
|
-
|
|
48
|
+
true
|
|
52
49
|
end
|
|
53
50
|
|
|
54
51
|
# Checks equality by comparing each attribute.
|
|
@@ -80,7 +77,7 @@ module LaunchDarklyApi
|
|
|
80
77
|
# check to ensure the input is an array given that the the attribute
|
|
81
78
|
# is documented as an array but the input is not
|
|
82
79
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
83
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
80
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
84
81
|
end
|
|
85
82
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
86
83
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -162,7 +159,7 @@ module LaunchDarklyApi
|
|
|
162
159
|
# @return [Hash] Returns the value in the form of hash
|
|
163
160
|
def _to_hash(value)
|
|
164
161
|
if value.is_a?(Array)
|
|
165
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
162
|
+
value.compact.map { |v| _to_hash(v) }
|
|
166
163
|
elsif value.is_a?(Hash)
|
|
167
164
|
{}.tap do |hash|
|
|
168
165
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -173,7 +170,5 @@ module LaunchDarklyApi
|
|
|
173
170
|
value
|
|
174
171
|
end
|
|
175
172
|
end
|
|
176
|
-
|
|
177
173
|
end
|
|
178
|
-
|
|
179
174
|
end
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0.
|
|
6
|
+
OpenAPI spec version: 2.0.27
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.8
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module LaunchDarklyApi
|
|
16
|
-
|
|
17
16
|
class Member
|
|
18
17
|
attr_accessor :_links
|
|
19
18
|
|
|
@@ -23,13 +22,16 @@ module LaunchDarklyApi
|
|
|
23
22
|
|
|
24
23
|
attr_accessor :email
|
|
25
24
|
|
|
25
|
+
attr_accessor :first_name
|
|
26
|
+
|
|
27
|
+
attr_accessor :last_name
|
|
28
|
+
|
|
26
29
|
attr_accessor :_pending_invite
|
|
27
30
|
|
|
28
31
|
attr_accessor :is_beta
|
|
29
32
|
|
|
30
33
|
attr_accessor :custom_roles
|
|
31
34
|
|
|
32
|
-
|
|
33
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
36
|
def self.attribute_map
|
|
35
37
|
{
|
|
@@ -37,6 +39,8 @@ module LaunchDarklyApi
|
|
|
37
39
|
:'_id' => :'_id',
|
|
38
40
|
:'role' => :'role',
|
|
39
41
|
:'email' => :'email',
|
|
42
|
+
:'first_name' => :'firstName',
|
|
43
|
+
:'last_name' => :'lastName',
|
|
40
44
|
:'_pending_invite' => :'_pendingInvite',
|
|
41
45
|
:'is_beta' => :'isBeta',
|
|
42
46
|
:'custom_roles' => :'customRoles'
|
|
@@ -50,6 +54,8 @@ module LaunchDarklyApi
|
|
|
50
54
|
:'_id' => :'Id',
|
|
51
55
|
:'role' => :'Role',
|
|
52
56
|
:'email' => :'String',
|
|
57
|
+
:'first_name' => :'String',
|
|
58
|
+
:'last_name' => :'String',
|
|
53
59
|
:'_pending_invite' => :'BOOLEAN',
|
|
54
60
|
:'is_beta' => :'BOOLEAN',
|
|
55
61
|
:'custom_roles' => :'Array<Id>'
|
|
@@ -62,7 +68,7 @@ module LaunchDarklyApi
|
|
|
62
68
|
return unless attributes.is_a?(Hash)
|
|
63
69
|
|
|
64
70
|
# convert string to symbol for hash key
|
|
65
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
66
72
|
|
|
67
73
|
if attributes.has_key?(:'_links')
|
|
68
74
|
self._links = attributes[:'_links']
|
|
@@ -80,6 +86,14 @@ module LaunchDarklyApi
|
|
|
80
86
|
self.email = attributes[:'email']
|
|
81
87
|
end
|
|
82
88
|
|
|
89
|
+
if attributes.has_key?(:'firstName')
|
|
90
|
+
self.first_name = attributes[:'firstName']
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.has_key?(:'lastName')
|
|
94
|
+
self.last_name = attributes[:'lastName']
|
|
95
|
+
end
|
|
96
|
+
|
|
83
97
|
if attributes.has_key?(:'_pendingInvite')
|
|
84
98
|
self._pending_invite = attributes[:'_pendingInvite']
|
|
85
99
|
end
|
|
@@ -93,20 +107,19 @@ module LaunchDarklyApi
|
|
|
93
107
|
self.custom_roles = value
|
|
94
108
|
end
|
|
95
109
|
end
|
|
96
|
-
|
|
97
110
|
end
|
|
98
111
|
|
|
99
112
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
100
113
|
# @return Array for valid properties with the reasons
|
|
101
114
|
def list_invalid_properties
|
|
102
115
|
invalid_properties = Array.new
|
|
103
|
-
|
|
116
|
+
invalid_properties
|
|
104
117
|
end
|
|
105
118
|
|
|
106
119
|
# Check to see if the all the properties in the model are valid
|
|
107
120
|
# @return true if the model is valid
|
|
108
121
|
def valid?
|
|
109
|
-
|
|
122
|
+
true
|
|
110
123
|
end
|
|
111
124
|
|
|
112
125
|
# Checks equality by comparing each attribute.
|
|
@@ -118,6 +131,8 @@ module LaunchDarklyApi
|
|
|
118
131
|
_id == o._id &&
|
|
119
132
|
role == o.role &&
|
|
120
133
|
email == o.email &&
|
|
134
|
+
first_name == o.first_name &&
|
|
135
|
+
last_name == o.last_name &&
|
|
121
136
|
_pending_invite == o._pending_invite &&
|
|
122
137
|
is_beta == o.is_beta &&
|
|
123
138
|
custom_roles == o.custom_roles
|
|
@@ -132,7 +147,7 @@ module LaunchDarklyApi
|
|
|
132
147
|
# Calculates hash code according to all attributes.
|
|
133
148
|
# @return [Fixnum] Hash code
|
|
134
149
|
def hash
|
|
135
|
-
[_links, _id, role, email, _pending_invite, is_beta, custom_roles].hash
|
|
150
|
+
[_links, _id, role, email, first_name, last_name, _pending_invite, is_beta, custom_roles].hash
|
|
136
151
|
end
|
|
137
152
|
|
|
138
153
|
# Builds the object from hash
|
|
@@ -145,7 +160,7 @@ module LaunchDarklyApi
|
|
|
145
160
|
# check to ensure the input is an array given that the the attribute
|
|
146
161
|
# is documented as an array but the input is not
|
|
147
162
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
148
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
163
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
149
164
|
end
|
|
150
165
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
151
166
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -227,7 +242,7 @@ module LaunchDarklyApi
|
|
|
227
242
|
# @return [Hash] Returns the value in the form of hash
|
|
228
243
|
def _to_hash(value)
|
|
229
244
|
if value.is_a?(Array)
|
|
230
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
|
231
246
|
elsif value.is_a?(Hash)
|
|
232
247
|
{}.tap do |hash|
|
|
233
248
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -238,7 +253,5 @@ module LaunchDarklyApi
|
|
|
238
253
|
value
|
|
239
254
|
end
|
|
240
255
|
end
|
|
241
|
-
|
|
242
256
|
end
|
|
243
|
-
|
|
244
257
|
end
|
|
@@ -3,23 +3,21 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0.
|
|
6
|
+
OpenAPI spec version: 2.0.27
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.8
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module LaunchDarklyApi
|
|
16
|
-
|
|
17
16
|
class Members
|
|
18
17
|
attr_accessor :_links
|
|
19
18
|
|
|
20
19
|
attr_accessor :items
|
|
21
20
|
|
|
22
|
-
|
|
23
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
22
|
def self.attribute_map
|
|
25
23
|
{
|
|
@@ -32,7 +30,7 @@ module LaunchDarklyApi
|
|
|
32
30
|
def self.swagger_types
|
|
33
31
|
{
|
|
34
32
|
:'_links' => :'Links',
|
|
35
|
-
:'items' => :'Member'
|
|
33
|
+
:'items' => :'Array<Member>'
|
|
36
34
|
}
|
|
37
35
|
end
|
|
38
36
|
|
|
@@ -42,29 +40,30 @@ module LaunchDarklyApi
|
|
|
42
40
|
return unless attributes.is_a?(Hash)
|
|
43
41
|
|
|
44
42
|
# convert string to symbol for hash key
|
|
45
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
46
44
|
|
|
47
45
|
if attributes.has_key?(:'_links')
|
|
48
46
|
self._links = attributes[:'_links']
|
|
49
47
|
end
|
|
50
48
|
|
|
51
49
|
if attributes.has_key?(:'items')
|
|
52
|
-
|
|
50
|
+
if (value = attributes[:'items']).is_a?(Array)
|
|
51
|
+
self.items = value
|
|
52
|
+
end
|
|
53
53
|
end
|
|
54
|
-
|
|
55
54
|
end
|
|
56
55
|
|
|
57
56
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
58
57
|
# @return Array for valid properties with the reasons
|
|
59
58
|
def list_invalid_properties
|
|
60
59
|
invalid_properties = Array.new
|
|
61
|
-
|
|
60
|
+
invalid_properties
|
|
62
61
|
end
|
|
63
62
|
|
|
64
63
|
# Check to see if the all the properties in the model are valid
|
|
65
64
|
# @return true if the model is valid
|
|
66
65
|
def valid?
|
|
67
|
-
|
|
66
|
+
true
|
|
68
67
|
end
|
|
69
68
|
|
|
70
69
|
# Checks equality by comparing each attribute.
|
|
@@ -98,7 +97,7 @@ module LaunchDarklyApi
|
|
|
98
97
|
# check to ensure the input is an array given that the the attribute
|
|
99
98
|
# is documented as an array but the input is not
|
|
100
99
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
101
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
102
101
|
end
|
|
103
102
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
104
103
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -180,7 +179,7 @@ module LaunchDarklyApi
|
|
|
180
179
|
# @return [Hash] Returns the value in the form of hash
|
|
181
180
|
def _to_hash(value)
|
|
182
181
|
if value.is_a?(Array)
|
|
183
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
|
184
183
|
elsif value.is_a?(Hash)
|
|
185
184
|
{}.tap do |hash|
|
|
186
185
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -191,7 +190,5 @@ module LaunchDarklyApi
|
|
|
191
190
|
value
|
|
192
191
|
end
|
|
193
192
|
end
|
|
194
|
-
|
|
195
193
|
end
|
|
196
|
-
|
|
197
194
|
end
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0.
|
|
6
|
+
OpenAPI spec version: 2.0.27
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.8
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module LaunchDarklyApi
|
|
16
|
-
|
|
17
16
|
class MembersBody
|
|
18
17
|
attr_accessor :email
|
|
19
18
|
|
|
@@ -27,7 +26,6 @@ module LaunchDarklyApi
|
|
|
27
26
|
|
|
28
27
|
attr_accessor :inline_role
|
|
29
28
|
|
|
30
|
-
|
|
31
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
30
|
def self.attribute_map
|
|
33
31
|
{
|
|
@@ -47,7 +45,7 @@ module LaunchDarklyApi
|
|
|
47
45
|
:'first_name' => :'String',
|
|
48
46
|
:'last_name' => :'String',
|
|
49
47
|
:'role' => :'Role',
|
|
50
|
-
:'custom_roles' => :'Array<
|
|
48
|
+
:'custom_roles' => :'Array<String>',
|
|
51
49
|
:'inline_role' => :'Statements'
|
|
52
50
|
}
|
|
53
51
|
end
|
|
@@ -58,7 +56,7 @@ module LaunchDarklyApi
|
|
|
58
56
|
return unless attributes.is_a?(Hash)
|
|
59
57
|
|
|
60
58
|
# convert string to symbol for hash key
|
|
61
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
62
60
|
|
|
63
61
|
if attributes.has_key?(:'email')
|
|
64
62
|
self.email = attributes[:'email']
|
|
@@ -85,7 +83,6 @@ module LaunchDarklyApi
|
|
|
85
83
|
if attributes.has_key?(:'inlineRole')
|
|
86
84
|
self.inline_role = attributes[:'inlineRole']
|
|
87
85
|
end
|
|
88
|
-
|
|
89
86
|
end
|
|
90
87
|
|
|
91
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -93,17 +90,17 @@ module LaunchDarklyApi
|
|
|
93
90
|
def list_invalid_properties
|
|
94
91
|
invalid_properties = Array.new
|
|
95
92
|
if @email.nil?
|
|
96
|
-
invalid_properties.push(
|
|
93
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
97
94
|
end
|
|
98
95
|
|
|
99
|
-
|
|
96
|
+
invalid_properties
|
|
100
97
|
end
|
|
101
98
|
|
|
102
99
|
# Check to see if the all the properties in the model are valid
|
|
103
100
|
# @return true if the model is valid
|
|
104
101
|
def valid?
|
|
105
102
|
return false if @email.nil?
|
|
106
|
-
|
|
103
|
+
true
|
|
107
104
|
end
|
|
108
105
|
|
|
109
106
|
# Checks equality by comparing each attribute.
|
|
@@ -141,7 +138,7 @@ module LaunchDarklyApi
|
|
|
141
138
|
# check to ensure the input is an array given that the the attribute
|
|
142
139
|
# is documented as an array but the input is not
|
|
143
140
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
144
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
141
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
145
142
|
end
|
|
146
143
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
147
144
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -223,7 +220,7 @@ module LaunchDarklyApi
|
|
|
223
220
|
# @return [Hash] Returns the value in the form of hash
|
|
224
221
|
def _to_hash(value)
|
|
225
222
|
if value.is_a?(Array)
|
|
226
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
|
227
224
|
elsif value.is_a?(Hash)
|
|
228
225
|
{}.tap do |hash|
|
|
229
226
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -234,7 +231,5 @@ module LaunchDarklyApi
|
|
|
234
231
|
value
|
|
235
232
|
end
|
|
236
233
|
end
|
|
237
|
-
|
|
238
234
|
end
|
|
239
|
-
|
|
240
235
|
end
|
|
@@ -3,23 +3,21 @@
|
|
|
3
3
|
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0.
|
|
6
|
+
OpenAPI spec version: 2.0.27
|
|
7
7
|
Contact: support@launchdarkly.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.8
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module LaunchDarklyApi
|
|
16
|
-
|
|
17
16
|
class PatchComment
|
|
18
17
|
attr_accessor :comment
|
|
19
18
|
|
|
20
19
|
attr_accessor :patch
|
|
21
20
|
|
|
22
|
-
|
|
23
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
22
|
def self.attribute_map
|
|
25
23
|
{
|
|
@@ -42,7 +40,7 @@ module LaunchDarklyApi
|
|
|
42
40
|
return unless attributes.is_a?(Hash)
|
|
43
41
|
|
|
44
42
|
# convert string to symbol for hash key
|
|
45
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
46
44
|
|
|
47
45
|
if attributes.has_key?(:'comment')
|
|
48
46
|
self.comment = attributes[:'comment']
|
|
@@ -53,20 +51,19 @@ module LaunchDarklyApi
|
|
|
53
51
|
self.patch = value
|
|
54
52
|
end
|
|
55
53
|
end
|
|
56
|
-
|
|
57
54
|
end
|
|
58
55
|
|
|
59
56
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
60
57
|
# @return Array for valid properties with the reasons
|
|
61
58
|
def list_invalid_properties
|
|
62
59
|
invalid_properties = Array.new
|
|
63
|
-
|
|
60
|
+
invalid_properties
|
|
64
61
|
end
|
|
65
62
|
|
|
66
63
|
# Check to see if the all the properties in the model are valid
|
|
67
64
|
# @return true if the model is valid
|
|
68
65
|
def valid?
|
|
69
|
-
|
|
66
|
+
true
|
|
70
67
|
end
|
|
71
68
|
|
|
72
69
|
# Checks equality by comparing each attribute.
|
|
@@ -100,7 +97,7 @@ module LaunchDarklyApi
|
|
|
100
97
|
# check to ensure the input is an array given that the the attribute
|
|
101
98
|
# is documented as an array but the input is not
|
|
102
99
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
103
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
104
101
|
end
|
|
105
102
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
106
103
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -182,7 +179,7 @@ module LaunchDarklyApi
|
|
|
182
179
|
# @return [Hash] Returns the value in the form of hash
|
|
183
180
|
def _to_hash(value)
|
|
184
181
|
if value.is_a?(Array)
|
|
185
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
|
186
183
|
elsif value.is_a?(Hash)
|
|
187
184
|
{}.tap do |hash|
|
|
188
185
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -193,7 +190,5 @@ module LaunchDarklyApi
|
|
|
193
190
|
value
|
|
194
191
|
end
|
|
195
192
|
end
|
|
196
|
-
|
|
197
193
|
end
|
|
198
|
-
|
|
199
194
|
end
|