datadog_api_client 2.21.0 → 2.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +180 -637
- data/.generator/schemas/v2/openapi.yaml +515 -33
- data/.github/workflows/prepare_release.yml +2 -2
- data/.github/workflows/publish.yml +2 -2
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +24 -0
- data/Gemfile +1 -1
- data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
- data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -0
- data/examples/v1/aws-integration/UpdateAWSAccount.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb +118 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +3 -0
- data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +2 -2
- data/examples/v2/authn-mappings/CreateAuthNMapping.rb +1 -1
- data/examples/v2/authn-mappings/UpdateAuthNMapping.rb +1 -1
- data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +1 -1
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +1 -1
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount.rb +1 -1
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +1 -1
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +1 -1
- data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +4 -0
- data/examples/v2/metrics/QueryScalarData_3112571352.rb +2 -2
- data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +3 -3
- data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb +19 -0
- data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.rb +42 -0
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +4 -0
- data/examples/v2/service-level-objectives/CreateSLOReportJob.rb +20 -0
- data/examples/v2/service-level-objectives/GetSLOReport.rb +8 -0
- data/examples/v2/service-level-objectives/GetSLOReportJobStatus.rb +11 -0
- data/lib/datadog_api_client/configuration.rb +3 -0
- data/lib/datadog_api_client/inflector.rb +20 -7
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +104 -131
- data/lib/datadog_api_client/v1/models/aws_account.rb +12 -2
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +4 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/series.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +14 -2
- data/lib/datadog_api_client/v1/models/slo_time_slice_interval.rb +29 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +13 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +175 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request_body_type.rb +2 -0
- data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +6 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +67 -0
- data/lib/datadog_api_client/v2/api/service_level_objectives_api.rb +245 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +12 -3
- data/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_create_relationships.rb +37 -54
- data/lib/datadog_api_client/v2/models/authn_mapping_included.rb +2 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb +98 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb +98 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb +14 -4
- data/lib/datadog_api_client/{v1/models/usage_attribution_metadata.rb → v2/models/authn_mapping_team.rb} +31 -23
- data/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb +212 -0
- data/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/authn_mapping_update_relationships.rb +37 -54
- data/lib/datadog_api_client/v2/models/custom_destination_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_series.rb +1 -1
- data/lib/datadog_api_client/v2/models/relationship_to_team.rb +80 -0
- data/lib/datadog_api_client/{v1/models/usage_attribution_response.rb → v2/models/relationship_to_team_data.rb} +21 -23
- data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +183 -0
- data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +13 -14
- data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +13 -1
- data/lib/datadog_api_client/v2/models/slo_report_create_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb +160 -0
- data/lib/datadog_api_client/{v1/models/usage_attribution_pagination.rb → v2/models/slo_report_create_request_data.rb} +29 -51
- data/lib/datadog_api_client/v2/models/slo_report_interval.rb +27 -0
- data/lib/datadog_api_client/v2/models/slo_report_post_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/slo_report_status.rb +29 -0
- data/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb +80 -0
- data/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb +100 -0
- data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +8 -0
- data/lib/datadog_api_client/v2/models/user_teams_response.rb +13 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +51 -33
- data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -9
- data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +0 -152
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +0 -63
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +0 -74
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +0 -590
@@ -0,0 +1,98 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Relationship of AuthN Mapping to a Team.
|
21
|
+
class AuthNMappingRelationshipToTeam
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Relationship to team.
|
25
|
+
attr_reader :team
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
# @!visibility private
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'team' => :'team'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
# @!visibility private
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'team' => :'RelationshipToTeam'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
45
|
+
# @!visibility private
|
46
|
+
def initialize(attributes = {})
|
47
|
+
if (!attributes.is_a?(Hash))
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingRelationshipToTeam` initialize method"
|
49
|
+
end
|
50
|
+
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingRelationshipToTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'team')
|
60
|
+
self.team = attributes[:'team']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
# @!visibility private
|
67
|
+
def valid?
|
68
|
+
return false if @team.nil?
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Custom attribute writer method with validation
|
73
|
+
# @param team [Object] Object to be assigned
|
74
|
+
# @!visibility private
|
75
|
+
def team=(team)
|
76
|
+
if team.nil?
|
77
|
+
fail ArgumentError, 'invalid value for "team", team cannot be nil.'
|
78
|
+
end
|
79
|
+
@team = team
|
80
|
+
end
|
81
|
+
|
82
|
+
# Checks equality by comparing each attribute.
|
83
|
+
# @param o [Object] Object to be compared
|
84
|
+
# @!visibility private
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
team == o.team
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
# @!visibility private
|
94
|
+
def hash
|
95
|
+
[team].hash
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -27,12 +27,16 @@ module DatadogAPIClient::V2
|
|
27
27
|
# AuthN Mapping relationship to SAML Assertion Attribute.
|
28
28
|
attr_accessor :saml_assertion_attribute
|
29
29
|
|
30
|
+
# Relationship to team.
|
31
|
+
attr_accessor :team
|
32
|
+
|
30
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
34
|
# @!visibility private
|
32
35
|
def self.attribute_map
|
33
36
|
{
|
34
37
|
:'role' => :'role',
|
35
|
-
:'saml_assertion_attribute' => :'saml_assertion_attribute'
|
38
|
+
:'saml_assertion_attribute' => :'saml_assertion_attribute',
|
39
|
+
:'team' => :'team'
|
36
40
|
}
|
37
41
|
end
|
38
42
|
|
@@ -41,7 +45,8 @@ module DatadogAPIClient::V2
|
|
41
45
|
def self.openapi_types
|
42
46
|
{
|
43
47
|
:'role' => :'RelationshipToRole',
|
44
|
-
:'saml_assertion_attribute' => :'RelationshipToSAMLAssertionAttribute'
|
48
|
+
:'saml_assertion_attribute' => :'RelationshipToSAMLAssertionAttribute',
|
49
|
+
:'team' => :'RelationshipToTeam'
|
45
50
|
}
|
46
51
|
end
|
47
52
|
|
@@ -68,6 +73,10 @@ module DatadogAPIClient::V2
|
|
68
73
|
if attributes.key?(:'saml_assertion_attribute')
|
69
74
|
self.saml_assertion_attribute = attributes[:'saml_assertion_attribute']
|
70
75
|
end
|
76
|
+
|
77
|
+
if attributes.key?(:'team')
|
78
|
+
self.team = attributes[:'team']
|
79
|
+
end
|
71
80
|
end
|
72
81
|
|
73
82
|
# Checks equality by comparing each attribute.
|
@@ -77,14 +86,15 @@ module DatadogAPIClient::V2
|
|
77
86
|
return true if self.equal?(o)
|
78
87
|
self.class == o.class &&
|
79
88
|
role == o.role &&
|
80
|
-
saml_assertion_attribute == o.saml_assertion_attribute
|
89
|
+
saml_assertion_attribute == o.saml_assertion_attribute &&
|
90
|
+
team == o.team
|
81
91
|
end
|
82
92
|
|
83
93
|
# Calculates hash code according to all attributes.
|
84
94
|
# @return [Integer] Hash code
|
85
95
|
# @!visibility private
|
86
96
|
def hash
|
87
|
-
[role, saml_assertion_attribute].hash
|
97
|
+
[role, saml_assertion_attribute, team].hash
|
88
98
|
end
|
89
99
|
end
|
90
100
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
#Datadog API
|
2
|
+
#Datadog API V2 Collection
|
3
3
|
|
4
4
|
#Collection of all Datadog Public endpoints.
|
5
5
|
|
@@ -16,23 +16,27 @@ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.ge
|
|
16
16
|
require 'date'
|
17
17
|
require 'time'
|
18
18
|
|
19
|
-
module DatadogAPIClient::
|
20
|
-
#
|
21
|
-
class
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Team.
|
21
|
+
class AuthNMappingTeam
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
#
|
25
|
-
attr_accessor :
|
24
|
+
# Team attributes.
|
25
|
+
attr_accessor :attributes
|
26
26
|
|
27
|
-
# The
|
28
|
-
attr_accessor :
|
27
|
+
# The ID of the Team.
|
28
|
+
attr_accessor :id
|
29
|
+
|
30
|
+
# Team type
|
31
|
+
attr_accessor :type
|
29
32
|
|
30
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
34
|
# @!visibility private
|
32
35
|
def self.attribute_map
|
33
36
|
{
|
34
|
-
:'
|
35
|
-
:'
|
37
|
+
:'attributes' => :'attributes',
|
38
|
+
:'id' => :'id',
|
39
|
+
:'type' => :'type'
|
36
40
|
}
|
37
41
|
end
|
38
42
|
|
@@ -40,8 +44,9 @@ module DatadogAPIClient::V1
|
|
40
44
|
# @!visibility private
|
41
45
|
def self.openapi_types
|
42
46
|
{
|
43
|
-
:'
|
44
|
-
:'
|
47
|
+
:'attributes' => :'AuthNMappingTeamAttributes',
|
48
|
+
:'id' => :'String',
|
49
|
+
:'type' => :'TeamType'
|
45
50
|
}
|
46
51
|
end
|
47
52
|
|
@@ -50,25 +55,27 @@ module DatadogAPIClient::V1
|
|
50
55
|
# @!visibility private
|
51
56
|
def initialize(attributes = {})
|
52
57
|
if (!attributes.is_a?(Hash))
|
53
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingTeam` initialize method"
|
54
59
|
end
|
55
60
|
|
56
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
57
62
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
63
|
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingTeam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
65
|
end
|
61
66
|
h[k.to_sym] = v
|
62
67
|
}
|
63
68
|
|
64
|
-
if attributes.key?(:'
|
65
|
-
|
66
|
-
|
67
|
-
|
69
|
+
if attributes.key?(:'attributes')
|
70
|
+
self.attributes = attributes[:'attributes']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'id')
|
74
|
+
self.id = attributes[:'id']
|
68
75
|
end
|
69
76
|
|
70
|
-
if attributes.key?(:'
|
71
|
-
self.
|
77
|
+
if attributes.key?(:'type')
|
78
|
+
self.type = attributes[:'type']
|
72
79
|
end
|
73
80
|
end
|
74
81
|
|
@@ -78,15 +85,16 @@ module DatadogAPIClient::V1
|
|
78
85
|
def ==(o)
|
79
86
|
return true if self.equal?(o)
|
80
87
|
self.class == o.class &&
|
81
|
-
|
82
|
-
|
88
|
+
attributes == o.attributes &&
|
89
|
+
id == o.id &&
|
90
|
+
type == o.type
|
83
91
|
end
|
84
92
|
|
85
93
|
# Calculates hash code according to all attributes.
|
86
94
|
# @return [Integer] Hash code
|
87
95
|
# @!visibility private
|
88
96
|
def hash
|
89
|
-
[
|
97
|
+
[attributes, id, type].hash
|
90
98
|
end
|
91
99
|
end
|
92
100
|
end
|
@@ -0,0 +1,212 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'date'
|
17
|
+
require 'time'
|
18
|
+
|
19
|
+
module DatadogAPIClient::V2
|
20
|
+
# Team attributes.
|
21
|
+
class AuthNMappingTeamAttributes
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Unicode representation of the avatar for the team, limited to a single grapheme
|
25
|
+
attr_accessor :avatar
|
26
|
+
|
27
|
+
# Banner selection for the team
|
28
|
+
attr_accessor :banner
|
29
|
+
|
30
|
+
# The team's identifier
|
31
|
+
attr_reader :handle
|
32
|
+
|
33
|
+
# The number of links belonging to the team
|
34
|
+
attr_reader :link_count
|
35
|
+
|
36
|
+
# The name of the team
|
37
|
+
attr_reader :name
|
38
|
+
|
39
|
+
# A brief summary of the team, derived from the `description`
|
40
|
+
attr_reader :summary
|
41
|
+
|
42
|
+
# The number of users belonging to the team
|
43
|
+
attr_reader :user_count
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
# @!visibility private
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'avatar' => :'avatar',
|
50
|
+
:'banner' => :'banner',
|
51
|
+
:'handle' => :'handle',
|
52
|
+
:'link_count' => :'link_count',
|
53
|
+
:'name' => :'name',
|
54
|
+
:'summary' => :'summary',
|
55
|
+
:'user_count' => :'user_count'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
# @!visibility private
|
61
|
+
def self.openapi_types
|
62
|
+
{
|
63
|
+
:'avatar' => :'String',
|
64
|
+
:'banner' => :'Integer',
|
65
|
+
:'handle' => :'String',
|
66
|
+
:'link_count' => :'Integer',
|
67
|
+
:'name' => :'String',
|
68
|
+
:'summary' => :'String',
|
69
|
+
:'user_count' => :'Integer'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# List of attributes with nullable: true
|
74
|
+
# @!visibility private
|
75
|
+
def self.openapi_nullable
|
76
|
+
Set.new([
|
77
|
+
:'avatar',
|
78
|
+
:'banner',
|
79
|
+
:'summary',
|
80
|
+
])
|
81
|
+
end
|
82
|
+
|
83
|
+
# Initializes the object
|
84
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
85
|
+
# @!visibility private
|
86
|
+
def initialize(attributes = {})
|
87
|
+
if (!attributes.is_a?(Hash))
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingTeamAttributes` initialize method"
|
89
|
+
end
|
90
|
+
|
91
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
92
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
93
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::AuthNMappingTeamAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
95
|
+
end
|
96
|
+
h[k.to_sym] = v
|
97
|
+
}
|
98
|
+
|
99
|
+
if attributes.key?(:'avatar')
|
100
|
+
self.avatar = attributes[:'avatar']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'banner')
|
104
|
+
self.banner = attributes[:'banner']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'handle')
|
108
|
+
self.handle = attributes[:'handle']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'link_count')
|
112
|
+
self.link_count = attributes[:'link_count']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'name')
|
116
|
+
self.name = attributes[:'name']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'summary')
|
120
|
+
self.summary = attributes[:'summary']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'user_count')
|
124
|
+
self.user_count = attributes[:'user_count']
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# Check to see if the all the properties in the model are valid
|
129
|
+
# @return true if the model is valid
|
130
|
+
# @!visibility private
|
131
|
+
def valid?
|
132
|
+
return false if !@handle.nil? && @handle.to_s.length > 195
|
133
|
+
return false if !@link_count.nil? && @link_count > 2147483647
|
134
|
+
return false if !@name.nil? && @name.to_s.length > 200
|
135
|
+
return false if !@summary.nil? && @summary.to_s.length > 120
|
136
|
+
return false if !@user_count.nil? && @user_count > 2147483647
|
137
|
+
true
|
138
|
+
end
|
139
|
+
|
140
|
+
# Custom attribute writer method with validation
|
141
|
+
# @param handle [Object] Object to be assigned
|
142
|
+
# @!visibility private
|
143
|
+
def handle=(handle)
|
144
|
+
if !handle.nil? && handle.to_s.length > 195
|
145
|
+
fail ArgumentError, 'invalid value for "handle", the character length must be smaller than or equal to 195.'
|
146
|
+
end
|
147
|
+
@handle = handle
|
148
|
+
end
|
149
|
+
|
150
|
+
# Custom attribute writer method with validation
|
151
|
+
# @param link_count [Object] Object to be assigned
|
152
|
+
# @!visibility private
|
153
|
+
def link_count=(link_count)
|
154
|
+
if !link_count.nil? && link_count > 2147483647
|
155
|
+
fail ArgumentError, 'invalid value for "link_count", must be smaller than or equal to 2147483647.'
|
156
|
+
end
|
157
|
+
@link_count = link_count
|
158
|
+
end
|
159
|
+
|
160
|
+
# Custom attribute writer method with validation
|
161
|
+
# @param name [Object] Object to be assigned
|
162
|
+
# @!visibility private
|
163
|
+
def name=(name)
|
164
|
+
if !name.nil? && name.to_s.length > 200
|
165
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
|
166
|
+
end
|
167
|
+
@name = name
|
168
|
+
end
|
169
|
+
|
170
|
+
# Custom attribute writer method with validation
|
171
|
+
# @param summary [Object] Object to be assigned
|
172
|
+
# @!visibility private
|
173
|
+
def summary=(summary)
|
174
|
+
if !summary.nil? && summary.to_s.length > 120
|
175
|
+
fail ArgumentError, 'invalid value for "summary", the character length must be smaller than or equal to 120.'
|
176
|
+
end
|
177
|
+
@summary = summary
|
178
|
+
end
|
179
|
+
|
180
|
+
# Custom attribute writer method with validation
|
181
|
+
# @param user_count [Object] Object to be assigned
|
182
|
+
# @!visibility private
|
183
|
+
def user_count=(user_count)
|
184
|
+
if !user_count.nil? && user_count > 2147483647
|
185
|
+
fail ArgumentError, 'invalid value for "user_count", must be smaller than or equal to 2147483647.'
|
186
|
+
end
|
187
|
+
@user_count = user_count
|
188
|
+
end
|
189
|
+
|
190
|
+
# Checks equality by comparing each attribute.
|
191
|
+
# @param o [Object] Object to be compared
|
192
|
+
# @!visibility private
|
193
|
+
def ==(o)
|
194
|
+
return true if self.equal?(o)
|
195
|
+
self.class == o.class &&
|
196
|
+
avatar == o.avatar &&
|
197
|
+
banner == o.banner &&
|
198
|
+
handle == o.handle &&
|
199
|
+
link_count == o.link_count &&
|
200
|
+
name == o.name &&
|
201
|
+
summary == o.summary &&
|
202
|
+
user_count == o.user_count
|
203
|
+
end
|
204
|
+
|
205
|
+
# Calculates hash code according to all attributes.
|
206
|
+
# @return [Integer] Hash code
|
207
|
+
# @!visibility private
|
208
|
+
def hash
|
209
|
+
[avatar, banner, handle, link_count, name, summary, user_count].hash
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
@@ -27,7 +27,7 @@ module DatadogAPIClient::V2
|
|
27
27
|
# ID of the AuthN Mapping.
|
28
28
|
attr_reader :id
|
29
29
|
|
30
|
-
# Relationship of AuthN Mapping update object to Role.
|
30
|
+
# Relationship of AuthN Mapping update object to a Role or Team.
|
31
31
|
attr_accessor :relationships
|
32
32
|
|
33
33
|
# AuthN Mappings resource type.
|
@@ -17,64 +17,47 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
# Relationship of AuthN Mapping update object to Role.
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
}
|
33
|
-
end
|
34
|
-
|
35
|
-
# Attribute type mapping.
|
36
|
-
# @!visibility private
|
37
|
-
def self.openapi_types
|
38
|
-
{
|
39
|
-
:'role' => :'RelationshipToRole'
|
40
|
-
}
|
41
|
-
end
|
42
|
-
|
43
|
-
# Initializes the object
|
44
|
-
# @param attributes [Hash] Model attributes in the form of hash
|
45
|
-
# @!visibility private
|
46
|
-
def initialize(attributes = {})
|
47
|
-
if (!attributes.is_a?(Hash))
|
48
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AuthNMappingUpdateRelationships` initialize method"
|
20
|
+
# Relationship of AuthN Mapping update object to a Role or Team.
|
21
|
+
module AuthNMappingUpdateRelationships
|
22
|
+
class << self
|
23
|
+
include BaseOneOfModel
|
24
|
+
include BaseOneOfModelNoDiscriminator
|
25
|
+
|
26
|
+
# List of class defined in oneOf (OpenAPI v3)
|
27
|
+
def openapi_one_of
|
28
|
+
[
|
29
|
+
:'AuthNMappingRelationshipToRole',
|
30
|
+
:'AuthNMappingRelationshipToTeam'
|
31
|
+
]
|
49
32
|
end
|
50
|
-
|
51
|
-
#
|
52
|
-
|
53
|
-
|
54
|
-
|
33
|
+
# Builds the object
|
34
|
+
# @param data [Mixed] Data to be matched against the list of oneOf items
|
35
|
+
# @return [Object] Returns the model or the data itself
|
36
|
+
def build(data)
|
37
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
38
|
+
# Note:
|
39
|
+
# - We do not attempt to check whether exactly one item matches.
|
40
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
41
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
42
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
43
|
+
# - TODO: logging when debugging is set.
|
44
|
+
openapi_one_of.each do |klass|
|
45
|
+
begin
|
46
|
+
next if klass == :AnyType # "nullable: true"
|
47
|
+
typed_data = find_and_cast_into_type(klass, data)
|
48
|
+
next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
|
49
|
+
return typed_data if typed_data
|
50
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
51
|
+
end
|
55
52
|
end
|
56
|
-
h[k.to_sym] = v
|
57
|
-
}
|
58
53
|
|
59
|
-
|
60
|
-
|
54
|
+
if openapi_one_of.include?(:AnyType)
|
55
|
+
data
|
56
|
+
else
|
57
|
+
self._unparsed = true
|
58
|
+
DatadogAPIClient::UnparsedObject.new(data)
|
59
|
+
end
|
61
60
|
end
|
62
61
|
end
|
63
|
-
|
64
|
-
# Checks equality by comparing each attribute.
|
65
|
-
# @param o [Object] Object to be compared
|
66
|
-
# @!visibility private
|
67
|
-
def ==(o)
|
68
|
-
return true if self.equal?(o)
|
69
|
-
self.class == o.class &&
|
70
|
-
role == o.role
|
71
|
-
end
|
72
|
-
|
73
|
-
# Calculates hash code according to all attributes.
|
74
|
-
# @return [Integer] Hash code
|
75
|
-
# @!visibility private
|
76
|
-
def hash
|
77
|
-
[role].hash
|
78
|
-
end
|
79
62
|
end
|
80
63
|
end
|
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
|
|
24
24
|
# Environment name to where the service was deployed.
|
25
25
|
attr_accessor :env
|
26
26
|
|
27
|
-
# Unix timestamp in nanoseconds when the deployment finished. It should not be older than
|
27
|
+
# Unix timestamp in nanoseconds when the deployment finished. It should not be older than 1 hour.
|
28
28
|
attr_reader :finished_at
|
29
29
|
|
30
30
|
# Git info for DORA Metrics events.
|
@@ -22,7 +22,7 @@ module DatadogAPIClient::V2
|
|
22
22
|
class MetricSeries
|
23
23
|
include BaseGenericModel
|
24
24
|
|
25
|
-
# If the type of the metric is rate or count, define the corresponding interval.
|
25
|
+
# If the type of the metric is rate or count, define the corresponding interval in seconds.
|
26
26
|
attr_accessor :interval
|
27
27
|
|
28
28
|
# Metadata for the metric.
|