launchdarkly_api 21.0.0 → 22.0.0

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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -6
  3. data/docs/AIConfig.md +3 -1
  4. data/docs/AIConfigDependency.md +20 -0
  5. data/docs/AIConfigPatch.md +2 -2
  6. data/docs/AIConfigPost.md +2 -2
  7. data/docs/AITool.md +3 -1
  8. data/docs/AIToolPatch.md +6 -4
  9. data/docs/AIToolPost.md +6 -4
  10. data/docs/AccountUsageBetaApi.md +164 -0
  11. data/docs/AgentGraph.md +4 -0
  12. data/docs/AgentGraphMaintainer.md +49 -0
  13. data/docs/AgentGraphPatch.md +4 -0
  14. data/docs/AgentGraphPost.md +4 -0
  15. data/docs/AiConfigsMetricListingRep.md +4 -0
  16. data/docs/AuditLogApi.md +80 -0
  17. data/docs/CallerIdentityRep.md +3 -1
  18. data/docs/CountBucket.md +20 -0
  19. data/docs/CountBucketsResult.md +22 -0
  20. data/docs/EventFilter.md +1 -1
  21. data/docs/ExpandedFlag.md +4 -2
  22. data/docs/ExpandedFlagMaintainer.md +24 -0
  23. data/docs/ExpandedLinkedResourcesItems.md +1 -5
  24. data/docs/ExperimentsApi.md +1 -1
  25. data/docs/MetricListingRep.md +2 -0
  26. data/docs/MetricRep.md +2 -0
  27. data/docs/ResourceSummary.md +0 -4
  28. data/docs/VariationTool.md +3 -1
  29. data/docs/ViewLinkRequest.md +3 -1
  30. data/docs/ViewLinkRequestFilter.md +22 -0
  31. data/docs/ViewLinkRequestKeys.md +4 -2
  32. data/docs/ViewLinkRequestSegmentIdentifiers.md +4 -0
  33. data/docs/ViewLinkedResource.md +1 -1
  34. data/docs/ViewsBetaApi.md +17 -11
  35. data/docs/ViewsMemberSummary.md +28 -0
  36. data/docs/ViewsMemberTeamSummaryRep.md +24 -0
  37. data/lib/launchdarkly_api/api/account_usage_beta_api.rb +144 -0
  38. data/lib/launchdarkly_api/api/audit_log_api.rb +81 -0
  39. data/lib/launchdarkly_api/api/experiments_api.rb +2 -2
  40. data/lib/launchdarkly_api/api/views_beta_api.rb +31 -18
  41. data/lib/launchdarkly_api/models/agent_graph.rb +19 -1
  42. data/lib/launchdarkly_api/models/agent_graph_maintainer.rb +104 -0
  43. data/lib/launchdarkly_api/models/agent_graph_patch.rb +21 -1
  44. data/lib/launchdarkly_api/models/agent_graph_post.rb +21 -1
  45. data/lib/launchdarkly_api/models/ai_config.rb +16 -4
  46. data/lib/launchdarkly_api/models/ai_config_dependency.rb +217 -0
  47. data/lib/launchdarkly_api/models/ai_configs_metric_listing_rep.rb +20 -1
  48. data/lib/launchdarkly_api/models/ai_tool.rb +12 -1
  49. data/lib/launchdarkly_api/models/ai_tool_patch.rb +15 -4
  50. data/lib/launchdarkly_api/models/ai_tool_post.rb +15 -4
  51. data/lib/launchdarkly_api/models/caller_identity_rep.rb +15 -4
  52. data/lib/launchdarkly_api/models/{expanded_linked_resources_metrics.rb → count_bucket.rb} +34 -36
  53. data/lib/launchdarkly_api/models/{expanded_linked_resources_ai_configs.rb → count_buckets_result.rb} +49 -23
  54. data/lib/launchdarkly_api/models/event_filter.rb +1 -1
  55. data/lib/launchdarkly_api/models/expanded_flag.rb +16 -7
  56. data/lib/launchdarkly_api/models/expanded_flag_maintainer.rb +234 -0
  57. data/lib/launchdarkly_api/models/expanded_linked_resources_items.rb +4 -22
  58. data/lib/launchdarkly_api/models/failed_resource_link.rb +2 -2
  59. data/lib/launchdarkly_api/models/metric_group_post.rb +2 -2
  60. data/lib/launchdarkly_api/models/metric_listing_rep.rb +10 -1
  61. data/lib/launchdarkly_api/models/metric_rep.rb +10 -1
  62. data/lib/launchdarkly_api/models/resource_summary.rb +1 -19
  63. data/lib/launchdarkly_api/models/variation_tool.rb +16 -4
  64. data/lib/launchdarkly_api/models/view_link_request.rb +1 -0
  65. data/lib/launchdarkly_api/models/view_link_request_filter.rb +187 -0
  66. data/lib/launchdarkly_api/models/view_link_request_keys.rb +12 -2
  67. data/lib/launchdarkly_api/models/view_link_request_segment_identifiers.rb +21 -1
  68. data/lib/launchdarkly_api/models/view_linked_resource.rb +3 -3
  69. data/lib/launchdarkly_api/models/views_member_summary.rb +268 -0
  70. data/lib/launchdarkly_api/models/views_member_team_summary_rep.rb +232 -0
  71. data/lib/launchdarkly_api/version.rb +1 -1
  72. data/lib/launchdarkly_api.rb +8 -2
  73. data/spec/api/account_usage_beta_api_spec.rb +32 -0
  74. data/spec/api/audit_log_api_spec.rb +15 -0
  75. data/spec/api/experiments_api_spec.rb +1 -1
  76. data/spec/api/views_beta_api_spec.rb +9 -6
  77. data/spec/models/agent_graph_maintainer_spec.rb +32 -0
  78. data/spec/models/agent_graph_patch_spec.rb +12 -0
  79. data/spec/models/agent_graph_post_spec.rb +12 -0
  80. data/spec/models/agent_graph_spec.rb +12 -0
  81. data/spec/models/ai_config_dependency_spec.rb +46 -0
  82. data/spec/models/ai_config_spec.rb +6 -0
  83. data/spec/models/ai_configs_metric_listing_rep_spec.rb +12 -0
  84. data/spec/models/ai_tool_patch_spec.rb +6 -0
  85. data/spec/models/ai_tool_post_spec.rb +6 -0
  86. data/spec/models/ai_tool_spec.rb +6 -0
  87. data/spec/models/caller_identity_rep_spec.rb +6 -0
  88. data/spec/models/{expanded_linked_resources_metrics_spec.rb → count_bucket_spec.rb} +8 -8
  89. data/spec/models/{expanded_linked_resources_ai_configs_spec.rb → count_buckets_result_spec.rb} +13 -7
  90. data/spec/models/expanded_flag_maintainer_spec.rb +58 -0
  91. data/spec/models/expanded_flag_spec.rb +7 -1
  92. data/spec/models/expanded_linked_resources_items_spec.rb +0 -12
  93. data/spec/models/failed_resource_link_spec.rb +1 -1
  94. data/spec/models/metric_group_post_spec.rb +1 -1
  95. data/spec/models/metric_listing_rep_spec.rb +6 -0
  96. data/spec/models/metric_rep_spec.rb +6 -0
  97. data/spec/models/resource_summary_spec.rb +0 -12
  98. data/spec/models/variation_tool_spec.rb +6 -0
  99. data/spec/models/view_link_request_filter_spec.rb +48 -0
  100. data/spec/models/view_link_request_keys_spec.rb +6 -0
  101. data/spec/models/view_link_request_segment_identifiers_spec.rb +12 -0
  102. data/spec/models/view_linked_resource_spec.rb +1 -1
  103. data/spec/models/views_member_summary_spec.rb +66 -0
  104. data/spec/models/views_member_team_summary_rep_spec.rb +54 -0
  105. metadata +626 -602
  106. data/docs/ExpandedLinkedResourcesAIConfigs.md +0 -20
  107. data/docs/ExpandedLinkedResourcesMetrics.md +0 -20
