Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 13 additions & 73 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1051,20 +1051,6 @@ components:
example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
format: uuid
type: string
OrgGroupInclude:
description: >-
List of related resources to include.
explode: false
in: query
name: include
required: false
schema:
example:
- memberships
items:
$ref: "#/components/schemas/OrgGroupIncludeOption"
type: array
style: form
OrgGroupMembershipFilterOrgGroupId:
description: Filter memberships by org group ID. Required when `filter[org_uuid]` is not provided.
in: query
Expand Down Expand Up @@ -58973,22 +58959,13 @@ components:
example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
format: uuid
type: string
relationships:
$ref: "#/components/schemas/OrgGroupRelationships"
type:
$ref: "#/components/schemas/OrgGroupType"
required:
- id
- type
- attributes
type: object
OrgGroupIncludeOption:
description: Allowed include options for org group endpoints.
enum:
- memberships
type: string
x-enum-varnames:
- MEMBERSHIPS
OrgGroupListResponse:
description: Response containing a list of org groups.
properties:
Expand All @@ -58997,11 +58974,6 @@ components:
items:
$ref: "#/components/schemas/OrgGroupData"
type: array
included:
description: Related resources included in the response when requested with the `include` parameter.
items:
$ref: "#/components/schemas/OrgGroupMembershipData"
type: array
links:
$ref: "#/components/schemas/OrgGroupPaginationLinks"
meta:
Expand Down Expand Up @@ -59128,20 +59100,6 @@ components:
required:
- data
type: object
OrgGroupMembershipRelationshipData:
description: A reference to an org group membership.
properties:
id:
description: The ID of the membership.
example: "f1e2d3c4-b5a6-7890-1234-567890abcdef"
format: uuid
type: string
type:
$ref: "#/components/schemas/OrgGroupMembershipType"
required:
- id
- type
type: object
OrgGroupMembershipRelationships:
description: Relationships of an org group membership.
properties:
Expand Down Expand Up @@ -59212,17 +59170,6 @@ components:
required:
- data
type: object
OrgGroupMembershipsRelationship:
description: Relationship to org group memberships.
properties:
data:
description: An array of membership relationship references.
items:
$ref: "#/components/schemas/OrgGroupMembershipRelationshipData"
type: array
required:
- data
type: object
OrgGroupPaginationLinks:
description: Pagination links for navigating between pages of an org group list response.
properties:
Expand Down Expand Up @@ -59456,18 +59403,18 @@ components:
- attributes
type: object
OrgGroupPolicyEnforcementTier:
default: DEFAULT
default: OVERRIDE_ALLOWED
description: >-
The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value.
The enforcement tier of the policy. `OVERRIDE_ALLOWED` means the policy is set but member orgs may mutate it. `GROUP_MANAGED` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value.
enum:
- DEFAULT
- ENFORCE
- OVERRIDE_ALLOWED
- GROUP_MANAGED
- DELEGATE
example: DEFAULT
example: OVERRIDE_ALLOWED
type: string
x-enum-varnames:
- DEFAULT
- ENFORCE
- OVERRIDE_ALLOWED
- GROUP_MANAGED
- DELEGATE
OrgGroupPolicyListResponse:
description: Response containing a list of org group policies.
Expand Down Expand Up @@ -59808,12 +59755,6 @@ components:
- id
- type
type: object
OrgGroupRelationships:
description: Relationships of an org group.
properties:
memberships:
$ref: "#/components/schemas/OrgGroupMembershipsRelationship"
type: object
OrgGroupResponse:
description: Response containing a single org group.
properties:
Expand Down Expand Up @@ -132865,7 +132806,7 @@ paths:
- attributes:
content:
value: "UTC"
enforcement_tier: "DEFAULT"
enforcement_tier: "OVERRIDE_ALLOWED"
modified_at: "2024-01-15T10:30:00Z"
policy_name: "monitor_timezone"
policy_type: "org_config"
Expand Down Expand Up @@ -132937,7 +132878,7 @@ paths:
attributes:
content:
value: "UTC"
enforcement_tier: "DEFAULT"
enforcement_tier: "OVERRIDE_ALLOWED"
policy_name: "monitor_timezone"
policy_type: "org_config"
relationships:
Expand All @@ -132960,7 +132901,7 @@ paths:
attributes:
content:
value: "UTC"
enforcement_tier: "DEFAULT"
enforcement_tier: "OVERRIDE_ALLOWED"
modified_at: "2024-01-15T10:30:00Z"
policy_name: "monitor_timezone"
policy_type: "org_config"
Expand Down Expand Up @@ -133069,7 +133010,7 @@ paths:
attributes:
content:
value: "UTC"
enforcement_tier: "DEFAULT"
enforcement_tier: "OVERRIDE_ALLOWED"
modified_at: "2024-01-15T10:30:00Z"
policy_name: "monitor_timezone"
policy_type: "org_config"
Expand Down Expand Up @@ -133133,7 +133074,7 @@ paths:
attributes:
content:
value: "US/Eastern"
enforcement_tier: "ENFORCE"
enforcement_tier: "GROUP_MANAGED"
id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789"
type: org_group_policies
schema:
Expand All @@ -133150,7 +133091,7 @@ paths:
attributes:
content:
value: "US/Eastern"
enforcement_tier: "ENFORCE"
enforcement_tier: "GROUP_MANAGED"
modified_at: "2024-01-16T14:00:00Z"
policy_name: "monitor_timezone"
policy_type: "org_config"
Expand Down Expand Up @@ -133617,7 +133558,6 @@ paths:
- $ref: "#/components/parameters/OrgGroupPageNumber"
- $ref: "#/components/parameters/OrgGroupPageSize"
- $ref: "#/components/parameters/OrgGroupSort"
- $ref: "#/components/parameters/OrgGroupInclude"
responses:
"200":
content:
Expand Down
2 changes: 1 addition & 1 deletion examples/v2_org-groups_CreateOrgGroupPolicy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async fn main() {
BTreeMap::from([("value".to_string(), Value::from("UTC"))]),
"monitor_timezone".to_string(),
)
.enforcement_tier(OrgGroupPolicyEnforcementTier::DEFAULT)
.enforcement_tier(OrgGroupPolicyEnforcementTier::OVERRIDE_ALLOWED)
.policy_type(OrgGroupPolicyPolicyType::ORG_CONFIG),
OrgGroupPolicyCreateRelationships::new(OrgGroupRelationshipToOne::new(
OrgGroupRelationshipToOneData::new(
Expand Down
2 changes: 1 addition & 1 deletion examples/v2_org-groups_UpdateOrgGroupPolicy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() {
let body = OrgGroupPolicyUpdateRequest::new(OrgGroupPolicyUpdateData::new(
OrgGroupPolicyUpdateAttributes::new()
.content(BTreeMap::from([("value".to_string(), Value::from("UTC"))]))
.enforcement_tier(OrgGroupPolicyEnforcementTier::DEFAULT),
.enforcement_tier(OrgGroupPolicyEnforcementTier::OVERRIDE_ALLOWED),
Uuid::parse_str("1a2b3c4d-5e6f-7890-abcd-ef0123456789").expect("invalid UUID"),
OrgGroupPolicyType::ORG_GROUP_POLICIES,
));
Expand Down
19 changes: 0 additions & 19 deletions src/datadogV2/api/api_org_groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ pub struct ListOrgGroupsOptionalParams {
pub page_size: Option<i64>,
/// Field to sort org groups by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`.
pub sort: Option<crate::datadogV2::model::OrgGroupSortOption>,
/// List of related resources to include.
pub include: Option<Vec<crate::datadogV2::model::OrgGroupIncludeOption>>,
}

impl ListOrgGroupsOptionalParams {
Expand All @@ -162,11 +160,6 @@ impl ListOrgGroupsOptionalParams {
self.sort = Some(value);
self
}
/// List of related resources to include.
pub fn include(mut self, value: Vec<crate::datadogV2::model::OrgGroupIncludeOption>) -> Self {
self.include = Some(value);
self
}
}

/// BulkUpdateOrgGroupMembershipsError is a struct for typed errors of method [`OrgGroupsAPI::bulk_update_org_group_memberships`]
Expand Down Expand Up @@ -2440,7 +2433,6 @@ impl OrgGroupsAPI {
let page_number = params.page_number;
let page_size = params.page_size;
let sort = params.sort;
let include = params.include;

let local_client = &self.client;

Expand All @@ -2463,17 +2455,6 @@ impl OrgGroupsAPI {
local_req_builder =
local_req_builder.query(&[("sort", &local_query_param.to_string())]);
};
if let Some(ref local) = include {
local_req_builder = local_req_builder.query(&[(
"include",
&local
.iter()
.map(|p| p.to_string())
.collect::<Vec<String>>()
.join(",")
.to_string(),
)]);
};

// build headers
let mut headers = HeaderMap::new();
Expand Down
8 changes: 0 additions & 8 deletions src/datadogV2/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7322,20 +7322,12 @@ pub mod model_org_group_policy_override_update_attributes;
pub use self::model_org_group_policy_override_update_attributes::OrgGroupPolicyOverrideUpdateAttributes;
pub mod model_org_group_sort_option;
pub use self::model_org_group_sort_option::OrgGroupSortOption;
pub mod model_org_group_include_option;
pub use self::model_org_group_include_option::OrgGroupIncludeOption;
pub mod model_org_group_list_response;
pub use self::model_org_group_list_response::OrgGroupListResponse;
pub mod model_org_group_data;
pub use self::model_org_group_data::OrgGroupData;
pub mod model_org_group_attributes;
pub use self::model_org_group_attributes::OrgGroupAttributes;
pub mod model_org_group_relationships;
pub use self::model_org_group_relationships::OrgGroupRelationships;
pub mod model_org_group_memberships_relationship;
pub use self::model_org_group_memberships_relationship::OrgGroupMembershipsRelationship;
pub mod model_org_group_membership_relationship_data;
pub use self::model_org_group_membership_relationship_data::OrgGroupMembershipRelationshipData;
pub mod model_org_group_create_request;
pub use self::model_org_group_create_request::OrgGroupCreateRequest;
pub mod model_org_group_create_data;
Expand Down
19 changes: 0 additions & 19 deletions src/datadogV2/model/model_org_group_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ pub struct OrgGroupData {
/// The ID of the org group.
#[serde(rename = "id")]
pub id: uuid::Uuid,
/// Relationships of an org group.
#[serde(rename = "relationships")]
pub relationships: Option<crate::datadogV2::model::OrgGroupRelationships>,
/// Org groups resource type.
#[serde(rename = "type")]
pub type_: crate::datadogV2::model::OrgGroupType,
Expand All @@ -39,18 +36,12 @@ impl OrgGroupData {
OrgGroupData {
attributes,
id,
relationships: None,
type_,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
}

pub fn relationships(mut self, value: crate::datadogV2::model::OrgGroupRelationships) -> Self {
self.relationships = Some(value);
self
}

pub fn additional_properties(
mut self,
value: std::collections::BTreeMap<String, serde_json::Value>,
Expand Down Expand Up @@ -79,8 +70,6 @@ impl<'de> Deserialize<'de> for OrgGroupData {
{
let mut attributes: Option<crate::datadogV2::model::OrgGroupAttributes> = None;
let mut id: Option<uuid::Uuid> = None;
let mut relationships: Option<crate::datadogV2::model::OrgGroupRelationships> =
None;
let mut type_: Option<crate::datadogV2::model::OrgGroupType> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
Expand All @@ -96,13 +85,6 @@ impl<'de> Deserialize<'de> for OrgGroupData {
"id" => {
id = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"relationships" => {
if v.is_null() {
continue;
}
relationships =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"type" => {
type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
if let Some(ref _type_) = type_ {
Expand Down Expand Up @@ -130,7 +112,6 @@ impl<'de> Deserialize<'de> for OrgGroupData {
let content = OrgGroupData {
attributes,
id,
relationships,
type_,
additional_properties,
_unparsed,
Expand Down
48 changes: 0 additions & 48 deletions src/datadogV2/model/model_org_group_include_option.rs

This file was deleted.

Loading
Loading