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,183 @@
|
|
|
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 DestinationSegment
|
|
17
|
+
attr_accessor :write_key
|
|
18
|
+
|
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
|
+
def self.attribute_map
|
|
21
|
+
{
|
|
22
|
+
:'write_key' => :'writeKey'
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Attribute type mapping.
|
|
27
|
+
def self.swagger_types
|
|
28
|
+
{
|
|
29
|
+
:'write_key' => :'String'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Initializes the object
|
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
35
|
+
def initialize(attributes = {})
|
|
36
|
+
return unless attributes.is_a?(Hash)
|
|
37
|
+
|
|
38
|
+
# convert string to symbol for hash key
|
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
40
|
+
|
|
41
|
+
if attributes.has_key?(:'writeKey')
|
|
42
|
+
self.write_key = attributes[:'writeKey']
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
47
|
+
# @return Array for valid properties with the reasons
|
|
48
|
+
def list_invalid_properties
|
|
49
|
+
invalid_properties = Array.new
|
|
50
|
+
invalid_properties
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Check to see if the all the properties in the model are valid
|
|
54
|
+
# @return true if the model is valid
|
|
55
|
+
def valid?
|
|
56
|
+
true
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Checks equality by comparing each attribute.
|
|
60
|
+
# @param [Object] Object to be compared
|
|
61
|
+
def ==(o)
|
|
62
|
+
return true if self.equal?(o)
|
|
63
|
+
self.class == o.class &&
|
|
64
|
+
write_key == o.write_key
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# @see the `==` method
|
|
68
|
+
# @param [Object] Object to be compared
|
|
69
|
+
def eql?(o)
|
|
70
|
+
self == o
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Calculates hash code according to all attributes.
|
|
74
|
+
# @return [Fixnum] Hash code
|
|
75
|
+
def hash
|
|
76
|
+
[write_key].hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Builds the object from hash
|
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
81
|
+
# @return [Object] Returns the model itself
|
|
82
|
+
def build_from_hash(attributes)
|
|
83
|
+
return nil unless attributes.is_a?(Hash)
|
|
84
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
85
|
+
if type =~ /\AArray<(.*)>/i
|
|
86
|
+
# check to ensure the input is an array given that the the attribute
|
|
87
|
+
# is documented as an array but the input is not
|
|
88
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
89
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
90
|
+
end
|
|
91
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
92
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
93
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
self
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Deserializes the data based on type
|
|
100
|
+
# @param string type Data type
|
|
101
|
+
# @param string value Value to be deserialized
|
|
102
|
+
# @return [Object] Deserialized data
|
|
103
|
+
def _deserialize(type, value)
|
|
104
|
+
case type.to_sym
|
|
105
|
+
when :DateTime
|
|
106
|
+
DateTime.parse(value)
|
|
107
|
+
when :Date
|
|
108
|
+
Date.parse(value)
|
|
109
|
+
when :String
|
|
110
|
+
value.to_s
|
|
111
|
+
when :Integer
|
|
112
|
+
value.to_i
|
|
113
|
+
when :Float
|
|
114
|
+
value.to_f
|
|
115
|
+
when :BOOLEAN
|
|
116
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
117
|
+
true
|
|
118
|
+
else
|
|
119
|
+
false
|
|
120
|
+
end
|
|
121
|
+
when :Object
|
|
122
|
+
# generic object (usually a Hash), return directly
|
|
123
|
+
value
|
|
124
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
125
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
126
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
127
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
128
|
+
k_type = Regexp.last_match[:k_type]
|
|
129
|
+
v_type = Regexp.last_match[:v_type]
|
|
130
|
+
{}.tap do |hash|
|
|
131
|
+
value.each do |k, v|
|
|
132
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
else # model
|
|
136
|
+
temp_model = LaunchDarklyApi.const_get(type).new
|
|
137
|
+
temp_model.build_from_hash(value)
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Returns the string representation of the object
|
|
142
|
+
# @return [String] String presentation of the object
|
|
143
|
+
def to_s
|
|
144
|
+
to_hash.to_s
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_body
|
|
150
|
+
to_hash
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Returns the object in the form of hash
|
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
|
155
|
+
def to_hash
|
|
156
|
+
hash = {}
|
|
157
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
158
|
+
value = self.send(attr)
|
|
159
|
+
next if value.nil?
|
|
160
|
+
hash[param] = _to_hash(value)
|
|
161
|
+
end
|
|
162
|
+
hash
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Outputs non-array value in the form of hash
|
|
166
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
167
|
+
# @param [Object] value Any valid value
|
|
168
|
+
# @return [Hash] Returns the value in the form of hash
|
|
169
|
+
def _to_hash(value)
|
|
170
|
+
if value.is_a?(Array)
|
|
171
|
+
value.compact.map { |v| _to_hash(v) }
|
|
172
|
+
elsif value.is_a?(Hash)
|
|
173
|
+
{}.tap do |hash|
|
|
174
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
175
|
+
end
|
|
176
|
+
elsif value.respond_to? :to_hash
|
|
177
|
+
value.to_hash
|
|
178
|
+
else
|
|
179
|
+
value
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
@@ -0,0 +1,194 @@
|
|
|
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 Destinations
|
|
17
|
+
attr_accessor :_links
|
|
18
|
+
|
|
19
|
+
attr_accessor :items
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'_links' => :'_links',
|
|
25
|
+
:'items' => :'items'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.swagger_types
|
|
31
|
+
{
|
|
32
|
+
:'_links' => :'Links',
|
|
33
|
+
:'items' => :'Array<Destination>'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Initializes the object
|
|
38
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
39
|
+
def initialize(attributes = {})
|
|
40
|
+
return unless attributes.is_a?(Hash)
|
|
41
|
+
|
|
42
|
+
# convert string to symbol for hash key
|
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
44
|
+
|
|
45
|
+
if attributes.has_key?(:'_links')
|
|
46
|
+
self._links = attributes[:'_links']
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if attributes.has_key?(:'items')
|
|
50
|
+
if (value = attributes[:'items']).is_a?(Array)
|
|
51
|
+
self.items = value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
57
|
+
# @return Array for valid properties with the reasons
|
|
58
|
+
def list_invalid_properties
|
|
59
|
+
invalid_properties = Array.new
|
|
60
|
+
invalid_properties
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Check to see if the all the properties in the model are valid
|
|
64
|
+
# @return true if the model is valid
|
|
65
|
+
def valid?
|
|
66
|
+
true
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Checks equality by comparing each attribute.
|
|
70
|
+
# @param [Object] Object to be compared
|
|
71
|
+
def ==(o)
|
|
72
|
+
return true if self.equal?(o)
|
|
73
|
+
self.class == o.class &&
|
|
74
|
+
_links == o._links &&
|
|
75
|
+
items == o.items
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @see the `==` method
|
|
79
|
+
# @param [Object] Object to be compared
|
|
80
|
+
def eql?(o)
|
|
81
|
+
self == o
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Calculates hash code according to all attributes.
|
|
85
|
+
# @return [Fixnum] Hash code
|
|
86
|
+
def hash
|
|
87
|
+
[_links, items].hash
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Builds the object from hash
|
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
92
|
+
# @return [Object] Returns the model itself
|
|
93
|
+
def build_from_hash(attributes)
|
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
96
|
+
if type =~ /\AArray<(.*)>/i
|
|
97
|
+
# check to ensure the input is an array given that the the attribute
|
|
98
|
+
# is documented as an array but the input is not
|
|
99
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
101
|
+
end
|
|
102
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
103
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
104
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
self
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Deserializes the data based on type
|
|
111
|
+
# @param string type Data type
|
|
112
|
+
# @param string value Value to be deserialized
|
|
113
|
+
# @return [Object] Deserialized data
|
|
114
|
+
def _deserialize(type, value)
|
|
115
|
+
case type.to_sym
|
|
116
|
+
when :DateTime
|
|
117
|
+
DateTime.parse(value)
|
|
118
|
+
when :Date
|
|
119
|
+
Date.parse(value)
|
|
120
|
+
when :String
|
|
121
|
+
value.to_s
|
|
122
|
+
when :Integer
|
|
123
|
+
value.to_i
|
|
124
|
+
when :Float
|
|
125
|
+
value.to_f
|
|
126
|
+
when :BOOLEAN
|
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
128
|
+
true
|
|
129
|
+
else
|
|
130
|
+
false
|
|
131
|
+
end
|
|
132
|
+
when :Object
|
|
133
|
+
# generic object (usually a Hash), return directly
|
|
134
|
+
value
|
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
|
141
|
+
{}.tap do |hash|
|
|
142
|
+
value.each do |k, v|
|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
else # model
|
|
147
|
+
temp_model = LaunchDarklyApi.const_get(type).new
|
|
148
|
+
temp_model.build_from_hash(value)
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Returns the string representation of the object
|
|
153
|
+
# @return [String] String presentation of the object
|
|
154
|
+
def to_s
|
|
155
|
+
to_hash.to_s
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
|
160
|
+
def to_body
|
|
161
|
+
to_hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Returns the object in the form of hash
|
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
|
166
|
+
def to_hash
|
|
167
|
+
hash = {}
|
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
169
|
+
value = self.send(attr)
|
|
170
|
+
next if value.nil?
|
|
171
|
+
hash[param] = _to_hash(value)
|
|
172
|
+
end
|
|
173
|
+
hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Outputs non-array value in the form of hash
|
|
177
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
178
|
+
# @param [Object] value Any valid value
|
|
179
|
+
# @return [Hash] Returns the value in the form of hash
|
|
180
|
+
def _to_hash(value)
|
|
181
|
+
if value.is_a?(Array)
|
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
|
183
|
+
elsif value.is_a?(Hash)
|
|
184
|
+
{}.tap do |hash|
|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
186
|
+
end
|
|
187
|
+
elsif value.respond_to? :to_hash
|
|
188
|
+
value.to_hash
|
|
189
|
+
else
|
|
190
|
+
value
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
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 Environment
|
|
18
17
|
attr_accessor :_links
|
|
19
18
|
|
|
@@ -46,6 +45,11 @@ module LaunchDarklyApi
|
|
|
46
45
|
# An array of tags for this environment.
|
|
47
46
|
attr_accessor :tags
|
|
48
47
|
|
|
48
|
+
# Determines if this environment requires comments for flag and segment changes.
|
|
49
|
+
attr_accessor :require_comments
|
|
50
|
+
|
|
51
|
+
# Determines if this environment requires confirmation for flag and segment changes.
|
|
52
|
+
attr_accessor :confirm_changes
|
|
49
53
|
|
|
50
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
51
55
|
def self.attribute_map
|
|
@@ -60,7 +64,9 @@ module LaunchDarklyApi
|
|
|
60
64
|
:'default_ttl' => :'defaultTtl',
|
|
61
65
|
:'secure_mode' => :'secureMode',
|
|
62
66
|
:'default_track_events' => :'defaultTrackEvents',
|
|
63
|
-
:'tags' => :'tags'
|
|
67
|
+
:'tags' => :'tags',
|
|
68
|
+
:'require_comments' => :'requireComments',
|
|
69
|
+
:'confirm_changes' => :'confirmChanges'
|
|
64
70
|
}
|
|
65
71
|
end
|
|
66
72
|
|
|
@@ -77,7 +83,9 @@ module LaunchDarklyApi
|
|
|
77
83
|
:'default_ttl' => :'Float',
|
|
78
84
|
:'secure_mode' => :'BOOLEAN',
|
|
79
85
|
:'default_track_events' => :'BOOLEAN',
|
|
80
|
-
:'tags' => :'Array<String>'
|
|
86
|
+
:'tags' => :'Array<String>',
|
|
87
|
+
:'require_comments' => :'BOOLEAN',
|
|
88
|
+
:'confirm_changes' => :'BOOLEAN'
|
|
81
89
|
}
|
|
82
90
|
end
|
|
83
91
|
|
|
@@ -87,7 +95,7 @@ module LaunchDarklyApi
|
|
|
87
95
|
return unless attributes.is_a?(Hash)
|
|
88
96
|
|
|
89
97
|
# convert string to symbol for hash key
|
|
90
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
98
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
91
99
|
|
|
92
100
|
if attributes.has_key?(:'_links')
|
|
93
101
|
self._links = attributes[:'_links']
|
|
@@ -135,19 +143,26 @@ module LaunchDarklyApi
|
|
|
135
143
|
end
|
|
136
144
|
end
|
|
137
145
|
|
|
146
|
+
if attributes.has_key?(:'requireComments')
|
|
147
|
+
self.require_comments = attributes[:'requireComments']
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.has_key?(:'confirmChanges')
|
|
151
|
+
self.confirm_changes = attributes[:'confirmChanges']
|
|
152
|
+
end
|
|
138
153
|
end
|
|
139
154
|
|
|
140
155
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
141
156
|
# @return Array for valid properties with the reasons
|
|
142
157
|
def list_invalid_properties
|
|
143
158
|
invalid_properties = Array.new
|
|
144
|
-
|
|
159
|
+
invalid_properties
|
|
145
160
|
end
|
|
146
161
|
|
|
147
162
|
# Check to see if the all the properties in the model are valid
|
|
148
163
|
# @return true if the model is valid
|
|
149
164
|
def valid?
|
|
150
|
-
|
|
165
|
+
true
|
|
151
166
|
end
|
|
152
167
|
|
|
153
168
|
# Checks equality by comparing each attribute.
|
|
@@ -165,7 +180,9 @@ module LaunchDarklyApi
|
|
|
165
180
|
default_ttl == o.default_ttl &&
|
|
166
181
|
secure_mode == o.secure_mode &&
|
|
167
182
|
default_track_events == o.default_track_events &&
|
|
168
|
-
tags == o.tags
|
|
183
|
+
tags == o.tags &&
|
|
184
|
+
require_comments == o.require_comments &&
|
|
185
|
+
confirm_changes == o.confirm_changes
|
|
169
186
|
end
|
|
170
187
|
|
|
171
188
|
# @see the `==` method
|
|
@@ -177,7 +194,7 @@ module LaunchDarklyApi
|
|
|
177
194
|
# Calculates hash code according to all attributes.
|
|
178
195
|
# @return [Fixnum] Hash code
|
|
179
196
|
def hash
|
|
180
|
-
[_links, _id, key, name, api_key, mobile_key, color, default_ttl, secure_mode, default_track_events, tags].hash
|
|
197
|
+
[_links, _id, key, name, api_key, mobile_key, color, default_ttl, secure_mode, default_track_events, tags, require_comments, confirm_changes].hash
|
|
181
198
|
end
|
|
182
199
|
|
|
183
200
|
# Builds the object from hash
|
|
@@ -190,7 +207,7 @@ module LaunchDarklyApi
|
|
|
190
207
|
# check to ensure the input is an array given that the the attribute
|
|
191
208
|
# is documented as an array but the input is not
|
|
192
209
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
193
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
210
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
194
211
|
end
|
|
195
212
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
196
213
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -272,7 +289,7 @@ module LaunchDarklyApi
|
|
|
272
289
|
# @return [Hash] Returns the value in the form of hash
|
|
273
290
|
def _to_hash(value)
|
|
274
291
|
if value.is_a?(Array)
|
|
275
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
292
|
+
value.compact.map { |v| _to_hash(v) }
|
|
276
293
|
elsif value.is_a?(Hash)
|
|
277
294
|
{}.tap do |hash|
|
|
278
295
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -283,7 +300,5 @@ module LaunchDarklyApi
|
|
|
283
300
|
value
|
|
284
301
|
end
|
|
285
302
|
end
|
|
286
|
-
|
|
287
303
|
end
|
|
288
|
-
|
|
289
304
|
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 EnvironmentPost
|
|
18
17
|
# The name of the new environment.
|
|
19
18
|
attr_accessor :name
|
|
@@ -27,6 +26,20 @@ module LaunchDarklyApi
|
|
|
27
26
|
# The default TTL for the new environment.
|
|
28
27
|
attr_accessor :default_ttl
|
|
29
28
|
|
|
29
|
+
# Determines whether the environment is in secure mode.
|
|
30
|
+
attr_accessor :secure_mode
|
|
31
|
+
|
|
32
|
+
# Set to true to send detailed event information for newly created flags.
|
|
33
|
+
attr_accessor :default_track_events
|
|
34
|
+
|
|
35
|
+
# An array of tags for this environment.
|
|
36
|
+
attr_accessor :tags
|
|
37
|
+
|
|
38
|
+
# Determines if this environment requires comments for flag and segment changes.
|
|
39
|
+
attr_accessor :require_comments
|
|
40
|
+
|
|
41
|
+
# Determines if this environment requires confirmation for flag and segment changes.
|
|
42
|
+
attr_accessor :confirm_changes
|
|
30
43
|
|
|
31
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
45
|
def self.attribute_map
|
|
@@ -34,7 +47,12 @@ module LaunchDarklyApi
|
|
|
34
47
|
:'name' => :'name',
|
|
35
48
|
:'key' => :'key',
|
|
36
49
|
:'color' => :'color',
|
|
37
|
-
:'default_ttl' => :'defaultTtl'
|
|
50
|
+
:'default_ttl' => :'defaultTtl',
|
|
51
|
+
:'secure_mode' => :'secureMode',
|
|
52
|
+
:'default_track_events' => :'defaultTrackEvents',
|
|
53
|
+
:'tags' => :'tags',
|
|
54
|
+
:'require_comments' => :'requireComments',
|
|
55
|
+
:'confirm_changes' => :'confirmChanges'
|
|
38
56
|
}
|
|
39
57
|
end
|
|
40
58
|
|
|
@@ -44,7 +62,12 @@ module LaunchDarklyApi
|
|
|
44
62
|
:'name' => :'String',
|
|
45
63
|
:'key' => :'String',
|
|
46
64
|
:'color' => :'String',
|
|
47
|
-
:'default_ttl' => :'Float'
|
|
65
|
+
:'default_ttl' => :'Float',
|
|
66
|
+
:'secure_mode' => :'BOOLEAN',
|
|
67
|
+
:'default_track_events' => :'BOOLEAN',
|
|
68
|
+
:'tags' => :'Array<String>',
|
|
69
|
+
:'require_comments' => :'BOOLEAN',
|
|
70
|
+
:'confirm_changes' => :'BOOLEAN'
|
|
48
71
|
}
|
|
49
72
|
end
|
|
50
73
|
|
|
@@ -54,7 +77,7 @@ module LaunchDarklyApi
|
|
|
54
77
|
return unless attributes.is_a?(Hash)
|
|
55
78
|
|
|
56
79
|
# convert string to symbol for hash key
|
|
57
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
58
81
|
|
|
59
82
|
if attributes.has_key?(:'name')
|
|
60
83
|
self.name = attributes[:'name']
|
|
@@ -72,6 +95,27 @@ module LaunchDarklyApi
|
|
|
72
95
|
self.default_ttl = attributes[:'defaultTtl']
|
|
73
96
|
end
|
|
74
97
|
|
|
98
|
+
if attributes.has_key?(:'secureMode')
|
|
99
|
+
self.secure_mode = attributes[:'secureMode']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.has_key?(:'defaultTrackEvents')
|
|
103
|
+
self.default_track_events = attributes[:'defaultTrackEvents']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.has_key?(:'tags')
|
|
107
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
|
108
|
+
self.tags = value
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.has_key?(:'requireComments')
|
|
113
|
+
self.require_comments = attributes[:'requireComments']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.has_key?(:'confirmChanges')
|
|
117
|
+
self.confirm_changes = attributes[:'confirmChanges']
|
|
118
|
+
end
|
|
75
119
|
end
|
|
76
120
|
|
|
77
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -79,18 +123,18 @@ module LaunchDarklyApi
|
|
|
79
123
|
def list_invalid_properties
|
|
80
124
|
invalid_properties = Array.new
|
|
81
125
|
if @name.nil?
|
|
82
|
-
invalid_properties.push(
|
|
126
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
83
127
|
end
|
|
84
128
|
|
|
85
129
|
if @key.nil?
|
|
86
|
-
invalid_properties.push(
|
|
130
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
87
131
|
end
|
|
88
132
|
|
|
89
133
|
if @color.nil?
|
|
90
|
-
invalid_properties.push(
|
|
134
|
+
invalid_properties.push('invalid value for "color", color cannot be nil.')
|
|
91
135
|
end
|
|
92
136
|
|
|
93
|
-
|
|
137
|
+
invalid_properties
|
|
94
138
|
end
|
|
95
139
|
|
|
96
140
|
# Check to see if the all the properties in the model are valid
|
|
@@ -99,7 +143,7 @@ module LaunchDarklyApi
|
|
|
99
143
|
return false if @name.nil?
|
|
100
144
|
return false if @key.nil?
|
|
101
145
|
return false if @color.nil?
|
|
102
|
-
|
|
146
|
+
true
|
|
103
147
|
end
|
|
104
148
|
|
|
105
149
|
# Checks equality by comparing each attribute.
|
|
@@ -110,7 +154,12 @@ module LaunchDarklyApi
|
|
|
110
154
|
name == o.name &&
|
|
111
155
|
key == o.key &&
|
|
112
156
|
color == o.color &&
|
|
113
|
-
default_ttl == o.default_ttl
|
|
157
|
+
default_ttl == o.default_ttl &&
|
|
158
|
+
secure_mode == o.secure_mode &&
|
|
159
|
+
default_track_events == o.default_track_events &&
|
|
160
|
+
tags == o.tags &&
|
|
161
|
+
require_comments == o.require_comments &&
|
|
162
|
+
confirm_changes == o.confirm_changes
|
|
114
163
|
end
|
|
115
164
|
|
|
116
165
|
# @see the `==` method
|
|
@@ -122,7 +171,7 @@ module LaunchDarklyApi
|
|
|
122
171
|
# Calculates hash code according to all attributes.
|
|
123
172
|
# @return [Fixnum] Hash code
|
|
124
173
|
def hash
|
|
125
|
-
[name, key, color, default_ttl].hash
|
|
174
|
+
[name, key, color, default_ttl, secure_mode, default_track_events, tags, require_comments, confirm_changes].hash
|
|
126
175
|
end
|
|
127
176
|
|
|
128
177
|
# Builds the object from hash
|
|
@@ -135,7 +184,7 @@ module LaunchDarklyApi
|
|
|
135
184
|
# check to ensure the input is an array given that the the attribute
|
|
136
185
|
# is documented as an array but the input is not
|
|
137
186
|
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) }
|
|
187
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
139
188
|
end
|
|
140
189
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
141
190
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -217,7 +266,7 @@ module LaunchDarklyApi
|
|
|
217
266
|
# @return [Hash] Returns the value in the form of hash
|
|
218
267
|
def _to_hash(value)
|
|
219
268
|
if value.is_a?(Array)
|
|
220
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
269
|
+
value.compact.map { |v| _to_hash(v) }
|
|
221
270
|
elsif value.is_a?(Hash)
|
|
222
271
|
{}.tap do |hash|
|
|
223
272
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -228,7 +277,5 @@ module LaunchDarklyApi
|
|
|
228
277
|
value
|
|
229
278
|
end
|
|
230
279
|
end
|
|
231
|
-
|
|
232
280
|
end
|
|
233
|
-
|
|
234
281
|
end
|