@@ -29,7 +29,7 @@ module LaunchDarklyApi
29
29
  attr_accessor :creation_date
30
30
 
31
31
  # Version of the flag
32
- attr_accessor :version
32
+ attr_accessor :_version
33
33
 
34
34
  # Whether the flag is archived
35
35
  attr_accessor :archived
@@ -43,6 +43,8 @@ module LaunchDarklyApi
43
43
  # Whether to include in snippet
44
44
  attr_accessor :include_in_snippet
45
45
 
46
+ attr_accessor :maintainer
47
+
46
48
  attr_accessor :_links
47
49
 
48
50
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -52,11 +54,12 @@ module LaunchDarklyApi
52
54
  :'name' => :'name',
53
55
  :'description' => :'description',
54
56
  :'creation_date' => :'creationDate',
55
- :'version' => :'version',
57
+ :'_version' => :'_version',
56
58
  :'archived' => :'archived',
57
59
  :'tags' => :'tags',
58
60
  :'temporary' => :'temporary',
59
61
  :'include_in_snippet' => :'includeInSnippet',
62
+ :'maintainer' => :'maintainer',
60
63
  :'_links' => :'_links'
61
64
  }
62
65
  end
@@ -78,11 +81,12 @@ module LaunchDarklyApi
78
81
  :'name' => :'String',
79
82
  :'description' => :'String',
80
83
  :'creation_date' => :'Integer',
81
- :'version' => :'Integer',
84
+ :'_version' => :'Integer',
82
85
  :'archived' => :'Boolean',
83
86
  :'tags' => :'Array<String>',
84
87
  :'temporary' => :'Boolean',
85
88
  :'include_in_snippet' => :'Boolean',
89
+ :'maintainer' => :'ExpandedFlagMaintainer',
86
90
  :'_links' => :'ParentAndSelfLinks'
87
91
  }
88
92
  end
@@ -129,8 +133,8 @@ module LaunchDarklyApi
129
133
  self.creation_date = attributes[:'creation_date']
130
134
  end
131
135
 
132
- if attributes.key?(:'version')
133
- self.version = attributes[:'version']
136
+ if attributes.key?(:'_version')
137
+ self._version = attributes[:'_version']
134
138
  end
135
139
 
136
140
  if attributes.key?(:'archived')
@@ -151,6 +155,10 @@ module LaunchDarklyApi
151
155
  self.include_in_snippet = attributes[:'include_in_snippet']
152
156
  end
153
157
 
158
+ if attributes.key?(:'maintainer')
159
+ self.maintainer = attributes[:'maintainer']
160
+ end
161
+
154
162
  if attributes.key?(:'_links')
155
163
  self._links = attributes[:'_links']
156
164
  end
@@ -210,11 +218,12 @@ module LaunchDarklyApi
210
218
  name == o.name &&
211
219
  description == o.description &&
212
220
  creation_date == o.creation_date &&
213
- version == o.version &&
221
+ _version == o._version &&
214
222
  archived == o.archived &&
215
223
  tags == o.tags &&
216
224
  temporary == o.temporary &&
217
225
  include_in_snippet == o.include_in_snippet &&
226
+ maintainer == o.maintainer &&
218
227
  _links == o._links
219
228
  end
220
229
 
@@ -227,7 +236,7 @@ module LaunchDarklyApi
227
236
  # Calculates hash code according to all attributes.
228
237
  # @return [Integer] Hash code
229
238
  def hash
