From 3dcee1317cb1356fc45cc13a89c99632c8cd1c37 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 25 Feb 2025 17:20:18 +0000 Subject: [PATCH] Regenerate client from commit 7b09d7dd of spec repo --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 131 ++++++++++++++- features/v1/dashboards.feature | 36 ++--- lib/datadog_api_client/inflector.rb | 4 + .../v1/models/dashboard_share_type.rb | 1 + .../v1/models/shared_dashboard.rb | 94 +++++++++-- .../models/shared_dashboard_invitees_items.rb | 151 ++++++++++++++++++ .../v1/models/shared_dashboard_status.rb | 27 ++++ .../models/shared_dashboard_update_request.rb | 71 +++++++- .../v1/models/viewing_preferences.rb | 115 +++++++++++++ .../v1/models/viewing_preferences_theme.rb | 28 ++++ 11 files changed, 629 insertions(+), 37 deletions(-) create mode 100644 lib/datadog_api_client/v1/models/shared_dashboard_invitees_items.rb create mode 100644 lib/datadog_api_client/v1/models/shared_dashboard_status.rb create mode 100644 lib/datadog_api_client/v1/models/viewing_preferences.rb create mode 100644 lib/datadog_api_client/v1/models/viewing_preferences_theme.rb diff --git a/.apigentools-info b/.apigentools-info index 518126739260..12cc9f9b3f31 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-24 14:19:11.276522", - "spec_repo_commit": "b34a35ef" + "regenerated": "2025-02-25 17:19:46.264080", + "spec_repo_commit": "7b09d7dd" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-24 14:19:11.291802", - "spec_repo_commit": "b34a35ef" + "regenerated": "2025-02-25 17:19:46.279910", + "spec_repo_commit": "7b09d7dd" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 595a7442a15d..e8484e042b14 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -1451,11 +1451,13 @@ components: enum: - open - invite + - embed nullable: true type: string x-enum-varnames: - OPEN - INVITE + - EMBED DashboardSummary: description: Dashboard summary response. properties: @@ -13047,7 +13049,7 @@ components: properties: author: $ref: '#/components/schemas/SharedDashboardAuthor' - created_at: + created: description: Date the dashboard was shared. format: date-time readOnly: true @@ -13058,6 +13060,20 @@ components: type: string dashboard_type: $ref: '#/components/schemas/DashboardType' + embeddable_domains: + description: The `SharedDashboard` `embeddable_domains`. + example: + - https://domain.atlassian.net/ + - http://myserver.com/ + items: + description: The allowlisted referrers for an EMBED shared dashboard. + type: string + type: array + expiration: + description: The time when an OPEN shared dashboard becomes publicly unavailable. + format: date-time + nullable: true + type: string global_time: $ref: '#/components/schemas/DashboardGlobalTime' global_time_selectable_enabled: @@ -13065,6 +13081,23 @@ components: setting for the shared dashboard. nullable: true type: boolean + invitees: + description: The `SharedDashboard` `invitees`. + example: + - access_expiration: '2030-01-01T12:00:00.00Z' + email: test@datadoghq.com + - access_expiration: null + email: test2@datadoghq.com + items: + $ref: '#/components/schemas/SharedDashboardInviteesItems' + type: array + last_accessed: + description: The last time the shared dashboard was accessed. Null if never + accessed. + format: date-time + nullable: true + readOnly: true + type: string public_url: description: URL of the shared dashboard. readOnly: true @@ -13084,6 +13117,7 @@ components: nullable: true type: array share_list: + deprecated: true description: List of email addresses that can receive an invitation to access to the shared dashboard. example: @@ -13097,10 +13131,17 @@ components: type: array share_type: $ref: '#/components/schemas/DashboardShareType' + status: + $ref: '#/components/schemas/SharedDashboardStatus' + title: + description: Title of the shared dashboard. + type: string token: description: A unique token assigned to the shared dashboard. readOnly: true type: string + viewing_preferences: + $ref: '#/components/schemas/ViewingPreferences' required: - dashboard_id - dashboard_type @@ -13120,6 +13161,27 @@ components: type: string readOnly: true type: object + SharedDashboardInviteesItems: + description: The allowlisted invitees for an INVITE-only shared dashboard. + properties: + access_expiration: + description: Time of the invitee expiration. Null means the invite will + not expire. + format: date-time + nullable: true + type: string + created_at: + description: Time that the invitee was created. + format: date-time + readOnly: true + type: string + email: + description: Email of the invitee. + example: test@datadoghq.com + type: string + required: + - email + type: object SharedDashboardInvites: description: Invitations data and metadata that exists for a shared dashboard returned by the API. @@ -13236,6 +13298,17 @@ components: format: int64 type: integer type: object + SharedDashboardStatus: + description: Active means the dashboard is publicly available. Paused means + the dashboard is not publicly available. + enum: + - active + - paused + example: active + type: string + x-enum-varnames: + - ACTIVE + - PAUSED SharedDashboardUpdateRequest: description: Update a shared dashboard's settings. example: @@ -13246,6 +13319,20 @@ components: - test2@datadoghq.com share_type: invite properties: + embeddable_domains: + description: The `SharedDashboard` `embeddable_domains`. + example: + - https://domain.atlassian.net/ + - http://myserver.com/ + items: + description: The allowlisted referrers for an EMBED shared dashboard. + type: string + type: array + expiration: + description: The time when an OPEN shared dashboard becomes publicly unavailable. + format: date-time + nullable: true + type: string global_time: $ref: '#/components/schemas/SharedDashboardUpdateRequestGlobalTime' global_time_selectable_enabled: @@ -13253,6 +13340,16 @@ components: setting for the shared dashboard. nullable: true type: boolean + invitees: + description: The `SharedDashboard` `invitees`. + example: + - access_expiration: '2030-01-01T12:00:00.00Z' + email: test@datadoghq.com + - access_expiration: null + email: test2@datadoghq.com + items: + $ref: '#/components/schemas/SharedDashboardInviteesItems' + type: array selectable_template_vars: description: List of objects representing template variables on the shared dashboard which can have selectable values. @@ -13268,6 +13365,7 @@ components: nullable: true type: array share_list: + deprecated: true description: List of email addresses that can be given access to the shared dashboard. example: @@ -13281,8 +13379,13 @@ components: type: array share_type: $ref: '#/components/schemas/DashboardShareType' - required: - - global_time + status: + $ref: '#/components/schemas/SharedDashboardStatus' + title: + description: Title of the shared dashboard. + type: string + viewing_preferences: + $ref: '#/components/schemas/ViewingPreferences' type: object SharedDashboardUpdateRequestGlobalTime: description: Timeframe setting for the shared dashboard. @@ -22710,6 +22813,28 @@ components: example: 0 format: int64 type: integer + ViewingPreferences: + description: The viewing preferences for a shared dashboard. + properties: + high_density: + description: Whether the widgets on the shared dashboard should be displayed + with high density. + type: boolean + theme: + $ref: '#/components/schemas/ViewingPreferencesTheme' + type: object + ViewingPreferencesTheme: + description: The theme of the shared dashboard view. "system" follows your system's + default viewing theme. + enum: + - system + - light + - dark + type: string + x-enum-varnames: + - SYSTEM + - LIGHT + - DARK WebhooksIntegration: description: Datadog-Webhooks integration. properties: diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index fbc89cc98cea..45b0ea0d3aba 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -936,21 +936,21 @@ Feature: Dashboards And the response "widgets[0].definition.time.unit" is equal to "minute" And the response "widgets[0].definition.time.value" is equal to 8 - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Create a shared dashboard returns "Bad Request" response Given new "CreatePublicDashboard" request - And body with value {"dashboard_id": "123-abc-456", "dashboard_type": "custom_timeboard", "global_time": {"live_span": "1h"}, "global_time_selectable_enabled": null, "selectable_template_vars": [{"default_value": "*", "name": "exampleVar", "prefix": "test", "visible_tags": ["selectableValue1", "selectableValue2"]}], "share_list": ["test@datadoghq.com", "test2@email.com"], "share_type": "open"} + And body with value {"dashboard_id": "123-abc-456", "dashboard_type": "custom_timeboard", "embeddable_domains": ["https://domain.atlassian.net/", "http://myserver.com/"], "expiration": null, "global_time": {"live_span": "1h"}, "global_time_selectable_enabled": null, "invitees": [{"access_expiration": "2030-01-01T12:00:00.00Z", "email": "test@datadoghq.com"}, {"access_expiration": null, "email": "test2@datadoghq.com"}], "selectable_template_vars": [{"default_value": "*", "name": "exampleVar", "prefix": "test", "visible_tags": ["selectableValue1", "selectableValue2"]}], "share_list": ["test@datadoghq.com", "test2@email.com"], "share_type": "open", "status": "active", "viewing_preferences": {"theme": "system"}} When the request is sent Then the response status is 400 Bad Request - @team:DataDog/dashboards-backend + @team:DataDog/reporting-and-sharing Scenario: Create a shared dashboard returns "Dashboard Not Found" response Given new "CreatePublicDashboard" request And body with value {"dashboard_id": "abc-123-def", "dashboard_type": "custom_timeboard", "share_type": "open", "global_time": {"live_span": "1h"}} When the request is sent Then the response status is 404 Dashboard Not Found - @team:DataDog/dashboards-backend + @team:DataDog/reporting-and-sharing Scenario: Create a shared dashboard returns "OK" response Given there is a valid "dashboard" in the system And new "CreatePublicDashboard" request @@ -1023,7 +1023,7 @@ Feature: Dashboards Then the response status is 200 OK And the response "author_name" is equal to "Frog Account" - @team:DataDog/dashboards-backend + @team:DataDog/reporting-and-sharing Scenario: Get a shared dashboard returns "OK" response Given there is a valid "dashboard" in the system And there is a valid "shared_dashboard" in the system @@ -1034,7 +1034,7 @@ Feature: Dashboards And the response "dashboard_id" has the same value as "dashboard.id" And the response "token" has the same value as "shared_dashboard.token" - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Get a shared dashboard returns "Shared Dashboard Not Found" response Given new "GetPublicDashboard" request And request contains "token" parameter from "REPLACE.ME" @@ -1059,14 +1059,14 @@ Feature: Dashboards Then the response status is 200 OK And the response has 3 items - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Get all invitations for a shared dashboard returns "Not Found" response Given new "GetPublicDashboardInvitations" request And request contains "token" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found - @team:DataDog/dashboards-backend + @team:DataDog/reporting-and-sharing Scenario: Get all invitations for a shared dashboard returns "OK" response Given there is a valid "dashboard" in the system And there is a valid "shared_dashboard" in the system @@ -1110,21 +1110,21 @@ Feature: Dashboards When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Revoke a shared dashboard URL returns "OK" response Given new "DeletePublicDashboard" request And request contains "token" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Revoke a shared dashboard URL returns "Shared Dashboard Not Found" response Given new "DeletePublicDashboard" request And request contains "token" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Shared Dashboard Not Found - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Revoke shared dashboard invitations returns "Not Found" response Given new "DeletePublicDashboardInvitation" request And request contains "token" parameter from "REPLACE.ME" @@ -1132,7 +1132,7 @@ Feature: Dashboards When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Revoke shared dashboard invitations returns "OK" response Given new "DeletePublicDashboardInvitation" request And request contains "token" parameter from "REPLACE.ME" @@ -1140,7 +1140,7 @@ Feature: Dashboards When the request is sent Then the response status is 204 OK - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Send shared dashboard invitation email returns "Bad Request" response Given new "SendPublicDashboardInvitation" request And request contains "token" parameter from "REPLACE.ME" @@ -1148,7 +1148,7 @@ Feature: Dashboards When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Send shared dashboard invitation email returns "Not Found" response Given new "SendPublicDashboardInvitation" request And request contains "token" parameter from "REPLACE.ME" @@ -1156,7 +1156,7 @@ Feature: Dashboards When the request is sent Then the response status is 404 Not Found - @team:DataDog/dashboards-backend + @team:DataDog/reporting-and-sharing Scenario: Send shared dashboard invitation email returns "OK" response Given there is a valid "dashboard" in the system And there is a valid "shared_dashboard" in the system @@ -1204,7 +1204,7 @@ Feature: Dashboards Then the response status is 200 OK And the response "tags" is equal to ["team:foo", "team:bar"] - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Update a shared dashboard returns "Bad Request" response Given new "UpdatePublicDashboard" request And request contains "token" parameter from "REPLACE.ME" @@ -1212,7 +1212,7 @@ Feature: Dashboards When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/dashboards-backend + @generated @skip @team:DataDog/reporting-and-sharing Scenario: Update a shared dashboard returns "Item Not Found" response Given new "UpdatePublicDashboard" request And request contains "token" parameter from "REPLACE.ME" @@ -1220,7 +1220,7 @@ Feature: Dashboards When the request is sent Then the response status is 404 Item Not Found - @team:DataDog/dashboards-backend + @team:DataDog/reporting-and-sharing Scenario: Update a shared dashboard returns "OK" response Given there is a valid "dashboard" in the system And there is a valid "shared_dashboard" in the system diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index c3b141763c21..7aec50275ce8 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -458,12 +458,14 @@ def overrides "v1.service_summary_widget_definition_type" => "ServiceSummaryWidgetDefinitionType", "v1.shared_dashboard" => "SharedDashboard", "v1.shared_dashboard_author" => "SharedDashboardAuthor", + "v1.shared_dashboard_invitees_items" => "SharedDashboardInviteesItems", "v1.shared_dashboard_invites" => "SharedDashboardInvites", "v1.shared_dashboard_invites_data" => "SharedDashboardInvitesData", "v1.shared_dashboard_invites_data_object" => "SharedDashboardInvitesDataObject", "v1.shared_dashboard_invites_data_object_attributes" => "SharedDashboardInvitesDataObjectAttributes", "v1.shared_dashboard_invites_meta" => "SharedDashboardInvitesMeta", "v1.shared_dashboard_invites_meta_page" => "SharedDashboardInvitesMetaPage", + "v1.shared_dashboard_status" => "SharedDashboardStatus", "v1.shared_dashboard_update_request" => "SharedDashboardUpdateRequest", "v1.shared_dashboard_update_request_global_time" => "SharedDashboardUpdateRequestGlobalTime", "v1.signal_archive_reason" => "SignalArchiveReason", @@ -855,6 +857,8 @@ def overrides "v1.user_disable_response" => "UserDisableResponse", "v1.user_list_response" => "UserListResponse", "v1.user_response" => "UserResponse", + "v1.viewing_preferences" => "ViewingPreferences", + "v1.viewing_preferences_theme" => "ViewingPreferencesTheme", "v1.webhooks_integration" => "WebhooksIntegration", "v1.webhooks_integration_custom_variable" => "WebhooksIntegrationCustomVariable", "v1.webhooks_integration_custom_variable_response" => "WebhooksIntegrationCustomVariableResponse", diff --git a/lib/datadog_api_client/v1/models/dashboard_share_type.rb b/lib/datadog_api_client/v1/models/dashboard_share_type.rb index 678d313676a0..88202555002a 100644 --- a/lib/datadog_api_client/v1/models/dashboard_share_type.rb +++ b/lib/datadog_api_client/v1/models/dashboard_share_type.rb @@ -23,5 +23,6 @@ class DashboardShareType OPEN = "open".freeze INVITE = "invite".freeze + EMBED = "embed".freeze end end diff --git a/lib/datadog_api_client/v1/models/shared_dashboard.rb b/lib/datadog_api_client/v1/models/shared_dashboard.rb index dc4df4fed896..98a6eb0e0097 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard.rb @@ -25,7 +25,7 @@ class SharedDashboard attr_accessor :author # Date the dashboard was shared. - attr_accessor :created_at + attr_accessor :created # ID of the dashboard to share. attr_reader :dashboard_id @@ -33,12 +33,24 @@ class SharedDashboard # The type of the associated private dashboard. attr_reader :dashboard_type + # The `SharedDashboard` `embeddable_domains`. + attr_accessor :embeddable_domains + + # The time when an OPEN shared dashboard becomes publicly unavailable. + attr_accessor :expiration + # Object containing the live span selection for the dashboard. attr_accessor :global_time # Whether to allow viewers to select a different global time setting for the shared dashboard. attr_accessor :global_time_selectable_enabled + # The `SharedDashboard` `invitees`. + attr_accessor :invitees + + # The last time the shared dashboard was accessed. Null if never accessed. + attr_accessor :last_accessed + # URL of the shared dashboard. attr_accessor :public_url @@ -51,9 +63,18 @@ class SharedDashboard # Type of sharing access (either open to anyone who has the public URL or invite-only). attr_accessor :share_type + # Active means the dashboard is publicly available. Paused means the dashboard is not publicly available. + attr_accessor :status + + # Title of the shared dashboard. + attr_accessor :title + # A unique token assigned to the shared dashboard. attr_accessor :token + # The viewing preferences for a shared dashboard. + attr_accessor :viewing_preferences + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -61,16 +82,23 @@ class SharedDashboard def self.attribute_map { :'author' => :'author', - :'created_at' => :'created_at', + :'created' => :'created', :'dashboard_id' => :'dashboard_id', :'dashboard_type' => :'dashboard_type', + :'embeddable_domains' => :'embeddable_domains', + :'expiration' => :'expiration', :'global_time' => :'global_time', :'global_time_selectable_enabled' => :'global_time_selectable_enabled', + :'invitees' => :'invitees', + :'last_accessed' => :'last_accessed', :'public_url' => :'public_url', :'selectable_template_vars' => :'selectable_template_vars', :'share_list' => :'share_list', :'share_type' => :'share_type', - :'token' => :'token' + :'status' => :'status', + :'title' => :'title', + :'token' => :'token', + :'viewing_preferences' => :'viewing_preferences' } end @@ -79,16 +107,23 @@ def self.attribute_map def self.openapi_types { :'author' => :'SharedDashboardAuthor', - :'created_at' => :'Time', + :'created' => :'Time', :'dashboard_id' => :'String', :'dashboard_type' => :'DashboardType', + :'embeddable_domains' => :'Array', + :'expiration' => :'Time', :'global_time' => :'DashboardGlobalTime', :'global_time_selectable_enabled' => :'Boolean', + :'invitees' => :'Array', + :'last_accessed' => :'Time', :'public_url' => :'String', :'selectable_template_vars' => :'Array', :'share_list' => :'Array', :'share_type' => :'DashboardShareType', - :'token' => :'String' + :'status' => :'SharedDashboardStatus', + :'title' => :'String', + :'token' => :'String', + :'viewing_preferences' => :'ViewingPreferences' } end @@ -96,7 +131,9 @@ def self.openapi_types # @!visibility private def self.openapi_nullable Set.new([ + :'expiration', :'global_time_selectable_enabled', + :'last_accessed', :'selectable_template_vars', :'share_list', :'share_type', @@ -125,8 +162,8 @@ def initialize(attributes = {}) self.author = attributes[:'author'] end - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] + if attributes.key?(:'created') + self.created = attributes[:'created'] end if attributes.key?(:'dashboard_id') @@ -137,6 +174,16 @@ def initialize(attributes = {}) self.dashboard_type = attributes[:'dashboard_type'] end + if attributes.key?(:'embeddable_domains') + if (value = attributes[:'embeddable_domains']).is_a?(Array) + self.embeddable_domains = value + end + end + + if attributes.key?(:'expiration') + self.expiration = attributes[:'expiration'] + end + if attributes.key?(:'global_time') self.global_time = attributes[:'global_time'] end @@ -145,6 +192,16 @@ def initialize(attributes = {}) self.global_time_selectable_enabled = attributes[:'global_time_selectable_enabled'] end + if attributes.key?(:'invitees') + if (value = attributes[:'invitees']).is_a?(Array) + self.invitees = value + end + end + + if attributes.key?(:'last_accessed') + self.last_accessed = attributes[:'last_accessed'] + end + if attributes.key?(:'public_url') self.public_url = attributes[:'public_url'] end @@ -165,9 +222,21 @@ def initialize(attributes = {}) self.share_type = attributes[:'share_type'] end + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + if attributes.key?(:'token') self.token = attributes[:'token'] end + + if attributes.key?(:'viewing_preferences') + self.viewing_preferences = attributes[:'viewing_preferences'] + end end # Check to see if the all the properties in the model are valid @@ -226,16 +295,23 @@ def ==(o) return true if self.equal?(o) self.class == o.class && author == o.author && - created_at == o.created_at && + created == o.created && dashboard_id == o.dashboard_id && dashboard_type == o.dashboard_type && + embeddable_domains == o.embeddable_domains && + expiration == o.expiration && global_time == o.global_time && global_time_selectable_enabled == o.global_time_selectable_enabled && + invitees == o.invitees && + last_accessed == o.last_accessed && public_url == o.public_url && selectable_template_vars == o.selectable_template_vars && share_list == o.share_list && share_type == o.share_type && + status == o.status && + title == o.title && token == o.token && + viewing_preferences == o.viewing_preferences && additional_properties == o.additional_properties end @@ -243,7 +319,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [author, created_at, dashboard_id, dashboard_type, global_time, global_time_selectable_enabled, public_url, selectable_template_vars, share_list, share_type, token, additional_properties].hash + [author, created, dashboard_id, dashboard_type, embeddable_domains, expiration, global_time, global_time_selectable_enabled, invitees, last_accessed, public_url, selectable_template_vars, share_list, share_type, status, title, token, viewing_preferences, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_invitees_items.rb b/lib/datadog_api_client/v1/models/shared_dashboard_invitees_items.rb new file mode 100644 index 000000000000..a19bbb68c5ce --- /dev/null +++ b/lib/datadog_api_client/v1/models/shared_dashboard_invitees_items.rb @@ -0,0 +1,151 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # The allowlisted invitees for an INVITE-only shared dashboard. + class SharedDashboardInviteesItems + include BaseGenericModel + + # Time of the invitee expiration. Null means the invite will not expire. + attr_accessor :access_expiration + + # Time that the invitee was created. + attr_accessor :created_at + + # Email of the invitee. + attr_reader :email + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'access_expiration' => :'access_expiration', + :'created_at' => :'created_at', + :'email' => :'email' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'access_expiration' => :'Time', + :'created_at' => :'Time', + :'email' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'access_expiration', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SharedDashboardInviteesItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'access_expiration') + self.access_expiration = attributes[:'access_expiration'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @email.nil? + true + end + + # Custom attribute writer method with validation + # @param email [Object] Object to be assigned + # @!visibility private + def email=(email) + if email.nil? + fail ArgumentError, 'invalid value for "email", email cannot be nil.' + end + @email = email + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + access_expiration == o.access_expiration && + created_at == o.created_at && + email == o.email && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [access_expiration, created_at, email, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_status.rb b/lib/datadog_api_client/v1/models/shared_dashboard_status.rb new file mode 100644 index 000000000000..95123fc38319 --- /dev/null +++ b/lib/datadog_api_client/v1/models/shared_dashboard_status.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Active means the dashboard is publicly available. Paused means the dashboard is not publicly available. + class SharedDashboardStatus + include BaseEnumModel + + ACTIVE = "active".freeze + PAUSED = "paused".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb b/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb index cb352b21c0c5..b435f7865f95 100644 --- a/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb +++ b/lib/datadog_api_client/v1/models/shared_dashboard_update_request.rb @@ -21,12 +21,21 @@ module DatadogAPIClient::V1 class SharedDashboardUpdateRequest include BaseGenericModel + # The `SharedDashboard` `embeddable_domains`. + attr_accessor :embeddable_domains + + # The time when an OPEN shared dashboard becomes publicly unavailable. + attr_accessor :expiration + # Timeframe setting for the shared dashboard. attr_accessor :global_time # Whether to allow viewers to select a different global time setting for the shared dashboard. attr_accessor :global_time_selectable_enabled + # The `SharedDashboard` `invitees`. + attr_accessor :invitees + # List of objects representing template variables on the shared dashboard which can have selectable values. attr_accessor :selectable_template_vars @@ -36,17 +45,32 @@ class SharedDashboardUpdateRequest # Type of sharing access (either open to anyone who has the public URL or invite-only). attr_accessor :share_type + # Active means the dashboard is publicly available. Paused means the dashboard is not publicly available. + attr_accessor :status + + # Title of the shared dashboard. + attr_accessor :title + + # The viewing preferences for a shared dashboard. + attr_accessor :viewing_preferences + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { + :'embeddable_domains' => :'embeddable_domains', + :'expiration' => :'expiration', :'global_time' => :'global_time', :'global_time_selectable_enabled' => :'global_time_selectable_enabled', + :'invitees' => :'invitees', :'selectable_template_vars' => :'selectable_template_vars', :'share_list' => :'share_list', - :'share_type' => :'share_type' + :'share_type' => :'share_type', + :'status' => :'status', + :'title' => :'title', + :'viewing_preferences' => :'viewing_preferences' } end @@ -54,11 +78,17 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'embeddable_domains' => :'Array', + :'expiration' => :'Time', :'global_time' => :'SharedDashboardUpdateRequestGlobalTime', :'global_time_selectable_enabled' => :'Boolean', + :'invitees' => :'Array', :'selectable_template_vars' => :'Array', :'share_list' => :'Array', - :'share_type' => :'DashboardShareType' + :'share_type' => :'DashboardShareType', + :'status' => :'SharedDashboardStatus', + :'title' => :'String', + :'viewing_preferences' => :'ViewingPreferences' } end @@ -66,6 +96,7 @@ def self.openapi_types # @!visibility private def self.openapi_nullable Set.new([ + :'expiration', :'global_time', :'global_time_selectable_enabled', :'selectable_template_vars', @@ -92,6 +123,16 @@ def initialize(attributes = {}) end } + if attributes.key?(:'embeddable_domains') + if (value = attributes[:'embeddable_domains']).is_a?(Array) + self.embeddable_domains = value + end + end + + if attributes.key?(:'expiration') + self.expiration = attributes[:'expiration'] + end + if attributes.key?(:'global_time') self.global_time = attributes[:'global_time'] end @@ -100,6 +141,12 @@ def initialize(attributes = {}) self.global_time_selectable_enabled = attributes[:'global_time_selectable_enabled'] end + if attributes.key?(:'invitees') + if (value = attributes[:'invitees']).is_a?(Array) + self.invitees = value + end + end + if attributes.key?(:'selectable_template_vars') if (value = attributes[:'selectable_template_vars']).is_a?(Array) self.selectable_template_vars = value @@ -115,6 +162,18 @@ def initialize(attributes = {}) if attributes.key?(:'share_type') self.share_type = attributes[:'share_type'] end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'viewing_preferences') + self.viewing_preferences = attributes[:'viewing_preferences'] + end end # Returns the object in the form of hash, with additionalProperties support. @@ -143,11 +202,17 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + embeddable_domains == o.embeddable_domains && + expiration == o.expiration && global_time == o.global_time && global_time_selectable_enabled == o.global_time_selectable_enabled && + invitees == o.invitees && selectable_template_vars == o.selectable_template_vars && share_list == o.share_list && share_type == o.share_type && + status == o.status && + title == o.title && + viewing_preferences == o.viewing_preferences && additional_properties == o.additional_properties end @@ -155,7 +220,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [global_time, global_time_selectable_enabled, selectable_template_vars, share_list, share_type, additional_properties].hash + [embeddable_domains, expiration, global_time, global_time_selectable_enabled, invitees, selectable_template_vars, share_list, share_type, status, title, viewing_preferences, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/viewing_preferences.rb b/lib/datadog_api_client/v1/models/viewing_preferences.rb new file mode 100644 index 000000000000..be082fef8faf --- /dev/null +++ b/lib/datadog_api_client/v1/models/viewing_preferences.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # The viewing preferences for a shared dashboard. + class ViewingPreferences + include BaseGenericModel + + # Whether the widgets on the shared dashboard should be displayed with high density. + attr_accessor :high_density + + # The theme of the shared dashboard view. "system" follows your system's default viewing theme. + attr_accessor :theme + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'high_density' => :'high_density', + :'theme' => :'theme' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'high_density' => :'Boolean', + :'theme' => :'ViewingPreferencesTheme' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ViewingPreferences` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'high_density') + self.high_density = attributes[:'high_density'] + end + + if attributes.key?(:'theme') + self.theme = attributes[:'theme'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + high_density == o.high_density && + theme == o.theme && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [high_density, theme, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/viewing_preferences_theme.rb b/lib/datadog_api_client/v1/models/viewing_preferences_theme.rb new file mode 100644 index 000000000000..4d285d153ab0 --- /dev/null +++ b/lib/datadog_api_client/v1/models/viewing_preferences_theme.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # The theme of the shared dashboard view. "system" follows your system's default viewing theme. + class ViewingPreferencesTheme + include BaseEnumModel + + SYSTEM = "system".freeze + LIGHT = "light".freeze + DARK = "dark".freeze + end +end