230
- [key, name, description, creation_date, version, archived, tags, temporary, include_in_snippet, _links].hash
239
+ [key, name, description, creation_date, _version, archived, tags, temporary, include_in_snippet, maintainer, _links].hash
231
240
  end
232
241
 
233
242
  # Builds the object from hash
@@ -0,0 +1,234 @@
1
+ =begin
2
+ #LaunchDarkly REST API
3
+
4
+ #This documentation describes LaunchDarkly's REST API. To access the complete OpenAPI spec directly, use [Get OpenAPI spec](https://launchdarkly.com/docs/api/other/get-openapi-spec). To learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home). ## Authentication LaunchDarkly's REST API uses the HTTPS protocol with a minimum TLS version of 1.2. All REST API resources are authenticated with either [personal or service access tokens](https://launchdarkly.com/docs/home/account/api), or session cookies. Other authentication mechanisms are not supported. You can manage personal access tokens on your [**Authorization**](https://app.launchdarkly.com/settings/authorization) page in the LaunchDarkly UI. LaunchDarkly also has SDK keys, mobile keys, and client-side IDs that are used by our server-side SDKs, mobile SDKs, and JavaScript-based SDKs, respectively. **These keys cannot be used to access our REST API**. These keys are environment-specific, and can only perform read-only operations such as fetching feature flag settings. | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [Personal or service access tokens](https://launchdarkly.com/docs/home/account/api) | Can be customized on a per-token basis | Building scripts, custom integrations, data export. | | SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs | | Mobile keys | Can only access read-only resources specific to mobile SDKs, and only for flags marked available to mobile keys. Restricted to a single environment. | Mobile SDKs | | Client-side ID | Can only access read-only resources specific to JavaScript-based client-side SDKs, and only for flags marked available to client-side. Restricted to a single environment. | Client-side JavaScript | > #### Keep your access tokens and SDK keys private > > Access tokens should _never_ be exposed in untrusted contexts. Never put an access token in client-side JavaScript, or embed it in a mobile application. LaunchDarkly has special mobile keys that you can embed in mobile apps. If you accidentally expose an access token or SDK key, you can reset it from your [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. > > The client-side ID is safe to embed in untrusted contexts. It's designed for use in client-side JavaScript. ### Authentication using request header The preferred way to authenticate with the API is by adding an `Authorization` header containing your access token to your requests. The value of the `Authorization` header must be your access token. Manage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page. ### Authentication using session cookie For testing purposes, you can make API calls directly from your web browser. If you are logged in to the LaunchDarkly application, the API will use your existing session to authenticate calls. Depending on the permissions granted as part of your [role](https://launchdarkly.com/docs/home/account/roles), you may not have permission to perform some API calls. You will receive a `401` response code in that case. > ### Modifying the Origin header causes an error > > LaunchDarkly validates that the Origin header for any API request authenticated by a session cookie matches the expected Origin header. The expected Origin header is `https://app.launchdarkly.com`. > > If the Origin header does not match what's expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, the `Allow-Control-Allow-Origin: *` Chrome extension changes the Origin header to `http://evil.com` and causes the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All resources expect and return JSON response bodies. Error responses also send a JSON body. To learn more about the error format of the API, read [Errors](https://launchdarkly.com/docs/api#errors). In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. ### Summary and detailed representations When you fetch a list of resources, the response includes only the most important attributes of each resource. This is a _summary representation_ of the resource. When you fetch an individual resource, such as a single feature flag, you receive a _detailed representation_ of the resource. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Expanding responses Sometimes the detailed representation of a resource does not include all of the attributes of the resource by default. If this is the case, the request method will clearly document this and describe which attributes you can include in an expanded response. To include the additional attributes, append the `expand` request parameter to your request and add a comma-separated list of the attributes to include. For example, when you append `?expand=members,maintainers` to the [Get team](https://launchdarkly.com/docs/api/teams/get-team) endpoint, the expanded response includes both of these attributes. ### Links and addressability The best way to navigate the API is by following links. These are attributes in representations that link to other resources. The API always uses the same format for links: - Links to other resources within the API are encapsulated in a `_links` object - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link Each link has two attributes: - An `href`, which contains the URL - A `type`, which describes the content type For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From this, you can navigate to the parent collection of features by following the `parent` link, or navigate to the site page for the feature by following the `_site` link. Collections are always represented as a JSON object with an `items` attribute containing an array of representations. Like all other representations, collections have `_links` defined at the top level. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources that accept partial updates use the `PATCH` verb. Most resources support the [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) format. Some resources also support the [JSON merge patch](https://launchdarkly.com/docs/api#updates-using-json-merge-patch) format, and some resources support the [semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch) format, which is a way to specify the modifications to perform as a set of executable instructions. Each resource supports optional [comments](https://launchdarkly.com/docs/api#updates-with-comments) that you can submit with updates. Comments appear in outgoing webhooks, the audit log, and other integrations. When a resource supports both JSON patch and semantic patch, we document both in the request method. However, the specific request body fields and descriptions included in our documentation only match one type of patch or the other. ### Updates using JSON patch [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) is a way to specify the modifications to perform on a resource. JSON patch uses paths and a limited set of operations to describe how to transform the current state of the resource into a new state. JSON patch documents are always arrays, where each element contains an operation, a path to the field to update, and the new value. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag's description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag's `version` is `10`, and if so, changes the feature flag's description. Attributes that are not editable, such as a resource's `_links`, have names that start with an underscore. ### Updates using JSON merge patch [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) is another format for specifying the modifications to perform on a resource. JSON merge patch is less expressive than JSON patch. However, in many cases it is simpler to construct a merge patch document. For example, you can change a feature flag's description with the following merge patch document: ```json { \"description\": \"New flag description\" } ``` ### Updates using semantic patch Some resources support the semantic patch format. A semantic patch is a way to specify the modifications to perform on a resource as a set of executable instructions. Semantic patch allows you to be explicit about intent using precise, custom instructions. In many cases, you can define semantic patch instructions independently of the current state of the resource. This can be useful when defining a change that may be applied at a future date. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. Here's how: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` If you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch. The body of a semantic patch request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some resources only) The environment key. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the instruction requires parameters, you must include those parameters as additional fields in the object. The documentation for each resource that supports semantic patch includes the available instructions and any additional parameters. For example: ```json { \"comment\": \"optional comment\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` Semantic patches are not applied partially; either all of the instructions are applied or none of them are. If **any** instruction is invalid, the endpoint returns an error and will not change the resource. If all instructions are valid, the request succeeds and the resources are updated if necessary, or left unchanged if they are already in the state you request. ### Updates with comments You can submit optional comments with `PATCH` changes. To submit a comment along with a JSON patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON merge patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` To submit a comment along with a semantic patch, use the following format: ```json { \"comment\": \"This is a comment string\", \"instructions\": [ {\"kind\": \"turnFlagOn\"} ] } ``` ## Errors The API always returns errors in a common format. Here's an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The `code` indicates the general class of error. The `message` is a human-readable explanation of what went wrong. The `id` is a unique identifier. Use it when you're working with LaunchDarkly Support to debug a problem with a specific API call. ### HTTP status error response codes | Code | Definition | Description | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. | | 401 | Invalid access token | Requestor is unauthorized or does not have permission for this API call. | Ensure your API access token is valid and has the appropriate permissions. | | 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. | | 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. | | 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. | | 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. | | 422 | Unprocessable entity | The API request can not be completed because the update description can not be understood. | Ensure that the request body is correct for the type of patch you are using, either JSON patch or semantic patch. | 429 | Too many requests | Read [Rate limiting](https://launchdarkly.com/docs/api#rate-limiting). | Wait and try again later. | ## CORS The LaunchDarkly API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. If an `Origin` header is given in a request, it will be echoed as an explicitly allowed origin. Otherwise the request returns a wildcard, `Access-Control-Allow-Origin: *`. For more information on CORS, read the [CORS W3C Recommendation](http://www.w3.org/TR/cors). Example CORS headers might look like: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You can make authenticated CORS calls just as you would make same-origin calls, using either [token or session-based authentication](https://launchdarkly.com/docs/api#authentication). If you are using session authentication, you should set the `withCredentials` property for your `xhr` request to `true`. You should never expose your access tokens to untrusted entities. ## Rate limiting We use several rate limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code. Calls to our APIs include headers indicating the current rate limit status. The specific headers returned depend on the API route being called. The limits differ based on the route, authentication mechanism, and other factors. Routes that are not rate limited may not contain any of the headers described below. > ### Rate limiting and SDKs > > LaunchDarkly SDKs are never rate limited and do not use the API endpoints defined here. LaunchDarkly uses a different set of approaches, including streaming/server-sent events and a global CDN, to ensure availability to the routes used by LaunchDarkly SDKs. ### Global rate limits Authenticated requests are subject to a global limit. This is the maximum number of calls that your account can make to the API per ten seconds. All service and personal access tokens on the account share this limit, so exceeding the limit with one access token will impact other tokens. Calls that are subject to global rate limits may return the headers below: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Remaining` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | We do not publicly document the specific number of calls that can be made globally. This limit may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limit. ### Route-level rate limits Some authenticated routes have custom rate limits. These also reset every ten seconds. Any service or personal access tokens hitting the same route share this limit, so exceeding the limit with one access token may impact other tokens. Calls that are subject to route-level rate limits return the headers below: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Remaining` | The maximum number of requests to the current route the account is permitted to make per ten seconds. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _route_ represents a specific URL pattern and verb. For example, the [Delete environment](https://launchdarkly.com/docs/api/environments/delete-environment) endpoint is considered a single route, and each call to delete an environment counts against your route-level rate limit for that route. We do not publicly document the specific number of calls that an account can make to each endpoint per ten seconds. These limits may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limits. ### IP-based rate limiting We also employ IP-based rate limiting on some API routes. If you hit an IP-based rate limit, your API response will include a `Retry-After` header indicating how long to wait before re-trying the call. Clients must wait at least `Retry-After` seconds before making additional calls to our API, and should employ jitter and backoff strategies to avoid triggering rate limits again. ## OpenAPI (Swagger) and client libraries We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints' documentation for guidance on how to make requests with a common HTTP library in your language of choice. Our OpenAPI specification is supported by several API-based tools such as Postman and Insomnia. In many cases, you can directly import our specification to explore our APIs. ## Method overriding Some firewalls and HTTP clients restrict the use of verbs other than `GET` and `POST`. In those environments, our API endpoints that use `DELETE`, `PATCH`, and `PUT` verbs are inaccessible. To avoid this issue, our API supports the `X-HTTP-Method-Override` header, allowing clients to \"tunnel\" `DELETE`, `PATCH`, and `PUT` requests using a `POST` request. For example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We try to promote resources into general availability as quickly as possible. This happens after sufficient testing and when we're satisfied that we no longer need to make backwards-incompatible changes. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](https://launchdarkly.com/docs/api#beta-resources). > > Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. ### Using beta resources To use a beta resource, you must include a header in the request. If you call a beta resource without this header, you receive a `403` response. Use this header: ``` LD-API-Version: beta ``` ## Federal and EU environments In addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU). ### Federal environments The version of LaunchDarkly that is available on domains controlled by the United States government is different from the version of LaunchDarkly available to the general public. If you are an employee or contractor for a United States federal agency and use LaunchDarkly in your work, you likely use the federal instance of LaunchDarkly. If you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. To learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal). ### EU environments The version of LaunchDarkly that is available in the EU is different from the version of LaunchDarkly available to other regions. If you are based in the EU, you likely use the EU instance of LaunchDarkly. The LaunchDarkly EU instance complies with EU data residency principles, including the protection and confidentiality of EU customer information. If you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`. To learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu). ## Versioning We try hard to keep our REST API backwards compatible, but we occasionally have to make backwards-incompatible changes in the process of shipping new features. These breaking changes can cause unexpected behavior if you don't prepare for them accordingly. Updates to our REST API include support for the latest features in LaunchDarkly. We also release a new version of our REST API every time we make a breaking change. We provide simultaneous support for multiple API versions so you can migrate from your current API version to a new version at your own pace. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20240415 ``` The header value is the version number of the API version you would like to request. The number for each version corresponds to the date the version was released in `yyyymmdd` format. In the example above the version `20240415` corresponds to April 15, 2024. ### Setting the API version per access token When you create an access token, you must specify a specific version of the API to use. This ensures that integrations using this token cannot be broken by version changes. Tokens created before versioning was released have their version set to `20160426`, which is the version of the API that existed before the current versioning scheme, so that they continue working the same way they did before versioning. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog <table> <tr> <th>Version</th> <th>Changes</th> <th>End of life (EOL)</th> </tr> <tr> <td>`20240415`</td> <td> <ul><li>Changed several endpoints from unpaginated to paginated. Use the `limit` and `offset` query parameters to page through the results.</li> <li>Changed the [list access tokens](https://launchdarkly.com/docs/api/access-tokens/get-tokens) endpoint: <ul><li>Response is now paginated with a default limit of `25`</li></ul></li> <li>Changed the [list account members](https://launchdarkly.com/docs/api/account-members/get-members) endpoint: <ul><li>The `accessCheck` filter is no longer available</li></ul></li> <li>Changed the [list custom roles](https://launchdarkly.com/docs/api/custom-roles/get-custom-roles) endpoint: <ul><li>Response is now paginated with a default limit of `20`</li></ul></li> <li>Changed the [list feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) endpoint: <ul><li>Response is now paginated with a default limit of `20`</li><li>The `environments` field is now only returned if the request is filtered by environment, using the `filterEnv` query parameter</li><li>The `followerId`, `hasDataExport`, `status`, `contextKindTargeted`, and `segmentTargeted` filters are no longer available</li><li>The `compare` query parameter is no longer available</li></ul></li> <li>Changed the [list segments](https://launchdarkly.com/docs/api/segments/get-segments) endpoint: <ul><li>Response is now paginated with a default limit of `20`</li></ul></li> <li>Changed the [list teams](https://launchdarkly.com/docs/api/teams/get-teams) endpoint: <ul><li>The `expand` parameter no longer supports including `projects` or `roles`</li><li>In paginated results, the maximum page size is now 100</li></ul></li> <li>Changed the [get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) endpoint: <ul><li>Response is now paginated with a default limit of `20`</li><li>The `_conflicts` field in the response is no longer available</li></ul></li> </ul> </td> <td>Current</td> </tr> <tr> <td>`20220603`</td> <td> <ul><li>Changed the [list projects](https://launchdarkly.com/docs/api/projects/get-projects) return value:<ul><li>Response is now paginated with a default limit of `20`.</li><li>Added support for filter and sort.</li><li>The project `environments` field is now expandable. This field is omitted by default.</li></ul></li><li>Changed the [get project](https://launchdarkly.com/docs/api/projects/get-project) return value:<ul><li>The `environments` field is now expandable. This field is omitted by default.</li></ul></li></ul> </td> <td>2025-04-15</td> </tr> <tr> <td>`20210729`</td> <td> <ul><li>Changed the [create approval request](https://launchdarkly.com/docs/api/approvals/post-approval-request) return value. It now returns HTTP Status Code `201` instead of `200`.</li><li> Changed the [get user](https://launchdarkly.com/docs/api/users/get-user) return value. It now returns a user record, not a user. </li><li>Added additional optional fields to environment, segments, flags, members, and segments, including the ability to create big segments. </li><li> Added default values for flag variations when new environments are created. </li><li>Added filtering and pagination for getting flags and members, including `limit`, `number`, `filter`, and `sort` query parameters. </li><li>Added endpoints for expiring user targets for flags and segments, scheduled changes, access tokens, Relay Proxy configuration, integrations and subscriptions, and approvals. </li></ul> </td> <td>2023-06-03</td> </tr> <tr> <td>`20191212`</td> <td> <ul><li>[List feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) now defaults to sending summaries of feature flag configurations, equivalent to setting the query parameter `summary=true`. Summaries omit flag targeting rules and individual user targets from the payload. </li><li> Added endpoints for flags, flag status, projects, environments, audit logs, members, users, custom roles, segments, usage, streams, events, and data export. </li></ul> </td> <td>2022-07-29</td> </tr> <tr> <td>`20160426`</td> <td> <ul><li>Initial versioning of API. Tokens created before versioning have their version set to this.</li></ul> </td> <td>2020-12-12</td> </tr> </table> To learn more about how EOL is determined, read LaunchDarkly's [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/).
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@launchdarkly.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module LaunchDarklyApi
17
+ class ExpandedFlagMaintainer < ApiModelBase
18
+ # The ID of the maintainer member, or the key of the maintainer team
19
+ attr_accessor :key
20
+
21
+ # The type of the maintainer
22
+ attr_accessor :kind
23
+
24
+ attr_accessor :_member
25
+
26
+ attr_accessor :_team
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'key' => :'key',
54
+ :'kind' => :'kind',
55
+ :'_member' => :'_member',
56
+ :'_team' => :'_team'
57
+ }
58
+ end
59
+
60
+ # Returns attribute mapping this model knows about
61
+ def self.acceptable_attribute_map
62
+ attribute_map
63
+ end
64
+
65
+ # Returns all the JSON keys this model knows about
66
+ def self.acceptable_attributes
67
+ acceptable_attribute_map.values
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.openapi_types
72
+ {
73
+ :'key' => :'String',
74
+ :'kind' => :'String',
75
+ :'_member' => :'ViewsMemberSummary',
76
+ :'_team' => :'ViewsMemberTeamSummaryRep'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::ExpandedFlagMaintainer` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ acceptable_attribute_map = self.class.acceptable_attribute_map
95
+ attributes = attributes.each_with_object({}) { |(k, v), h|
96
+ if (!acceptable_attribute_map.key?(k.to_sym))
97
+ fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::ExpandedFlagMaintainer`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
98
+ end
99
+ h[k.to_sym] = v
100
+ }
101
+
102
+ if attributes.key?(:'key')
103
+ self.key = attributes[:'key']
104
+ else
105
+ self.key = nil
106
+ end
107
+
108
+ if attributes.key?(:'kind')
109
+ self.kind = attributes[:'kind']
110
+ else
111
+ self.kind = nil
112
+ end
113
+
114
+ if attributes.key?(:'_member')
115
+ self._member = attributes[:'_member']
116
+ end
117
+
118
+ if attributes.key?(:'_team')
119
+ self._team = attributes[:'_team']
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
+ invalid_properties = Array.new
128
+ if @key.nil?
129
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
130
+ end
131
+
132
+ if @kind.nil?
133
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
134
+ end
135
+
136
+ invalid_properties
137
+ end
138
+
139
+ # Check to see if the all the properties in the model are valid
140
+ # @return true if the model is valid
141
+ def valid?
142
+ warn '[DEPRECATED] the `valid?` method is obsolete'
143
+ return false if @key.nil?
144
+ return false if @kind.nil?
145
+ kind_validator = EnumAttributeValidator.new('String', ["member", "team"])
146
+ return false unless kind_validator.valid?(@kind)
147
+ true
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] key Value to be assigned
152
+ def key=(key)
153
+ if key.nil?
154
+ fail ArgumentError, 'key cannot be nil'
155
+ end
156
+
157
+ @key = key
158
+ end
159
+
160
+ # Custom attribute writer method checking allowed values (enum).
161
+ # @param [Object] kind Object to be assigned
162
+ def kind=(kind)
163
+ validator = EnumAttributeValidator.new('String', ["member", "team"])
164
+ unless validator.valid?(kind)
165
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
166
+ end
167
+ @kind = kind
168
+ end
169
+
170
+ # Checks equality by comparing each attribute.
171
+ # @param [Object] Object to be compared
172
+ def ==(o)
173
+ return true if self.equal?(o)
174
+ self.class == o.class &&
175
+ key == o.key &&
176
+ kind == o.kind &&
177
+ _member == o._member &&
178
+ _team == o._team
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Integer] Hash code
189
+ def hash
190
+ [key, kind, _member, _team].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def self.build_from_hash(attributes)
197
+ return nil unless attributes.is_a?(Hash)
198
+ attributes = attributes.transform_keys(&:to_sym)
199
+ transformed_hash = {}
200
+ openapi_types.each_pair do |key, type|
201
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
202
+ transformed_hash["#{key}"] = nil
203
+ elsif type =~ /\AArray<(.*)>/i
204
+ # check to ensure the input is an array given that the attribute
205
+ # is documented as an array but the input is not
206
+ if attributes[attribute_map[key]].is_a?(Array)
207
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
208
+ end
209
+ elsif !attributes[attribute_map[key]].nil?
210
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
211
+ end
212
+ end
213
+ new(transformed_hash)
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -19,17 +19,11 @@ module LaunchDarklyApi
19
19
 
20
20
  attr_accessor :segments
21
21
 
22
- attr_accessor :ai_configs
23
-
24
- attr_accessor :metrics
25
-
26
22
  # Attribute mapping from ruby-style variable name to JSON key.
27
23
  def self.attribute_map
28
24
  {
29
25
  :'flags' => :'flags',
30
- :'segments' => :'segments',
31
- :'ai_configs' => :'aiConfigs',
32
- :'metrics' => :'metrics'
26
+ :'segments' => :'segments'
33
27
  }
34
28
  end
35
29
 
@@ -47,9 +41,7 @@ module LaunchDarklyApi
47
41
  def self.openapi_types
48
42
  {
49
43
  :'flags' => :'ExpandedLinkedResourcesFlags',
50
- :'segments' => :'ExpandedLinkedResourcesSegments',
51
- :'ai_configs' => :'ExpandedLinkedResourcesAIConfigs',
52
- :'metrics' => :'ExpandedLinkedResourcesMetrics'
44
+ :'segments' => :'ExpandedLinkedResourcesSegments'
53
45
  }
54
46
  end
55
47
 
@@ -84,14 +76,6 @@ module LaunchDarklyApi
84
76
  if attributes.key?(:'segments')
85
77
  self.segments = attributes[:'segments']
86
78
  end
87
-
88
- if attributes.key?(:'ai_configs')
89
- self.ai_configs = attributes[:'ai_configs']
90
- end
91
-
92
- if attributes.key?(:'metrics')
93
- self.metrics = attributes[:'metrics']
94
- end
95
79
  end
96
80
 
97
81
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -130,9 +114,7 @@ module LaunchDarklyApi
130
114
  return true if self.equal?(o)
131
115
  self.class == o.class &&
132
116
  flags == o.flags &&
133
- segments == o.segments &&
134
- ai_configs == o.ai_configs &&
135
- metrics == o.metrics
117
+ segments == o.segments
136
118
  end
137
119
 
138
120
  # @see the `==` method
@@ -144,7 +126,7 @@ module LaunchDarklyApi
144
126
  # Calculates hash code according to all attributes.
145
127
  # @return [Integer] Hash code
146
128
  def hash
147
- [flags, segments, ai_configs, metrics].hash
129
+ [flags, segments].hash
148
130
  end
149
131
 
150
132
  # Builds the object from hash
@@ -150,7 +150,7 @@ module LaunchDarklyApi
150
150
  warn '[DEPRECATED] the `valid?` method is obsolete'
151
151
  return false if @resource_key.nil?
152
152
  return false if @resource_type.nil?
153
- resource_type_validator = EnumAttributeValidator.new('String', ["flag", "segment", "metric", "aiConfig"])
153
+ resource_type_validator = EnumAttributeValidator.new('String', ["flag", "segment"])
154
154
  return false unless resource_type_validator.valid?(@resource_type)
155
155
  return false if @error_message.nil?
156
156
  true
@@ -169,7 +169,7 @@ module LaunchDarklyApi
169
169
  # Custom attribute writer method checking allowed values (enum).
170
170
  # @param [Object] resource_type Object to be assigned
171
171
  def resource_type=(resource_type)
172
- validator = EnumAttributeValidator.new('String', ["flag", "segment", "metric", "aiConfig"])
172
+ validator = EnumAttributeValidator.new('String', ["flag", "segment"])
173
173
  unless validator.valid?(resource_type)
174
174
  fail ArgumentError, "invalid value for \"resource_type\", must be one of #{validator.allowable_values}."
175
175
  end
@@ -193,7 +193,7 @@ module LaunchDarklyApi
193
193
  warn '[DEPRECATED] the `valid?` method is obsolete'
194
194
  return false if @name.nil?
195
195
  return false if @kind.nil?
196
- kind_validator = EnumAttributeValidator.new('String', ["funnel", "standard", "guardrail"])
196
+ kind_validator = EnumAttributeValidator.new('String', ["funnel", "standard"])
197
197
  return false unless kind_validator.valid?(@kind)
198
198
  return false if @maintainer_id.nil?
199
199
  return false if @tags.nil?
@@ -214,7 +214,7 @@ module LaunchDarklyApi
214
214
  # Custom attribute writer method checking allowed values (enum).
215
215
  # @param [Object] kind Object to be assigned
216
216
  def kind=(kind)
217
- validator = EnumAttributeValidator.new('String', ["funnel", "standard", "guardrail"])
217
+ validator = EnumAttributeValidator.new('String', ["funnel", "standard"])
218
218
  unless validator.valid?(kind)
219
219
  fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
220
220
  end
@@ -103,6 +103,8 @@ module LaunchDarklyApi
103
103
 
104
104
  attr_accessor :data_source
105
105
 
106
+ attr_accessor :last_seen
107
+
106
108
  # Whether the metric version is archived
107
109
  attr_accessor :archived
108
110
 
@@ -170,6 +172,7 @@ module LaunchDarklyApi
170
172
  :'percentile_value' => :'percentileValue',
171
173
  :'event_default' => :'eventDefault',
172
174
  :'data_source' => :'dataSource',
175
+ :'last_seen' => :'lastSeen',
173
176
  :'archived' => :'archived',
174
177
  :'archived_at' => :'archivedAt',
175
178
  :'selector' => :'selector',
@@ -222,6 +225,7 @@ module LaunchDarklyApi
222
225
  :'percentile_value' => :'Integer',
223
226
  :'event_default' => :'MetricEventDefaultRep',
224
227
  :'data_source' => :'MetricDataSourceRefRep',
228
+ :'last_seen' => :'Integer',
225
229
  :'archived' => :'Boolean',
226
230
  :'archived_at' => :'Integer',
227
231
  :'selector' => :'String',
@@ -403,6 +407,10 @@ module LaunchDarklyApi
403
407
  self.data_source = nil
404
408
  end
405
409
 
410
+ if attributes.key?(:'last_seen')
411
+ self.last_seen = attributes[:'last_seen']
412
+ end
413
+
406
414
  if attributes.key?(:'archived')
407
415
  self.archived = attributes[:'archived']
408
416
  end
@@ -647,6 +655,7 @@ module LaunchDarklyApi
647
655
  percentile_value == o.percentile_value &&
648
656
  event_default == o.event_default &&
649
657
  data_source == o.data_source &&
658
+ last_seen == o.last_seen &&
650
659
  archived == o.archived &&
651
660
  archived_at == o.archived_at &&
652
661
  selector == o.selector &&
@@ -662,7 +671,7 @@ module LaunchDarklyApi
662
671
  # Calculates hash code according to all attributes.
663
672
  # @return [Integer] Hash code
664
673
  def hash
665
- [experiment_count, metric_group_count, active_experiment_count, active_guarded_rollout_count, _id, _version_id, _version, key, name, kind, _attached_flag_count, _links, _site, _access, tags, _creation_date, last_modified, maintainer_id, _maintainer, description, category, is_numeric, success_criteria, unit, event_key, randomization_units, filters, unit_aggregation_type, analysis_type, percentile_value, event_default, data_source, archived, archived_at, selector, urls].hash
674
+ [experiment_count, metric_group_count, active_experiment_count, active_guarded_rollout_count, _id, _version_id, _version, key, name, kind, _attached_flag_count, _links, _site, _access, tags, _creation_date, last_modified, maintainer_id, _maintainer, description, category, is_numeric, success_criteria, unit, event_key, randomization_units, filters, unit_aggregation_type, analysis_type, percentile_value, event_default, data_source, last_seen, archived, archived_at, selector, urls].hash
666
675
  end
667
676
 
668
677
  # Builds the object from hash
@@ -103,6 +103,8 @@ module LaunchDarklyApi
103
103
 
104
104
  attr_accessor :data_source
105
105
 
106
+ attr_accessor :last_seen
107
+
106
108
  # Whether the metric version is archived
107
109
  attr_accessor :archived
108
110
 
@@ -185,6 +187,7 @@ module LaunchDarklyApi
185
187
  :'percentile_value' => :'percentileValue',
186
188
  :'event_default' => :'eventDefault',
187
189
  :'data_source' => :'dataSource',
190
+ :'last_seen' => :'lastSeen',
188
191
  :'archived' => :'archived',
189
192
  :'archived_at' => :'archivedAt',
190
193
  :'selector' => :'selector',
@@ -243,6 +246,7 @@ module LaunchDarklyApi
243
246
  :'percentile_value' => :'Integer',
244
247
  :'event_default' => :'MetricEventDefaultRep',
245
248
  :'data_source' => :'MetricDataSourceRefRep',
249
+ :'last_seen' => :'Integer',
246
250
  :'archived' => :'Boolean',
247
251
  :'archived_at' => :'Integer',
248
252
  :'selector' => :'String',
@@ -430,6 +434,10 @@ module LaunchDarklyApi
430
434
  self.data_source = nil
431
435
  end
432
436
 
437
+ if attributes.key?(:'last_seen')
438
+ self.last_seen = attributes[:'last_seen']
439
+ end
440
+
433
441
  if attributes.key?(:'archived')
434
442
  self.archived = attributes[:'archived']
435
443
  end
@@ -704,6 +712,7 @@ module LaunchDarklyApi
704
712
  percentile_value == o.percentile_value &&
705
713
  event_default == o.event_default &&
706
714
  data_source == o.data_source &&
715
+ last_seen == o.last_seen &&
707
716
  archived == o.archived &&
708
717
  archived_at == o.archived_at &&
709
718
  selector == o.selector &&
@@ -725,7 +734,7 @@ module LaunchDarklyApi
725
734
  # Calculates hash code according to all attributes.
726
735
  # @return [Integer] Hash code
727
736
  def hash
728
- [experiment_count, metric_group_count, active_experiment_count, active_guarded_rollout_count, _id, _version_id, _version, key, name, kind, _attached_flag_count, _links, _site, _access, tags, _creation_date, last_modified, maintainer_id, _maintainer, description, category, is_numeric, success_criteria, unit, event_key, randomization_units, filters, unit_aggregation_type, analysis_type, percentile_value, event_default, data_source, archived, archived_at, selector, urls, experiments, metric_groups, last_used_in_experiment, last_used_in_guarded_rollout, is_active, _attached_features].hash
737
+ [experiment_count, metric_group_count, active_experiment_count, active_guarded_rollout_count, _id, _version_id, _version, key, name, kind, _attached_flag_count, _links, _site, _access, tags, _creation_date, last_modified, maintainer_id, _maintainer, description, category, is_numeric, success_criteria, unit, event_key, randomization_units, filters, unit_aggregation_type, analysis_type, percentile_value, event_default, data_source, last_seen, archived, archived_at, selector, urls, experiments, metric_groups, last_used_in_experiment, last_used_in_guarded_rollout, is_active, _attached_features].hash
729
738
  end
730
739
 
731
740
  # Builds the object from hash
@@ -19,10 +19,6 @@ module LaunchDarklyApi
19
19
 
20
20
  attr_accessor :segment_count
21
21
 
22
- attr_accessor :metric_count
23
-
24
- attr_accessor :ai_config_count
25
-
26
22
  attr_accessor :total_count
27
23
 
28
24
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -30,8 +26,6 @@ module LaunchDarklyApi
30
26
  {
31
27
  :'flag_count' => :'flagCount',
32
28
  :'segment_count' => :'segmentCount',
33
- :'metric_count' => :'metricCount',
34
- :'ai_config_count' => :'aiConfigCount',
35
29
  :'total_count' => :'totalCount'
36
30
  }
37
31
  end
@@ -51,8 +45,6 @@ module LaunchDarklyApi
51
45
  {
52
46
  :'flag_count' => :'Integer',
53
47
  :'segment_count' => :'Integer',
54
- :'metric_count' => :'Integer',
55
- :'ai_config_count' => :'Integer',
56
48
  :'total_count' => :'Integer'
57
49
  }
58
50
  end
@@ -89,14 +81,6 @@ module LaunchDarklyApi
89
81
  self.segment_count = attributes[:'segment_count']
90
82
  end
91
83
 
92
- if attributes.key?(:'metric_count')
93
- self.metric_count = attributes[:'metric_count']
94
- end
95
-
96
- if attributes.key?(:'ai_config_count')
97
- self.ai_config_count = attributes[:'ai_config_count']
98
- end
99
-
100
84
  if attributes.key?(:'total_count')
101
85
  self.total_count = attributes[:'total_count']
102
86
  else
@@ -156,8 +140,6 @@ module LaunchDarklyApi
156
140
  self.class == o.class &&
157
141
  flag_count == o.flag_count &&
158
142
  segment_count == o.segment_count &&
159
- metric_count == o.metric_count &&
160
- ai_config_count == o.ai_config_count &&
161
143
  total_count == o.total_count
162
144
  end
163
145
 
@@ -170,7 +152,7 @@ module LaunchDarklyApi
170
152
  # Calculates hash code according to all attributes.
171
153
  # @return [Integer] Hash code
172
154
  def hash
173
- [flag_count, segment_count, metric_count, ai_config_count, total_count].hash
155
+ [flag_count, segment_count, total_count].hash
174
156
  end
175
157
 
176
158
  # Builds the object from hash