From 771bc527c46ed1750e2e892ed6edf9599e45befa Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Wed, 6 Nov 2024 00:09:14 +0000 Subject: [PATCH 01/14] New updates to generated code --- ...m_copilot_billing_seats_request_builder.go | 6 ++-- pkg/github/kiota-lock.json | 2 +- pkg/github/models/deploy_key.go | 29 +++++++++++++++++++ pkg/github/models/organization_full.go | 29 +++++++++++++++++++ .../organization_programmatic_access_grant.go | 29 +++++++++++++++++++ ...ation_programmatic_access_grant_request.go | 29 +++++++++++++++++++ .../item_copilot_billing_request_builder.go | 4 +-- ...m_copilot_billing_seats_request_builder.go | 6 ++-- ..._selected_escaped_teams_delete_response.go | 2 +- ...ng_selected_escaped_teams_post_response.go | 2 +- ..._selected_escaped_teams_request_builder.go | 8 ++--- ..._selected_escaped_users_delete_response.go | 2 +- ...ng_selected_escaped_users_post_response.go | 2 +- ..._selected_escaped_users_request_builder.go | 8 ++--- ...em_members_item_copilot_request_builder.go | 4 +-- .../orgs/item_with_org_patch_request_body.go | 29 +++++++++++++++++++ 16 files changed, 168 insertions(+), 23 deletions(-) diff --git a/pkg/github/enterprises/item_copilot_billing_seats_request_builder.go b/pkg/github/enterprises/item_copilot_billing_seats_request_builder.go index 087850ec..e45c306f 100644 --- a/pkg/github/enterprises/item_copilot_billing_seats_request_builder.go +++ b/pkg/github/enterprises/item_copilot_billing_seats_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemCopilotBillingSeatsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Each seat object contains information about the assigned user's most recent Copilot activity. Users must havetelemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data,see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. type ItemCopilotBillingSeatsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -30,7 +30,7 @@ func NewItemCopilotBillingSeatsRequestBuilder(rawUrl string, requestAdapter i2ae urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingSeatsRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Each seat object contains information about the assigned user's most recent Copilot activity. Users must havetelemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data,see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a ItemCopilotBillingSeatsGetResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -59,7 +59,7 @@ func (m *ItemCopilotBillingSeatsRequestBuilder) Get(ctx context.Context, request } return res.(ItemCopilotBillingSeatsGetResponseable), nil } -// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Each seat object contains information about the assigned user's most recent Copilot activity. Users must havetelemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data,see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSeatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotBillingSeatsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index c4c23a5f..b3cd2ab3 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "CF15A790EDB46847DBAB6A56C38421F51E18945AF7B3B699418AD2F2FB8E3E0CE6E03666D7CF66A7182E136238FAA493463FE5F8CB445BC20F4BC0C23327AF55", + "descriptionHash": "F295E6C4635B38A700004CD624468F132C5D2297BCBE742CA3D2D18048001711980E12595B66A25CE9B3DF5134DC253E24378BCAF73A6735615DA5336286A728", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/deploy_key.go b/pkg/github/models/deploy_key.go index e51d0d31..87957e4c 100644 --- a/pkg/github/models/deploy_key.go +++ b/pkg/github/models/deploy_key.go @@ -12,6 +12,8 @@ type DeployKey struct { additionalData map[string]any // The created_at property created_at *string + // The enabled property + enabled *bool // The id property id *int32 // The key property @@ -54,6 +56,11 @@ func (m *DeployKey) GetAdditionalData()(map[string]any) { func (m *DeployKey) GetCreatedAt()(*string) { return m.created_at } +// GetEnabled gets the enabled property value. The enabled property +// returns a *bool when successful +func (m *DeployKey) GetEnabled()(*bool) { + return m.enabled +} // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *DeployKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { @@ -78,6 +85,16 @@ func (m *DeployKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2689 } return nil } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetInt32Value() if err != nil { @@ -199,6 +216,12 @@ func (m *DeployKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c0 return err } } + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } { err := writer.WriteInt32Value("id", m.GetId()) if err != nil { @@ -261,6 +284,10 @@ func (m *DeployKey) SetAdditionalData(value map[string]any)() { func (m *DeployKey) SetCreatedAt(value *string)() { m.created_at = value } +// SetEnabled sets the enabled property value. The enabled property +func (m *DeployKey) SetEnabled(value *bool)() { + m.enabled = value +} // SetId sets the id property value. The id property func (m *DeployKey) SetId(value *int32)() { m.id = value @@ -294,6 +321,7 @@ type DeployKeyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAddedBy()(*string) GetCreatedAt()(*string) + GetEnabled()(*bool) GetId()(*int32) GetKey()(*string) GetLastUsed()(*string) @@ -303,6 +331,7 @@ type DeployKeyable interface { GetVerified()(*bool) SetAddedBy(value *string)() SetCreatedAt(value *string)() + SetEnabled(value *bool)() SetId(value *int32)() SetKey(value *string)() SetLastUsed(value *string)() diff --git a/pkg/github/models/organization_full.go b/pkg/github/models/organization_full.go index 092f5cb5..c53e06db 100644 --- a/pkg/github/models/organization_full.go +++ b/pkg/github/models/organization_full.go @@ -37,6 +37,8 @@ type OrganizationFull struct { // **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. // Deprecated: dependency_graph_enabled_for_new_repositories *bool + // Controls whether or not deploy keys may be added and used for repositories in the organization. + deploy_keys_enabled_for_repositories *bool // The description property description *string // The disk_usage property @@ -211,6 +213,11 @@ func (m *OrganizationFull) GetDependabotSecurityUpdatesEnabledForNewRepositories func (m *OrganizationFull) GetDependencyGraphEnabledForNewRepositories()(*bool) { return m.dependency_graph_enabled_for_new_repositories } +// GetDeployKeysEnabledForRepositories gets the deploy_keys_enabled_for_repositories property value. Controls whether or not deploy keys may be added and used for repositories in the organization. +// returns a *bool when successful +func (m *OrganizationFull) GetDeployKeysEnabledForRepositories()(*bool) { + return m.deploy_keys_enabled_for_repositories +} // GetDescription gets the description property value. The description property // returns a *string when successful func (m *OrganizationFull) GetDescription()(*string) { @@ -355,6 +362,16 @@ func (m *OrganizationFull) GetFieldDeserializers()(map[string]func(i878a80d2330e } return nil } + res["deploy_keys_enabled_for_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeployKeysEnabledForRepositories(val) + } + return nil + } res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -1088,6 +1105,12 @@ func (m *OrganizationFull) Serialize(writer i878a80d2330e89d26896388a3f487eef27b return err } } + { + err := writer.WriteBoolValue("deploy_keys_enabled_for_repositories", m.GetDeployKeysEnabledForRepositories()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("description", m.GetDescription()) if err != nil { @@ -1422,6 +1445,10 @@ func (m *OrganizationFull) SetDependabotSecurityUpdatesEnabledForNewRepositories func (m *OrganizationFull) SetDependencyGraphEnabledForNewRepositories(value *bool)() { m.dependency_graph_enabled_for_new_repositories = value } +// SetDeployKeysEnabledForRepositories sets the deploy_keys_enabled_for_repositories property value. Controls whether or not deploy keys may be added and used for repositories in the organization. +func (m *OrganizationFull) SetDeployKeysEnabledForRepositories(value *bool)() { + m.deploy_keys_enabled_for_repositories = value +} // SetDescription sets the description property value. The description property func (m *OrganizationFull) SetDescription(value *string)() { m.description = value @@ -1619,6 +1646,7 @@ type OrganizationFullable interface { GetDependabotAlertsEnabledForNewRepositories()(*bool) GetDependabotSecurityUpdatesEnabledForNewRepositories()(*bool) GetDependencyGraphEnabledForNewRepositories()(*bool) + GetDeployKeysEnabledForRepositories()(*bool) GetDescription()(*string) GetDiskUsage()(*int32) GetEmail()(*string) @@ -1676,6 +1704,7 @@ type OrganizationFullable interface { SetDependabotAlertsEnabledForNewRepositories(value *bool)() SetDependabotSecurityUpdatesEnabledForNewRepositories(value *bool)() SetDependencyGraphEnabledForNewRepositories(value *bool)() + SetDeployKeysEnabledForRepositories(value *bool)() SetDescription(value *string)() SetDiskUsage(value *int32)() SetEmail(value *string)() diff --git a/pkg/github/models/organization_programmatic_access_grant.go b/pkg/github/models/organization_programmatic_access_grant.go index cd0c9249..ffb92c07 100644 --- a/pkg/github/models/organization_programmatic_access_grant.go +++ b/pkg/github/models/organization_programmatic_access_grant.go @@ -28,6 +28,8 @@ type OrganizationProgrammaticAccessGrant struct { token_id *int32 // Date and time when the associated fine-grained personal access token was last used for authentication. token_last_used_at *string + // The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. + token_name *string } // NewOrganizationProgrammaticAccessGrant instantiates a new OrganizationProgrammaticAccessGrant and sets the default values. func NewOrganizationProgrammaticAccessGrant()(*OrganizationProgrammaticAccessGrant) { @@ -155,6 +157,16 @@ func (m *OrganizationProgrammaticAccessGrant) GetFieldDeserializers()(map[string } return nil } + res["token_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenName(val) + } + return nil + } return res } // GetId gets the id property value. Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token. @@ -202,6 +214,11 @@ func (m *OrganizationProgrammaticAccessGrant) GetTokenId()(*int32) { func (m *OrganizationProgrammaticAccessGrant) GetTokenLastUsedAt()(*string) { return m.token_last_used_at } +// GetTokenName gets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrant) GetTokenName()(*string) { + return m.token_name +} // Serialize serializes information the current object func (m *OrganizationProgrammaticAccessGrant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -265,6 +282,12 @@ func (m *OrganizationProgrammaticAccessGrant) Serialize(writer i878a80d2330e89d2 return err } } + { + err := writer.WriteStringValue("token_name", m.GetTokenName()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -317,6 +340,10 @@ func (m *OrganizationProgrammaticAccessGrant) SetTokenId(value *int32)() { func (m *OrganizationProgrammaticAccessGrant) SetTokenLastUsedAt(value *string)() { m.token_last_used_at = value } +// SetTokenName sets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +func (m *OrganizationProgrammaticAccessGrant) SetTokenName(value *string)() { + m.token_name = value +} type OrganizationProgrammaticAccessGrantable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -330,6 +357,7 @@ type OrganizationProgrammaticAccessGrantable interface { GetTokenExpiresAt()(*string) GetTokenId()(*int32) GetTokenLastUsedAt()(*string) + GetTokenName()(*string) SetAccessGrantedAt(value *string)() SetId(value *int32)() SetOwner(value SimpleUserable)() @@ -340,4 +368,5 @@ type OrganizationProgrammaticAccessGrantable interface { SetTokenExpiresAt(value *string)() SetTokenId(value *int32)() SetTokenLastUsedAt(value *string)() + SetTokenName(value *string)() } diff --git a/pkg/github/models/organization_programmatic_access_grant_request.go b/pkg/github/models/organization_programmatic_access_grant_request.go index 787b8837..06911446 100644 --- a/pkg/github/models/organization_programmatic_access_grant_request.go +++ b/pkg/github/models/organization_programmatic_access_grant_request.go @@ -30,6 +30,8 @@ type OrganizationProgrammaticAccessGrantRequest struct { token_id *int32 // Date and time when the associated fine-grained personal access token was last used for authentication. token_last_used_at *string + // The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. + token_name *string } // NewOrganizationProgrammaticAccessGrantRequest instantiates a new OrganizationProgrammaticAccessGrantRequest and sets the default values. func NewOrganizationProgrammaticAccessGrantRequest()(*OrganizationProgrammaticAccessGrantRequest) { @@ -167,6 +169,16 @@ func (m *OrganizationProgrammaticAccessGrantRequest) GetFieldDeserializers()(map } return nil } + res["token_name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenName(val) + } + return nil + } return res } // GetId gets the id property value. Unique identifier of the request for access via fine-grained personal access token. The `pat_request_id` used to review PAT requests. @@ -219,6 +231,11 @@ func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenId()(*int32) { func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenLastUsedAt()(*string) { return m.token_last_used_at } +// GetTokenName gets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +// returns a *string when successful +func (m *OrganizationProgrammaticAccessGrantRequest) GetTokenName()(*string) { + return m.token_name +} // Serialize serializes information the current object func (m *OrganizationProgrammaticAccessGrantRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -288,6 +305,12 @@ func (m *OrganizationProgrammaticAccessGrantRequest) Serialize(writer i878a80d23 return err } } + { + err := writer.WriteStringValue("token_name", m.GetTokenName()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -344,6 +367,10 @@ func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenId(value *int32)() func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenLastUsedAt(value *string)() { m.token_last_used_at = value } +// SetTokenName sets the token_name property value. The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +func (m *OrganizationProgrammaticAccessGrantRequest) SetTokenName(value *string)() { + m.token_name = value +} type OrganizationProgrammaticAccessGrantRequestable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -358,6 +385,7 @@ type OrganizationProgrammaticAccessGrantRequestable interface { GetTokenExpiresAt()(*string) GetTokenId()(*int32) GetTokenLastUsedAt()(*string) + GetTokenName()(*string) SetCreatedAt(value *string)() SetId(value *int32)() SetOwner(value SimpleUserable)() @@ -369,4 +397,5 @@ type OrganizationProgrammaticAccessGrantRequestable interface { SetTokenExpiresAt(value *string)() SetTokenId(value *int32)() SetTokenLastUsedAt(value *string)() + SetTokenName(value *string)() } diff --git a/pkg/github/orgs/item_copilot_billing_request_builder.go b/pkg/github/orgs/item_copilot_billing_request_builder.go index bea0b3fd..64121f18 100644 --- a/pkg/github/orgs/item_copilot_billing_request_builder.go +++ b/pkg/github/orgs/item_copilot_billing_request_builder.go @@ -23,7 +23,7 @@ func NewItemCopilotBillingRequestBuilder(rawUrl string, requestAdapter i2ae4187f urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in public preview and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is in public preview and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)."Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a CopilotOrganizationDetailsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -67,7 +67,7 @@ func (m *ItemCopilotBillingRequestBuilder) Selected_teams()(*ItemCopilotBillingS func (m *ItemCopilotBillingRequestBuilder) Selected_users()(*ItemCopilotBillingSelected_usersRequestBuilder) { return NewItemCopilotBillingSelected_usersRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)."Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_copilot_billing_seats_request_builder.go b/pkg/github/orgs/item_copilot_billing_seats_request_builder.go index 049bdfd1..335d6fe3 100644 --- a/pkg/github/orgs/item_copilot_billing_seats_request_builder.go +++ b/pkg/github/orgs/item_copilot_billing_seats_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemCopilotBillingSeatsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// ItemCopilotBillingSeatsRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. type ItemCopilotBillingSeatsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -30,7 +30,7 @@ func NewItemCopilotBillingSeatsRequestBuilder(rawUrl string, requestAdapter i2ae urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingSeatsRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a ItemCopilotBillingSeatsGetResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -59,7 +59,7 @@ func (m *ItemCopilotBillingSeatsRequestBuilder) Get(ctx context.Context, request } return res.(ItemCopilotBillingSeatsGetResponseable), nil } -// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSeatsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotBillingSeatsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_delete_response.go b/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_delete_response.go index 27cf7b17..a3ba2443 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_delete_response.go +++ b/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_delete_response.go @@ -4,7 +4,7 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ItemCopilotBillingSelected_teamsDeleteResponse the total number of seat assignments cancelled. +// ItemCopilotBillingSelected_teamsDeleteResponse the total number of seats set to "pending cancellation" for members of the specified team(s). type ItemCopilotBillingSelected_teamsDeleteResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any diff --git a/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_post_response.go b/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_post_response.go index 62d27647..cb229c25 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_post_response.go +++ b/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_post_response.go @@ -4,7 +4,7 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ItemCopilotBillingSelected_teamsPostResponse the total number of seat assignments created. +// ItemCopilotBillingSelected_teamsPostResponse the total number of seats created for members of the specified team(s). type ItemCopilotBillingSelected_teamsPostResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any diff --git a/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_request_builder.go b/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_request_builder.go index 98a4ef09..cd27cc64 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_request_builder.go +++ b/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_request_builder.go @@ -23,7 +23,7 @@ func NewItemCopilotBillingSelected_teamsRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingSelected_teamsRequestBuilderInternal(urlParams, requestAdapter) } -// Delete > [!NOTE]> This endpoint is in public preview and is subject to change.Cancels the Copilot seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// Delete > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response will contain the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_teamsDeleteResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Delete(ctx context.Cont } return res.(ItemCopilotBillingSelected_teamsDeleteResponseable), nil } -// Post > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// Post > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_teamsPostResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -81,7 +81,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Post(ctx context.Contex } return res.(ItemCopilotBillingSelected_teamsPostResponseable), nil } -// ToDeleteRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Cancels the Copilot seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// ToDeleteRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response will contain the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -93,7 +93,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToDeleteRequestInformat } return requestInfo, nil } -// ToPostRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// ToPostRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_copilot_billing_selected_escaped_users_delete_response.go b/pkg/github/orgs/item_copilot_billing_selected_escaped_users_delete_response.go index b658f15c..9cd167bf 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_escaped_users_delete_response.go +++ b/pkg/github/orgs/item_copilot_billing_selected_escaped_users_delete_response.go @@ -4,7 +4,7 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ItemCopilotBillingSelected_usersDeleteResponse the total number of seat assignments cancelled. +// ItemCopilotBillingSelected_usersDeleteResponse the total number of seats set to "pending cancellation" for the specified users. type ItemCopilotBillingSelected_usersDeleteResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any diff --git a/pkg/github/orgs/item_copilot_billing_selected_escaped_users_post_response.go b/pkg/github/orgs/item_copilot_billing_selected_escaped_users_post_response.go index b90bf233..cdfb0cc2 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_escaped_users_post_response.go +++ b/pkg/github/orgs/item_copilot_billing_selected_escaped_users_post_response.go @@ -4,7 +4,7 @@ import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ItemCopilotBillingSelected_usersPostResponse the total number of seat assignments created. +// ItemCopilotBillingSelected_usersPostResponse the total number of seats created for the specified user(s). type ItemCopilotBillingSelected_usersPostResponse struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any diff --git a/pkg/github/orgs/item_copilot_billing_selected_escaped_users_request_builder.go b/pkg/github/orgs/item_copilot_billing_selected_escaped_users_request_builder.go index 4e330e1a..fa866e1e 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_escaped_users_request_builder.go +++ b/pkg/github/orgs/item_copilot_billing_selected_escaped_users_request_builder.go @@ -23,7 +23,7 @@ func NewItemCopilotBillingSelected_usersRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingSelected_usersRequestBuilderInternal(urlParams, requestAdapter) } -// Delete > [!NOTE]> This endpoint is in public preview and is subject to change.Cancels the Copilot seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// Delete > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response will contain the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_usersDeleteResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) Delete(ctx context.Cont } return res.(ItemCopilotBillingSelected_usersDeleteResponseable), nil } -// Post > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// Post > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_usersPostResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -81,7 +81,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) Post(ctx context.Contex } return res.(ItemCopilotBillingSelected_usersPostResponseable), nil } -// ToDeleteRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Cancels the Copilot seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// ToDeleteRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response will contain the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -93,7 +93,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToDeleteRequestInformat } return requestInfo, nil } -// ToPostRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// ToPostRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_members_item_copilot_request_builder.go b/pkg/github/orgs/item_members_item_copilot_request_builder.go index 23daf6c0..ee834b0e 100644 --- a/pkg/github/orgs/item_members_item_copilot_request_builder.go +++ b/pkg/github/orgs/item_members_item_copilot_request_builder.go @@ -23,7 +23,7 @@ func NewItemMembersItemCopilotRequestBuilder(rawUrl string, requestAdapter i2ae4 urlParams["request-raw-url"] = rawUrl return NewItemMembersItemCopilotRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot.Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a CopilotSeatDetailsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *ItemMembersItemCopilotRequestBuilder) Get(ctx context.Context, requestC } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotSeatDetailsable), nil } -// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot.Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemMembersItemCopilotRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_with_org_patch_request_body.go b/pkg/github/orgs/item_with_org_patch_request_body.go index e0fd3c02..0ec7577f 100644 --- a/pkg/github/orgs/item_with_org_patch_request_body.go +++ b/pkg/github/orgs/item_with_org_patch_request_body.go @@ -25,6 +25,8 @@ type ItemWithOrgPatchRequestBody struct { // **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. // Deprecated: dependency_graph_enabled_for_new_repositories *bool + // Controls whether or not deploy keys may be added and used for repositories in the organization. + deploy_keys_enabled_for_repositories *bool // The description of the company. The maximum size is 160 characters. description *string // The publicly visible email address. @@ -124,6 +126,11 @@ func (m *ItemWithOrgPatchRequestBody) GetDependabotSecurityUpdatesEnabledForNewR func (m *ItemWithOrgPatchRequestBody) GetDependencyGraphEnabledForNewRepositories()(*bool) { return m.dependency_graph_enabled_for_new_repositories } +// GetDeployKeysEnabledForRepositories gets the deploy_keys_enabled_for_repositories property value. Controls whether or not deploy keys may be added and used for repositories in the organization. +// returns a *bool when successful +func (m *ItemWithOrgPatchRequestBody) GetDeployKeysEnabledForRepositories()(*bool) { + return m.deploy_keys_enabled_for_repositories +} // GetDescription gets the description property value. The description of the company. The maximum size is 160 characters. // returns a *string when successful func (m *ItemWithOrgPatchRequestBody) GetDescription()(*string) { @@ -208,6 +215,16 @@ func (m *ItemWithOrgPatchRequestBody) GetFieldDeserializers()(map[string]func(i8 } return nil } + res["deploy_keys_enabled_for_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeployKeysEnabledForRepositories(val) + } + return nil + } res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -546,6 +563,12 @@ func (m *ItemWithOrgPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a return err } } + { + err := writer.WriteBoolValue("deploy_keys_enabled_for_repositories", m.GetDeployKeysEnabledForRepositories()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("description", m.GetDescription()) if err != nil { @@ -710,6 +733,10 @@ func (m *ItemWithOrgPatchRequestBody) SetDependabotSecurityUpdatesEnabledForNewR func (m *ItemWithOrgPatchRequestBody) SetDependencyGraphEnabledForNewRepositories(value *bool)() { m.dependency_graph_enabled_for_new_repositories = value } +// SetDeployKeysEnabledForRepositories sets the deploy_keys_enabled_for_repositories property value. Controls whether or not deploy keys may be added and used for repositories in the organization. +func (m *ItemWithOrgPatchRequestBody) SetDeployKeysEnabledForRepositories(value *bool)() { + m.deploy_keys_enabled_for_repositories = value +} // SetDescription sets the description property value. The description of the company. The maximum size is 160 characters. func (m *ItemWithOrgPatchRequestBody) SetDescription(value *string)() { m.description = value @@ -802,6 +829,7 @@ type ItemWithOrgPatchRequestBodyable interface { GetDependabotAlertsEnabledForNewRepositories()(*bool) GetDependabotSecurityUpdatesEnabledForNewRepositories()(*bool) GetDependencyGraphEnabledForNewRepositories()(*bool) + GetDeployKeysEnabledForRepositories()(*bool) GetDescription()(*string) GetEmail()(*string) GetHasOrganizationProjects()(*bool) @@ -829,6 +857,7 @@ type ItemWithOrgPatchRequestBodyable interface { SetDependabotAlertsEnabledForNewRepositories(value *bool)() SetDependabotSecurityUpdatesEnabledForNewRepositories(value *bool)() SetDependencyGraphEnabledForNewRepositories(value *bool)() + SetDeployKeysEnabledForRepositories(value *bool)() SetDescription(value *string)() SetEmail(value *string)() SetHasOrganizationProjects(value *bool)() From 4924c3f817d51f15656d5781226164ea5caa2efa Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 7 Nov 2024 00:09:27 +0000 Subject: [PATCH 02/14] New updates to generated code --- .../item_copilot_usage_request_builder.go | 6 +- pkg/github/kiota-lock.json | 2 +- ...dependency_graph_spdx_sbom_escaped_sbom.go | 99 +++++++++---- ...sbom_escaped_sbom_escaped_relationships.go | 138 ++++++++++++++++++ 4 files changed, 209 insertions(+), 36 deletions(-) create mode 100644 pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom_escaped_relationships.go diff --git a/pkg/github/enterprises/item_copilot_usage_request_builder.go b/pkg/github/enterprises/item_copilot_usage_request_builder.go index 66a8d5ed..9f2d0db5 100644 --- a/pkg/github/enterprises/item_copilot_usage_request_builder.go +++ b/pkg/github/enterprises/item_copilot_usage_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemCopilotUsageRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. type ItemCopilotUsageRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -34,7 +34,7 @@ func NewItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7d urlParams["request-raw-url"] = rawUrl return NewItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a []CopilotUsageMetricsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -66,7 +66,7 @@ func (m *ItemCopilotUsageRequestBuilder) Get(ctx context.Context, requestConfigu } return val, nil } -// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index b3cd2ab3..8a010c32 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "F295E6C4635B38A700004CD624468F132C5D2297BCBE742CA3D2D18048001711980E12595B66A25CE9B3DF5134DC253E24378BCAF73A6735615DA5336286A728", + "descriptionHash": "6EF5B0829FBA2898CFABEB2EC18D7D334A65B05ECCDA76F161E634281001836CAE4BB574D3BBBAC169572D44410B31922C594AA90BA20C9266C0F5423357CE42", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom.go b/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom.go index f283a716..7e11f6f6 100644 --- a/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom.go +++ b/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom.go @@ -7,18 +7,20 @@ import ( type DependencyGraphSpdxSbom_sbom struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // An optional comment about the SPDX document. + comment *string // The creationInfo property creationInfo DependencyGraphSpdxSbom_sbom_creationInfoable // The license under which the SPDX document is licensed. dataLicense *string - // The name of the repository that the SPDX document describes. - documentDescribes []string // The namespace for the SPDX document. documentNamespace *string // The name of the SPDX document. name *string // The packages property packages []DependencyGraphSpdxSbom_sbom_packagesable + // The relationships property + relationships []DependencyGraphSpdxSbom_sbom_relationshipsable // The SPDX identifier for the SPDX document. sPDXID *string // The version of the SPDX specification that this document conforms to. @@ -41,6 +43,11 @@ func CreateDependencyGraphSpdxSbom_sbomFromDiscriminatorValue(parseNode i878a80d func (m *DependencyGraphSpdxSbom_sbom) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetComment gets the comment property value. An optional comment about the SPDX document. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom) GetComment()(*string) { + return m.comment +} // GetCreationInfo gets the creationInfo property value. The creationInfo property // returns a DependencyGraphSpdxSbom_sbom_creationInfoable when successful func (m *DependencyGraphSpdxSbom_sbom) GetCreationInfo()(DependencyGraphSpdxSbom_sbom_creationInfoable) { @@ -51,11 +58,6 @@ func (m *DependencyGraphSpdxSbom_sbom) GetCreationInfo()(DependencyGraphSpdxSbom func (m *DependencyGraphSpdxSbom_sbom) GetDataLicense()(*string) { return m.dataLicense } -// GetDocumentDescribes gets the documentDescribes property value. The name of the repository that the SPDX document describes. -// returns a []string when successful -func (m *DependencyGraphSpdxSbom_sbom) GetDocumentDescribes()([]string) { - return m.documentDescribes -} // GetDocumentNamespace gets the documentNamespace property value. The namespace for the SPDX document. // returns a *string when successful func (m *DependencyGraphSpdxSbom_sbom) GetDocumentNamespace()(*string) { @@ -65,39 +67,33 @@ func (m *DependencyGraphSpdxSbom_sbom) GetDocumentNamespace()(*string) { // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *DependencyGraphSpdxSbom_sbom) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["creationInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateDependencyGraphSpdxSbom_sbom_creationInfoFromDiscriminatorValue) + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() if err != nil { return err } if val != nil { - m.SetCreationInfo(val.(DependencyGraphSpdxSbom_sbom_creationInfoable)) + m.SetComment(val) } return nil } - res["dataLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() + res["creationInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDependencyGraphSpdxSbom_sbom_creationInfoFromDiscriminatorValue) if err != nil { return err } if val != nil { - m.SetDataLicense(val) + m.SetCreationInfo(val.(DependencyGraphSpdxSbom_sbom_creationInfoable)) } return nil } - res["documentDescribes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetCollectionOfPrimitiveValues("string") + res["dataLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() if err != nil { return err } if val != nil { - res := make([]string, len(val)) - for i, v := range val { - if v != nil { - res[i] = *(v.(*string)) - } - } - m.SetDocumentDescribes(res) + m.SetDataLicense(val) } return nil } @@ -137,6 +133,22 @@ func (m *DependencyGraphSpdxSbom_sbom) GetFieldDeserializers()(map[string]func(i } return nil } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDependencyGraphSpdxSbom_sbom_relationshipsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DependencyGraphSpdxSbom_sbom_relationshipsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(DependencyGraphSpdxSbom_sbom_relationshipsable) + } + } + m.SetRelationships(res) + } + return nil + } res["SPDXID"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -169,6 +181,11 @@ func (m *DependencyGraphSpdxSbom_sbom) GetName()(*string) { func (m *DependencyGraphSpdxSbom_sbom) GetPackages()([]DependencyGraphSpdxSbom_sbom_packagesable) { return m.packages } +// GetRelationships gets the relationships property value. The relationships property +// returns a []DependencyGraphSpdxSbom_sbom_relationshipsable when successful +func (m *DependencyGraphSpdxSbom_sbom) GetRelationships()([]DependencyGraphSpdxSbom_sbom_relationshipsable) { + return m.relationships +} // GetSPDXID gets the SPDXID property value. The SPDX identifier for the SPDX document. // returns a *string when successful func (m *DependencyGraphSpdxSbom_sbom) GetSPDXID()(*string) { @@ -182,19 +199,19 @@ func (m *DependencyGraphSpdxSbom_sbom) GetSpdxVersion()(*string) { // Serialize serializes information the current object func (m *DependencyGraphSpdxSbom_sbom) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { - err := writer.WriteObjectValue("creationInfo", m.GetCreationInfo()) + err := writer.WriteStringValue("comment", m.GetComment()) if err != nil { return err } } { - err := writer.WriteStringValue("dataLicense", m.GetDataLicense()) + err := writer.WriteObjectValue("creationInfo", m.GetCreationInfo()) if err != nil { return err } } - if m.GetDocumentDescribes() != nil { - err := writer.WriteCollectionOfStringValues("documentDescribes", m.GetDocumentDescribes()) + { + err := writer.WriteStringValue("dataLicense", m.GetDataLicense()) if err != nil { return err } @@ -223,6 +240,18 @@ func (m *DependencyGraphSpdxSbom_sbom) Serialize(writer i878a80d2330e89d26896388 return err } } + if m.GetRelationships() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRelationships())) + for i, v := range m.GetRelationships() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("relationships", cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("SPDXID", m.GetSPDXID()) if err != nil { @@ -247,6 +276,10 @@ func (m *DependencyGraphSpdxSbom_sbom) Serialize(writer i878a80d2330e89d26896388 func (m *DependencyGraphSpdxSbom_sbom) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetComment sets the comment property value. An optional comment about the SPDX document. +func (m *DependencyGraphSpdxSbom_sbom) SetComment(value *string)() { + m.comment = value +} // SetCreationInfo sets the creationInfo property value. The creationInfo property func (m *DependencyGraphSpdxSbom_sbom) SetCreationInfo(value DependencyGraphSpdxSbom_sbom_creationInfoable)() { m.creationInfo = value @@ -255,10 +288,6 @@ func (m *DependencyGraphSpdxSbom_sbom) SetCreationInfo(value DependencyGraphSpdx func (m *DependencyGraphSpdxSbom_sbom) SetDataLicense(value *string)() { m.dataLicense = value } -// SetDocumentDescribes sets the documentDescribes property value. The name of the repository that the SPDX document describes. -func (m *DependencyGraphSpdxSbom_sbom) SetDocumentDescribes(value []string)() { - m.documentDescribes = value -} // SetDocumentNamespace sets the documentNamespace property value. The namespace for the SPDX document. func (m *DependencyGraphSpdxSbom_sbom) SetDocumentNamespace(value *string)() { m.documentNamespace = value @@ -271,6 +300,10 @@ func (m *DependencyGraphSpdxSbom_sbom) SetName(value *string)() { func (m *DependencyGraphSpdxSbom_sbom) SetPackages(value []DependencyGraphSpdxSbom_sbom_packagesable)() { m.packages = value } +// SetRelationships sets the relationships property value. The relationships property +func (m *DependencyGraphSpdxSbom_sbom) SetRelationships(value []DependencyGraphSpdxSbom_sbom_relationshipsable)() { + m.relationships = value +} // SetSPDXID sets the SPDXID property value. The SPDX identifier for the SPDX document. func (m *DependencyGraphSpdxSbom_sbom) SetSPDXID(value *string)() { m.sPDXID = value @@ -282,20 +315,22 @@ func (m *DependencyGraphSpdxSbom_sbom) SetSpdxVersion(value *string)() { type DependencyGraphSpdxSbom_sbomable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) GetCreationInfo()(DependencyGraphSpdxSbom_sbom_creationInfoable) GetDataLicense()(*string) - GetDocumentDescribes()([]string) GetDocumentNamespace()(*string) GetName()(*string) GetPackages()([]DependencyGraphSpdxSbom_sbom_packagesable) + GetRelationships()([]DependencyGraphSpdxSbom_sbom_relationshipsable) GetSPDXID()(*string) GetSpdxVersion()(*string) + SetComment(value *string)() SetCreationInfo(value DependencyGraphSpdxSbom_sbom_creationInfoable)() SetDataLicense(value *string)() - SetDocumentDescribes(value []string)() SetDocumentNamespace(value *string)() SetName(value *string)() SetPackages(value []DependencyGraphSpdxSbom_sbom_packagesable)() + SetRelationships(value []DependencyGraphSpdxSbom_sbom_relationshipsable)() SetSPDXID(value *string)() SetSpdxVersion(value *string)() } diff --git a/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom_escaped_relationships.go b/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom_escaped_relationships.go new file mode 100644 index 00000000..c95207b5 --- /dev/null +++ b/pkg/github/models/dependency_graph_spdx_sbom_escaped_sbom_escaped_relationships.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type DependencyGraphSpdxSbom_sbom_relationships struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The SPDX identifier of the package that is the target of the relationship. + relatedSpdxElement *string + // The type of relationship between the two SPDX elements. + relationshipType *string + // The SPDX identifier of the package that is the source of the relationship. + spdxElementId *string +} +// NewDependencyGraphSpdxSbom_sbom_relationships instantiates a new DependencyGraphSpdxSbom_sbom_relationships and sets the default values. +func NewDependencyGraphSpdxSbom_sbom_relationships()(*DependencyGraphSpdxSbom_sbom_relationships) { + m := &DependencyGraphSpdxSbom_sbom_relationships{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateDependencyGraphSpdxSbom_sbom_relationshipsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateDependencyGraphSpdxSbom_sbom_relationshipsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDependencyGraphSpdxSbom_sbom_relationships(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *DependencyGraphSpdxSbom_sbom_relationships) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *DependencyGraphSpdxSbom_sbom_relationships) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["relatedSpdxElement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelatedSpdxElement(val) + } + return nil + } + res["relationshipType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelationshipType(val) + } + return nil + } + res["spdxElementId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpdxElementId(val) + } + return nil + } + return res +} +// GetRelatedSpdxElement gets the relatedSpdxElement property value. The SPDX identifier of the package that is the target of the relationship. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_relationships) GetRelatedSpdxElement()(*string) { + return m.relatedSpdxElement +} +// GetRelationshipType gets the relationshipType property value. The type of relationship between the two SPDX elements. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_relationships) GetRelationshipType()(*string) { + return m.relationshipType +} +// GetSpdxElementId gets the spdxElementId property value. The SPDX identifier of the package that is the source of the relationship. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_relationships) GetSpdxElementId()(*string) { + return m.spdxElementId +} +// Serialize serializes information the current object +func (m *DependencyGraphSpdxSbom_sbom_relationships) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("relatedSpdxElement", m.GetRelatedSpdxElement()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("relationshipType", m.GetRelationshipType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spdxElementId", m.GetSpdxElementId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DependencyGraphSpdxSbom_sbom_relationships) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRelatedSpdxElement sets the relatedSpdxElement property value. The SPDX identifier of the package that is the target of the relationship. +func (m *DependencyGraphSpdxSbom_sbom_relationships) SetRelatedSpdxElement(value *string)() { + m.relatedSpdxElement = value +} +// SetRelationshipType sets the relationshipType property value. The type of relationship between the two SPDX elements. +func (m *DependencyGraphSpdxSbom_sbom_relationships) SetRelationshipType(value *string)() { + m.relationshipType = value +} +// SetSpdxElementId sets the spdxElementId property value. The SPDX identifier of the package that is the source of the relationship. +func (m *DependencyGraphSpdxSbom_sbom_relationships) SetSpdxElementId(value *string)() { + m.spdxElementId = value +} +type DependencyGraphSpdxSbom_sbom_relationshipsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRelatedSpdxElement()(*string) + GetRelationshipType()(*string) + GetSpdxElementId()(*string) + SetRelatedSpdxElement(value *string)() + SetRelationshipType(value *string)() + SetSpdxElementId(value *string)() +} From deb30d3f3b46135f13d4cc04edb958d12e00ea33 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 8 Nov 2024 00:09:17 +0000 Subject: [PATCH 03/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/enterprise_team.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 8a010c32..e556a73f 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "6EF5B0829FBA2898CFABEB2EC18D7D334A65B05ECCDA76F161E634281001836CAE4BB574D3BBBAC169572D44410B31922C594AA90BA20C9266C0F5423357CE42", + "descriptionHash": "192FF0E68BFCECD544F385CFE30A1F0C4C603CA47F8EC874C4A1DA4DA77F8C0EB599E619241DC8C87822B7BB04BB992B810942432572656BECD68CC7D6AA04B3", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/enterprise_team.go b/pkg/github/models/enterprise_team.go index 18aa97bb..0aa436cb 100644 --- a/pkg/github/models/enterprise_team.go +++ b/pkg/github/models/enterprise_team.go @@ -12,7 +12,7 @@ type EnterpriseTeam struct { // The created_at property created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The group_id property - group_id *int32 + group_id *string // The html_url property html_url *string // The id property @@ -67,7 +67,7 @@ func (m *EnterpriseTeam) GetFieldDeserializers()(map[string]func(i878a80d2330e89 return nil } res["group_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetStringValue() if err != nil { return err } @@ -159,8 +159,8 @@ func (m *EnterpriseTeam) GetFieldDeserializers()(map[string]func(i878a80d2330e89 return res } // GetGroupId gets the group_id property value. The group_id property -// returns a *int32 when successful -func (m *EnterpriseTeam) GetGroupId()(*int32) { +// returns a *string when successful +func (m *EnterpriseTeam) GetGroupId()(*string) { return m.group_id } // GetHtmlUrl gets the html_url property value. The html_url property @@ -212,7 +212,7 @@ func (m *EnterpriseTeam) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a } } { - err := writer.WriteInt32Value("group_id", m.GetGroupId()) + err := writer.WriteStringValue("group_id", m.GetGroupId()) if err != nil { return err } @@ -282,7 +282,7 @@ func (m *EnterpriseTeam) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6 m.created_at = value } // SetGroupId sets the group_id property value. The group_id property -func (m *EnterpriseTeam) SetGroupId(value *int32)() { +func (m *EnterpriseTeam) SetGroupId(value *string)() { m.group_id = value } // SetHtmlUrl sets the html_url property value. The html_url property @@ -321,7 +321,7 @@ type EnterpriseTeamable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) - GetGroupId()(*int32) + GetGroupId()(*string) GetHtmlUrl()(*string) GetId()(*int64) GetMembersUrl()(*string) @@ -331,7 +331,7 @@ type EnterpriseTeamable interface { GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetUrl()(*string) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() - SetGroupId(value *int32)() + SetGroupId(value *string)() SetHtmlUrl(value *string)() SetId(value *int64)() SetMembersUrl(value *string)() From 09cb50ff5f3fc27acfdda3a8c3eb6a4ca3c79a31 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 14 Nov 2024 00:09:25 +0000 Subject: [PATCH 04/14] New updates to generated code --- ...m_access_escaped_tokens_request_builder.go | 4 +- pkg/github/kiota-lock.json | 2 +- pkg/github/models/custom_property.go | 30 +++++++ ...om_property_escaped_source_escaped_type.go | 34 ++++++++ pkg/github/models/organization_role.go | 60 +++++++++++++ ...nization_role_escaped_base_escaped_role.go | 43 +++++++++ .../organization_role_escaped_source.go | 37 ++++++++ .../organization_secret_scanning_alert.go | 87 +++++++++++++++++++ pkg/github/models/secret_scanning_alert.go | 87 +++++++++++++++++++ pkg/github/models/team_role_assignment.go | 30 +++++++ ...team_role_assignment_escaped_assignment.go | 37 ++++++++ pkg/github/models/user_role_assignment.go | 71 +++++++++++++++ ...user_role_assignment_escaped_assignment.go | 37 ++++++++ ...with_asset_escaped_item_request_builder.go | 4 +- 14 files changed, 558 insertions(+), 5 deletions(-) create mode 100644 pkg/github/models/custom_property_escaped_source_escaped_type.go create mode 100644 pkg/github/models/organization_role_escaped_base_escaped_role.go create mode 100644 pkg/github/models/organization_role_escaped_source.go create mode 100644 pkg/github/models/team_role_assignment_escaped_assignment.go create mode 100644 pkg/github/models/user_role_assignment_escaped_assignment.go diff --git a/pkg/github/app/installations_item_access_escaped_tokens_request_builder.go b/pkg/github/app/installations_item_access_escaped_tokens_request_builder.go index 12378017..d0f49ca5 100644 --- a/pkg/github/app/installations_item_access_escaped_tokens_request_builder.go +++ b/pkg/github/app/installations_item_access_escaped_tokens_request_builder.go @@ -23,7 +23,7 @@ func NewInstallationsItemAccess_tokensRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewInstallationsItemAccess_tokensRequestBuilderInternal(urlParams, requestAdapter) } -// Post creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// Post creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. // returns a InstallationTokenable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *InstallationsItemAccess_tokensRequestBuilder) Post(ctx context.Context, } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.InstallationTokenable), nil } -// ToPostRequestInformation creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. +// ToPostRequestInformation creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. // returns a *RequestInformation when successful func (m *InstallationsItemAccess_tokensRequestBuilder) ToPostRequestInformation(ctx context.Context, body InstallationsItemAccess_tokensPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index e556a73f..8e0344fc 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "192FF0E68BFCECD544F385CFE30A1F0C4C603CA47F8EC874C4A1DA4DA77F8C0EB599E619241DC8C87822B7BB04BB992B810942432572656BECD68CC7D6AA04B3", + "descriptionHash": "1F2E3F16AD1164BC535473DE8FBF3FF0C773EEADF2589BC3277A7DEB78306F57E6708CF83716C4FDD5A91263A32EDB7A21EDB69FF5E06DBEA1B7062EFD818839", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/custom_property.go b/pkg/github/models/custom_property.go index f661f497..0b24478e 100644 --- a/pkg/github/models/custom_property.go +++ b/pkg/github/models/custom_property.go @@ -18,6 +18,8 @@ type CustomProperty struct { property_name *string // Whether the property is required. required *bool + // The source type of the property + source_type *CustomProperty_source_type // The URL that can be used to fetch, update, or delete info about this property via the API. url *string // The type of the value for the property @@ -217,6 +219,16 @@ func (m *CustomProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89 } return nil } + res["source_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCustomProperty_source_type) + if err != nil { + return err + } + if val != nil { + m.SetSourceType(val.(*CustomProperty_source_type)) + } + return nil + } res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -259,6 +271,11 @@ func (m *CustomProperty) GetPropertyName()(*string) { func (m *CustomProperty) GetRequired()(*bool) { return m.required } +// GetSourceType gets the source_type property value. The source type of the property +// returns a *CustomProperty_source_type when successful +func (m *CustomProperty) GetSourceType()(*CustomProperty_source_type) { + return m.source_type +} // GetUrl gets the url property value. The URL that can be used to fetch, update, or delete info about this property via the API. // returns a *string when successful func (m *CustomProperty) GetUrl()(*string) { @@ -306,6 +323,13 @@ func (m *CustomProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a return err } } + if m.GetSourceType() != nil { + cast := (*m.GetSourceType()).String() + err := writer.WriteStringValue("source_type", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("url", m.GetUrl()) if err != nil { @@ -358,6 +382,10 @@ func (m *CustomProperty) SetPropertyName(value *string)() { func (m *CustomProperty) SetRequired(value *bool)() { m.required = value } +// SetSourceType sets the source_type property value. The source type of the property +func (m *CustomProperty) SetSourceType(value *CustomProperty_source_type)() { + m.source_type = value +} // SetUrl sets the url property value. The URL that can be used to fetch, update, or delete info about this property via the API. func (m *CustomProperty) SetUrl(value *string)() { m.url = value @@ -378,6 +406,7 @@ type CustomPropertyable interface { GetDescription()(*string) GetPropertyName()(*string) GetRequired()(*bool) + GetSourceType()(*CustomProperty_source_type) GetUrl()(*string) GetValuesEditableBy()(*CustomProperty_values_editable_by) GetValueType()(*CustomProperty_value_type) @@ -386,6 +415,7 @@ type CustomPropertyable interface { SetDescription(value *string)() SetPropertyName(value *string)() SetRequired(value *bool)() + SetSourceType(value *CustomProperty_source_type)() SetUrl(value *string)() SetValuesEditableBy(value *CustomProperty_values_editable_by)() SetValueType(value *CustomProperty_value_type)() diff --git a/pkg/github/models/custom_property_escaped_source_escaped_type.go b/pkg/github/models/custom_property_escaped_source_escaped_type.go new file mode 100644 index 00000000..3b0b9c62 --- /dev/null +++ b/pkg/github/models/custom_property_escaped_source_escaped_type.go @@ -0,0 +1,34 @@ +package models +// The source type of the property +type CustomProperty_source_type int + +const ( + ORGANIZATION_CUSTOMPROPERTY_SOURCE_TYPE CustomProperty_source_type = iota + ENTERPRISE_CUSTOMPROPERTY_SOURCE_TYPE +) + +func (i CustomProperty_source_type) String() string { + return []string{"organization", "enterprise"}[i] +} +func ParseCustomProperty_source_type(v string) (any, error) { + result := ORGANIZATION_CUSTOMPROPERTY_SOURCE_TYPE + switch v { + case "organization": + result = ORGANIZATION_CUSTOMPROPERTY_SOURCE_TYPE + case "enterprise": + result = ENTERPRISE_CUSTOMPROPERTY_SOURCE_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeCustomProperty_source_type(values []CustomProperty_source_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CustomProperty_source_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_role.go b/pkg/github/models/organization_role.go index db45a281..4e84422b 100644 --- a/pkg/github/models/organization_role.go +++ b/pkg/github/models/organization_role.go @@ -9,6 +9,8 @@ import ( type OrganizationRole struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // The system role from which this role inherits permissions. + base_role *OrganizationRole_base_role // The date and time the role was created. created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // A short description about who this role is for or what permissions it grants. @@ -21,6 +23,8 @@ type OrganizationRole struct { organization NullableSimpleUserable // A list of permissions included in this role. permissions []string + // Source answers the question, "where did this role come from?" + source *OrganizationRole_source // The date and time the role was last updated. updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time } @@ -41,6 +45,11 @@ func CreateOrganizationRoleFromDiscriminatorValue(parseNode i878a80d2330e89d2689 func (m *OrganizationRole) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetBaseRole gets the base_role property value. The system role from which this role inherits permissions. +// returns a *OrganizationRole_base_role when successful +func (m *OrganizationRole) GetBaseRole()(*OrganizationRole_base_role) { + return m.base_role +} // GetCreatedAt gets the created_at property value. The date and time the role was created. // returns a *Time when successful func (m *OrganizationRole) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { @@ -55,6 +64,16 @@ func (m *OrganizationRole) GetDescription()(*string) { // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *OrganizationRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["base_role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationRole_base_role) + if err != nil { + return err + } + if val != nil { + m.SetBaseRole(val.(*OrganizationRole_base_role)) + } + return nil + } res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { @@ -121,6 +140,16 @@ func (m *OrganizationRole) GetFieldDeserializers()(map[string]func(i878a80d2330e } return nil } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOrganizationRole_source) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*OrganizationRole_source)) + } + return nil + } res["updated_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { @@ -153,6 +182,11 @@ func (m *OrganizationRole) GetOrganization()(NullableSimpleUserable) { func (m *OrganizationRole) GetPermissions()([]string) { return m.permissions } +// GetSource gets the source property value. Source answers the question, "where did this role come from?" +// returns a *OrganizationRole_source when successful +func (m *OrganizationRole) GetSource()(*OrganizationRole_source) { + return m.source +} // GetUpdatedAt gets the updated_at property value. The date and time the role was last updated. // returns a *Time when successful func (m *OrganizationRole) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { @@ -160,6 +194,13 @@ func (m *OrganizationRole) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3 } // Serialize serializes information the current object func (m *OrganizationRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBaseRole() != nil { + cast := (*m.GetBaseRole()).String() + err := writer.WriteStringValue("base_role", &cast) + if err != nil { + return err + } + } { err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) if err != nil { @@ -196,6 +237,13 @@ func (m *OrganizationRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b return err } } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err := writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } { err := writer.WriteTimeValue("updated_at", m.GetUpdatedAt()) if err != nil { @@ -214,6 +262,10 @@ func (m *OrganizationRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b func (m *OrganizationRole) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetBaseRole sets the base_role property value. The system role from which this role inherits permissions. +func (m *OrganizationRole) SetBaseRole(value *OrganizationRole_base_role)() { + m.base_role = value +} // SetCreatedAt sets the created_at property value. The date and time the role was created. func (m *OrganizationRole) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.created_at = value @@ -238,6 +290,10 @@ func (m *OrganizationRole) SetOrganization(value NullableSimpleUserable)() { func (m *OrganizationRole) SetPermissions(value []string)() { m.permissions = value } +// SetSource sets the source property value. Source answers the question, "where did this role come from?" +func (m *OrganizationRole) SetSource(value *OrganizationRole_source)() { + m.source = value +} // SetUpdatedAt sets the updated_at property value. The date and time the role was last updated. func (m *OrganizationRole) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.updated_at = value @@ -245,18 +301,22 @@ func (m *OrganizationRole) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6 type OrganizationRoleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseRole()(*OrganizationRole_base_role) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDescription()(*string) GetId()(*int64) GetName()(*string) GetOrganization()(NullableSimpleUserable) GetPermissions()([]string) + GetSource()(*OrganizationRole_source) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetBaseRole(value *OrganizationRole_base_role)() SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDescription(value *string)() SetId(value *int64)() SetName(value *string)() SetOrganization(value NullableSimpleUserable)() SetPermissions(value []string)() + SetSource(value *OrganizationRole_source)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() } diff --git a/pkg/github/models/organization_role_escaped_base_escaped_role.go b/pkg/github/models/organization_role_escaped_base_escaped_role.go new file mode 100644 index 00000000..951af6f8 --- /dev/null +++ b/pkg/github/models/organization_role_escaped_base_escaped_role.go @@ -0,0 +1,43 @@ +package models +// The system role from which this role inherits permissions. +type OrganizationRole_base_role int + +const ( + READ_ORGANIZATIONROLE_BASE_ROLE OrganizationRole_base_role = iota + TRIAGE_ORGANIZATIONROLE_BASE_ROLE + WRITE_ORGANIZATIONROLE_BASE_ROLE + MAINTAIN_ORGANIZATIONROLE_BASE_ROLE + ADMIN_ORGANIZATIONROLE_BASE_ROLE +) + +func (i OrganizationRole_base_role) String() string { + return []string{"read", "triage", "write", "maintain", "admin"}[i] +} +func ParseOrganizationRole_base_role(v string) (any, error) { + result := READ_ORGANIZATIONROLE_BASE_ROLE + switch v { + case "read": + result = READ_ORGANIZATIONROLE_BASE_ROLE + case "triage": + result = TRIAGE_ORGANIZATIONROLE_BASE_ROLE + case "write": + result = WRITE_ORGANIZATIONROLE_BASE_ROLE + case "maintain": + result = MAINTAIN_ORGANIZATIONROLE_BASE_ROLE + case "admin": + result = ADMIN_ORGANIZATIONROLE_BASE_ROLE + default: + return nil, nil + } + return &result, nil +} +func SerializeOrganizationRole_base_role(values []OrganizationRole_base_role) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationRole_base_role) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_role_escaped_source.go b/pkg/github/models/organization_role_escaped_source.go new file mode 100644 index 00000000..380c1968 --- /dev/null +++ b/pkg/github/models/organization_role_escaped_source.go @@ -0,0 +1,37 @@ +package models +// Source answers the question, "where did this role come from?" +type OrganizationRole_source int + +const ( + ORGANIZATION_ORGANIZATIONROLE_SOURCE OrganizationRole_source = iota + ENTERPRISE_ORGANIZATIONROLE_SOURCE + PREDEFINED_ORGANIZATIONROLE_SOURCE +) + +func (i OrganizationRole_source) String() string { + return []string{"Organization", "Enterprise", "Predefined"}[i] +} +func ParseOrganizationRole_source(v string) (any, error) { + result := ORGANIZATION_ORGANIZATIONROLE_SOURCE + switch v { + case "Organization": + result = ORGANIZATION_ORGANIZATIONROLE_SOURCE + case "Enterprise": + result = ENTERPRISE_ORGANIZATIONROLE_SOURCE + case "Predefined": + result = PREDEFINED_ORGANIZATIONROLE_SOURCE + default: + return nil, nil + } + return &result, nil +} +func SerializeOrganizationRole_source(values []OrganizationRole_source) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i OrganizationRole_source) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/organization_secret_scanning_alert.go b/pkg/github/models/organization_secret_scanning_alert.go index 6971742e..ad0fddcc 100644 --- a/pkg/github/models/organization_secret_scanning_alert.go +++ b/pkg/github/models/organization_secret_scanning_alert.go @@ -20,6 +20,12 @@ type OrganizationSecretScanningAlert struct { number *int32 // Whether the secret was publicly leaked. publicly_leaked *bool + // An optional comment when requesting a push protection bypass. + push_protection_bypass_request_comment *string + // The URL to a push protection bypass request. + push_protection_bypass_request_html_url *string + // A GitHub user. + push_protection_bypass_request_reviewer NullableSimpleUserable // Whether push protection was bypassed for the detected secret. push_protection_bypassed *bool // The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. @@ -137,6 +143,36 @@ func (m *OrganizationSecretScanningAlert) GetFieldDeserializers()(map[string]fun } return nil } + res["push_protection_bypass_request_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassRequestComment(val) + } + return nil + } + res["push_protection_bypass_request_html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassRequestHtmlUrl(val) + } + return nil + } + res["push_protection_bypass_request_reviewer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassRequestReviewer(val.(NullableSimpleUserable)) + } + return nil + } res["push_protection_bypassed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -329,6 +365,21 @@ func (m *OrganizationSecretScanningAlert) GetPushProtectionBypassedAt()(*i336074 func (m *OrganizationSecretScanningAlert) GetPushProtectionBypassedBy()(NullableSimpleUserable) { return m.push_protection_bypassed_by } +// GetPushProtectionBypassRequestComment gets the push_protection_bypass_request_comment property value. An optional comment when requesting a push protection bypass. +// returns a *string when successful +func (m *OrganizationSecretScanningAlert) GetPushProtectionBypassRequestComment()(*string) { + return m.push_protection_bypass_request_comment +} +// GetPushProtectionBypassRequestHtmlUrl gets the push_protection_bypass_request_html_url property value. The URL to a push protection bypass request. +// returns a *string when successful +func (m *OrganizationSecretScanningAlert) GetPushProtectionBypassRequestHtmlUrl()(*string) { + return m.push_protection_bypass_request_html_url +} +// GetPushProtectionBypassRequestReviewer gets the push_protection_bypass_request_reviewer property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *OrganizationSecretScanningAlert) GetPushProtectionBypassRequestReviewer()(NullableSimpleUserable) { + return m.push_protection_bypass_request_reviewer +} // GetRepository gets the repository property value. A GitHub repository. // returns a SimpleRepositoryable when successful func (m *OrganizationSecretScanningAlert) GetRepository()(SimpleRepositoryable) { @@ -427,6 +478,24 @@ func (m *OrganizationSecretScanningAlert) Serialize(writer i878a80d2330e89d26896 return err } } + { + err := writer.WriteStringValue("push_protection_bypass_request_comment", m.GetPushProtectionBypassRequestComment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("push_protection_bypass_request_html_url", m.GetPushProtectionBypassRequestHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("push_protection_bypass_request_reviewer", m.GetPushProtectionBypassRequestReviewer()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("repository", m.GetRepository()) if err != nil { @@ -538,6 +607,18 @@ func (m *OrganizationSecretScanningAlert) SetPushProtectionBypassedAt(value *i33 func (m *OrganizationSecretScanningAlert) SetPushProtectionBypassedBy(value NullableSimpleUserable)() { m.push_protection_bypassed_by = value } +// SetPushProtectionBypassRequestComment sets the push_protection_bypass_request_comment property value. An optional comment when requesting a push protection bypass. +func (m *OrganizationSecretScanningAlert) SetPushProtectionBypassRequestComment(value *string)() { + m.push_protection_bypass_request_comment = value +} +// SetPushProtectionBypassRequestHtmlUrl sets the push_protection_bypass_request_html_url property value. The URL to a push protection bypass request. +func (m *OrganizationSecretScanningAlert) SetPushProtectionBypassRequestHtmlUrl(value *string)() { + m.push_protection_bypass_request_html_url = value +} +// SetPushProtectionBypassRequestReviewer sets the push_protection_bypass_request_reviewer property value. A GitHub user. +func (m *OrganizationSecretScanningAlert) SetPushProtectionBypassRequestReviewer(value NullableSimpleUserable)() { + m.push_protection_bypass_request_reviewer = value +} // SetRepository sets the repository property value. A GitHub repository. func (m *OrganizationSecretScanningAlert) SetRepository(value SimpleRepositoryable)() { m.repository = value @@ -598,6 +679,9 @@ type OrganizationSecretScanningAlertable interface { GetPushProtectionBypassed()(*bool) GetPushProtectionBypassedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetPushProtectionBypassedBy()(NullableSimpleUserable) + GetPushProtectionBypassRequestComment()(*string) + GetPushProtectionBypassRequestHtmlUrl()(*string) + GetPushProtectionBypassRequestReviewer()(NullableSimpleUserable) GetRepository()(SimpleRepositoryable) GetResolution()(*SecretScanningAlertResolution) GetResolutionComment()(*string) @@ -619,6 +703,9 @@ type OrganizationSecretScanningAlertable interface { SetPushProtectionBypassed(value *bool)() SetPushProtectionBypassedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetPushProtectionBypassedBy(value NullableSimpleUserable)() + SetPushProtectionBypassRequestComment(value *string)() + SetPushProtectionBypassRequestHtmlUrl(value *string)() + SetPushProtectionBypassRequestReviewer(value NullableSimpleUserable)() SetRepository(value SimpleRepositoryable)() SetResolution(value *SecretScanningAlertResolution)() SetResolutionComment(value *string)() diff --git a/pkg/github/models/secret_scanning_alert.go b/pkg/github/models/secret_scanning_alert.go index 6a302f00..5664dcfc 100644 --- a/pkg/github/models/secret_scanning_alert.go +++ b/pkg/github/models/secret_scanning_alert.go @@ -20,6 +20,12 @@ type SecretScanningAlert struct { number *int32 // Whether the detected secret was publicly leaked. publicly_leaked *bool + // An optional comment when requesting a push protection bypass. + push_protection_bypass_request_comment *string + // The URL to a push protection bypass request. + push_protection_bypass_request_html_url *string + // A GitHub user. + push_protection_bypass_request_reviewer NullableSimpleUserable // Whether push protection was bypassed for the detected secret. push_protection_bypassed *bool // The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. @@ -135,6 +141,36 @@ func (m *SecretScanningAlert) GetFieldDeserializers()(map[string]func(i878a80d23 } return nil } + res["push_protection_bypass_request_comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassRequestComment(val) + } + return nil + } + res["push_protection_bypass_request_html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassRequestHtmlUrl(val) + } + return nil + } + res["push_protection_bypass_request_reviewer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNullableSimpleUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPushProtectionBypassRequestReviewer(val.(NullableSimpleUserable)) + } + return nil + } res["push_protection_bypassed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -317,6 +353,21 @@ func (m *SecretScanningAlert) GetPushProtectionBypassedAt()(*i336074805fc853987a func (m *SecretScanningAlert) GetPushProtectionBypassedBy()(NullableSimpleUserable) { return m.push_protection_bypassed_by } +// GetPushProtectionBypassRequestComment gets the push_protection_bypass_request_comment property value. An optional comment when requesting a push protection bypass. +// returns a *string when successful +func (m *SecretScanningAlert) GetPushProtectionBypassRequestComment()(*string) { + return m.push_protection_bypass_request_comment +} +// GetPushProtectionBypassRequestHtmlUrl gets the push_protection_bypass_request_html_url property value. The URL to a push protection bypass request. +// returns a *string when successful +func (m *SecretScanningAlert) GetPushProtectionBypassRequestHtmlUrl()(*string) { + return m.push_protection_bypass_request_html_url +} +// GetPushProtectionBypassRequestReviewer gets the push_protection_bypass_request_reviewer property value. A GitHub user. +// returns a NullableSimpleUserable when successful +func (m *SecretScanningAlert) GetPushProtectionBypassRequestReviewer()(NullableSimpleUserable) { + return m.push_protection_bypass_request_reviewer +} // GetResolution gets the resolution property value. **Required when the `state` is `resolved`.** The reason for resolving the alert. // returns a *SecretScanningAlertResolution when successful func (m *SecretScanningAlert) GetResolution()(*SecretScanningAlertResolution) { @@ -410,6 +461,24 @@ func (m *SecretScanningAlert) Serialize(writer i878a80d2330e89d26896388a3f487eef return err } } + { + err := writer.WriteStringValue("push_protection_bypass_request_comment", m.GetPushProtectionBypassRequestComment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("push_protection_bypass_request_html_url", m.GetPushProtectionBypassRequestHtmlUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("push_protection_bypass_request_reviewer", m.GetPushProtectionBypassRequestReviewer()) + if err != nil { + return err + } + } if m.GetResolution() != nil { cast := (*m.GetResolution()).String() err := writer.WriteStringValue("resolution", &cast) @@ -515,6 +584,18 @@ func (m *SecretScanningAlert) SetPushProtectionBypassedAt(value *i336074805fc853 func (m *SecretScanningAlert) SetPushProtectionBypassedBy(value NullableSimpleUserable)() { m.push_protection_bypassed_by = value } +// SetPushProtectionBypassRequestComment sets the push_protection_bypass_request_comment property value. An optional comment when requesting a push protection bypass. +func (m *SecretScanningAlert) SetPushProtectionBypassRequestComment(value *string)() { + m.push_protection_bypass_request_comment = value +} +// SetPushProtectionBypassRequestHtmlUrl sets the push_protection_bypass_request_html_url property value. The URL to a push protection bypass request. +func (m *SecretScanningAlert) SetPushProtectionBypassRequestHtmlUrl(value *string)() { + m.push_protection_bypass_request_html_url = value +} +// SetPushProtectionBypassRequestReviewer sets the push_protection_bypass_request_reviewer property value. A GitHub user. +func (m *SecretScanningAlert) SetPushProtectionBypassRequestReviewer(value NullableSimpleUserable)() { + m.push_protection_bypass_request_reviewer = value +} // SetResolution sets the resolution property value. **Required when the `state` is `resolved`.** The reason for resolving the alert. func (m *SecretScanningAlert) SetResolution(value *SecretScanningAlertResolution)() { m.resolution = value @@ -571,6 +652,9 @@ type SecretScanningAlertable interface { GetPushProtectionBypassed()(*bool) GetPushProtectionBypassedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetPushProtectionBypassedBy()(NullableSimpleUserable) + GetPushProtectionBypassRequestComment()(*string) + GetPushProtectionBypassRequestHtmlUrl()(*string) + GetPushProtectionBypassRequestReviewer()(NullableSimpleUserable) GetResolution()(*SecretScanningAlertResolution) GetResolutionComment()(*string) GetResolvedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -591,6 +675,9 @@ type SecretScanningAlertable interface { SetPushProtectionBypassed(value *bool)() SetPushProtectionBypassedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetPushProtectionBypassedBy(value NullableSimpleUserable)() + SetPushProtectionBypassRequestComment(value *string)() + SetPushProtectionBypassRequestHtmlUrl(value *string)() + SetPushProtectionBypassRequestReviewer(value NullableSimpleUserable)() SetResolution(value *SecretScanningAlertResolution)() SetResolutionComment(value *string)() SetResolvedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/models/team_role_assignment.go b/pkg/github/models/team_role_assignment.go index e51c85fc..5a017b0f 100644 --- a/pkg/github/models/team_role_assignment.go +++ b/pkg/github/models/team_role_assignment.go @@ -8,6 +8,8 @@ import ( type TeamRoleAssignment struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // Determines if the team has a direct, indirect, or mixed relationship to a role + assignment *TeamRoleAssignment_assignment // The description property description *string // The html_url property @@ -54,6 +56,11 @@ func CreateTeamRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26 func (m *TeamRoleAssignment) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetAssignment gets the assignment property value. Determines if the team has a direct, indirect, or mixed relationship to a role +// returns a *TeamRoleAssignment_assignment when successful +func (m *TeamRoleAssignment) GetAssignment()(*TeamRoleAssignment_assignment) { + return m.assignment +} // GetDescription gets the description property value. The description property // returns a *string when successful func (m *TeamRoleAssignment) GetDescription()(*string) { @@ -63,6 +70,16 @@ func (m *TeamRoleAssignment) GetDescription()(*string) { // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *TeamRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTeamRoleAssignment_assignment) + if err != nil { + return err + } + if val != nil { + m.SetAssignment(val.(*TeamRoleAssignment_assignment)) + } + return nil + } res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -272,6 +289,13 @@ func (m *TeamRoleAssignment) GetUrl()(*string) { } // Serialize serializes information the current object func (m *TeamRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignment() != nil { + cast := (*m.GetAssignment()).String() + err := writer.WriteStringValue("assignment", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("description", m.GetDescription()) if err != nil { @@ -368,6 +392,10 @@ func (m *TeamRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef2 func (m *TeamRoleAssignment) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetAssignment sets the assignment property value. Determines if the team has a direct, indirect, or mixed relationship to a role +func (m *TeamRoleAssignment) SetAssignment(value *TeamRoleAssignment_assignment)() { + m.assignment = value +} // SetDescription sets the description property value. The description property func (m *TeamRoleAssignment) SetDescription(value *string)() { m.description = value @@ -427,6 +455,7 @@ func (m *TeamRoleAssignment) SetUrl(value *string)() { type TeamRoleAssignmentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignment()(*TeamRoleAssignment_assignment) GetDescription()(*string) GetHtmlUrl()(*string) GetId()(*int32) @@ -441,6 +470,7 @@ type TeamRoleAssignmentable interface { GetRepositoriesUrl()(*string) GetSlug()(*string) GetUrl()(*string) + SetAssignment(value *TeamRoleAssignment_assignment)() SetDescription(value *string)() SetHtmlUrl(value *string)() SetId(value *int32)() diff --git a/pkg/github/models/team_role_assignment_escaped_assignment.go b/pkg/github/models/team_role_assignment_escaped_assignment.go new file mode 100644 index 00000000..3065790a --- /dev/null +++ b/pkg/github/models/team_role_assignment_escaped_assignment.go @@ -0,0 +1,37 @@ +package models +// Determines if the team has a direct, indirect, or mixed relationship to a role +type TeamRoleAssignment_assignment int + +const ( + DIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT TeamRoleAssignment_assignment = iota + INDIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT + MIXED_TEAMROLEASSIGNMENT_ASSIGNMENT +) + +func (i TeamRoleAssignment_assignment) String() string { + return []string{"direct", "indirect", "mixed"}[i] +} +func ParseTeamRoleAssignment_assignment(v string) (any, error) { + result := DIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT + switch v { + case "direct": + result = DIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT + case "indirect": + result = INDIRECT_TEAMROLEASSIGNMENT_ASSIGNMENT + case "mixed": + result = MIXED_TEAMROLEASSIGNMENT_ASSIGNMENT + default: + return nil, nil + } + return &result, nil +} +func SerializeTeamRoleAssignment_assignment(values []TeamRoleAssignment_assignment) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i TeamRoleAssignment_assignment) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/user_role_assignment.go b/pkg/github/models/user_role_assignment.go index 5194b0e6..23e47e28 100644 --- a/pkg/github/models/user_role_assignment.go +++ b/pkg/github/models/user_role_assignment.go @@ -8,6 +8,8 @@ import ( type UserRoleAssignment struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any + // Determines if the user has a direct, indirect, or mixed relationship to a role + assignment *UserRoleAssignment_assignment // The avatar_url property avatar_url *string // The email property @@ -26,6 +28,8 @@ type UserRoleAssignment struct { html_url *string // The id property id *int32 + // Team the user has gotten the role through + inherited_from []TeamSimpleable // The login property login *string // The name property @@ -70,6 +74,11 @@ func CreateUserRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26 func (m *UserRoleAssignment) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetAssignment gets the assignment property value. Determines if the user has a direct, indirect, or mixed relationship to a role +// returns a *UserRoleAssignment_assignment when successful +func (m *UserRoleAssignment) GetAssignment()(*UserRoleAssignment_assignment) { + return m.assignment +} // GetAvatarUrl gets the avatar_url property value. The avatar_url property // returns a *string when successful func (m *UserRoleAssignment) GetAvatarUrl()(*string) { @@ -89,6 +98,16 @@ func (m *UserRoleAssignment) GetEventsUrl()(*string) { // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UserRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserRoleAssignment_assignment) + if err != nil { + return err + } + if val != nil { + m.SetAssignment(val.(*UserRoleAssignment_assignment)) + } + return nil + } res["avatar_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -179,6 +198,22 @@ func (m *UserRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d233 } return nil } + res["inherited_from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamSimpleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamSimpleable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(TeamSimpleable) + } + } + m.SetInheritedFrom(res) + } + return nil + } res["login"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -341,6 +376,11 @@ func (m *UserRoleAssignment) GetHtmlUrl()(*string) { func (m *UserRoleAssignment) GetId()(*int32) { return m.id } +// GetInheritedFrom gets the inherited_from property value. Team the user has gotten the role through +// returns a []TeamSimpleable when successful +func (m *UserRoleAssignment) GetInheritedFrom()([]TeamSimpleable) { + return m.inherited_from +} // GetLogin gets the login property value. The login property // returns a *string when successful func (m *UserRoleAssignment) GetLogin()(*string) { @@ -408,6 +448,13 @@ func (m *UserRoleAssignment) GetUserViewType()(*string) { } // Serialize serializes information the current object func (m *UserRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignment() != nil { + cast := (*m.GetAssignment()).String() + err := writer.WriteStringValue("assignment", &cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("avatar_url", m.GetAvatarUrl()) if err != nil { @@ -462,6 +509,18 @@ func (m *UserRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef2 return err } } + if m.GetInheritedFrom() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInheritedFrom())) + for i, v := range m.GetInheritedFrom() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("inherited_from", cast) + if err != nil { + return err + } + } { err := writer.WriteStringValue("login", m.GetLogin()) if err != nil { @@ -552,6 +611,10 @@ func (m *UserRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef2 func (m *UserRoleAssignment) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetAssignment sets the assignment property value. Determines if the user has a direct, indirect, or mixed relationship to a role +func (m *UserRoleAssignment) SetAssignment(value *UserRoleAssignment_assignment)() { + m.assignment = value +} // SetAvatarUrl sets the avatar_url property value. The avatar_url property func (m *UserRoleAssignment) SetAvatarUrl(value *string)() { m.avatar_url = value @@ -588,6 +651,10 @@ func (m *UserRoleAssignment) SetHtmlUrl(value *string)() { func (m *UserRoleAssignment) SetId(value *int32)() { m.id = value } +// SetInheritedFrom sets the inherited_from property value. Team the user has gotten the role through +func (m *UserRoleAssignment) SetInheritedFrom(value []TeamSimpleable)() { + m.inherited_from = value +} // SetLogin sets the login property value. The login property func (m *UserRoleAssignment) SetLogin(value *string)() { m.login = value @@ -643,6 +710,7 @@ func (m *UserRoleAssignment) SetUserViewType(value *string)() { type UserRoleAssignmentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignment()(*UserRoleAssignment_assignment) GetAvatarUrl()(*string) GetEmail()(*string) GetEventsUrl()(*string) @@ -652,6 +720,7 @@ type UserRoleAssignmentable interface { GetGravatarId()(*string) GetHtmlUrl()(*string) GetId()(*int32) + GetInheritedFrom()([]TeamSimpleable) GetLogin()(*string) GetName()(*string) GetNodeId()(*string) @@ -665,6 +734,7 @@ type UserRoleAssignmentable interface { GetTypeEscaped()(*string) GetUrl()(*string) GetUserViewType()(*string) + SetAssignment(value *UserRoleAssignment_assignment)() SetAvatarUrl(value *string)() SetEmail(value *string)() SetEventsUrl(value *string)() @@ -674,6 +744,7 @@ type UserRoleAssignmentable interface { SetGravatarId(value *string)() SetHtmlUrl(value *string)() SetId(value *int32)() + SetInheritedFrom(value []TeamSimpleable)() SetLogin(value *string)() SetName(value *string)() SetNodeId(value *string)() diff --git a/pkg/github/models/user_role_assignment_escaped_assignment.go b/pkg/github/models/user_role_assignment_escaped_assignment.go new file mode 100644 index 00000000..8a2e96e8 --- /dev/null +++ b/pkg/github/models/user_role_assignment_escaped_assignment.go @@ -0,0 +1,37 @@ +package models +// Determines if the user has a direct, indirect, or mixed relationship to a role +type UserRoleAssignment_assignment int + +const ( + DIRECT_USERROLEASSIGNMENT_ASSIGNMENT UserRoleAssignment_assignment = iota + INDIRECT_USERROLEASSIGNMENT_ASSIGNMENT + MIXED_USERROLEASSIGNMENT_ASSIGNMENT +) + +func (i UserRoleAssignment_assignment) String() string { + return []string{"direct", "indirect", "mixed"}[i] +} +func ParseUserRoleAssignment_assignment(v string) (any, error) { + result := DIRECT_USERROLEASSIGNMENT_ASSIGNMENT + switch v { + case "direct": + result = DIRECT_USERROLEASSIGNMENT_ASSIGNMENT + case "indirect": + result = INDIRECT_USERROLEASSIGNMENT_ASSIGNMENT + case "mixed": + result = MIXED_USERROLEASSIGNMENT_ASSIGNMENT + default: + return nil, nil + } + return &result, nil +} +func SerializeUserRoleAssignment_assignment(values []UserRoleAssignment_assignment) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i UserRoleAssignment_assignment) isMultiValue() bool { + return false +} diff --git a/pkg/github/repos/item_item_releases_assets_with_asset_escaped_item_request_builder.go b/pkg/github/repos/item_item_releases_assets_with_asset_escaped_item_request_builder.go index ed76f876..c7af9e51 100644 --- a/pkg/github/repos/item_item_releases_assets_with_asset_escaped_item_request_builder.go +++ b/pkg/github/repos/item_item_releases_assets_with_asset_escaped_item_request_builder.go @@ -38,7 +38,7 @@ func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) Delete(ctx context. } return nil } -// Get to download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. +// Get to download the asset's binary content:- If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.- Alternatively, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. // returns a ReleaseAssetable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -86,7 +86,7 @@ func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) ToDeleteRequestInfo i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) return requestInfo, nil } -// ToGetRequestInformation to download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. +// ToGetRequestInformation to download the asset's binary content:- If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.- Alternatively, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. // returns a *RequestInformation when successful func (m *ItemItemReleasesAssetsWithAsset_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) From 219bc35a592e5214b29ff161598cdd1633711cdd Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Wed, 20 Nov 2024 00:09:49 +0000 Subject: [PATCH 05/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- ...te_stats_item_with_actor_escaped_item_request_builder.go | 6 +++--- .../orgs/item_insights_api_subject_stats_request_builder.go | 6 +++--- ...ry_stats_item_with_actor_escaped_item_request_builder.go | 6 +++--- .../orgs/item_insights_api_summary_stats_request_builder.go | 6 +++--- ...ry_stats_users_with_user_escaped_item_request_builder.go | 6 +++--- ...me_stats_item_with_actor_escaped_item_request_builder.go | 6 +++--- .../orgs/item_insights_api_time_stats_request_builder.go | 6 +++--- ...me_stats_users_with_user_escaped_item_request_builder.go | 6 +++--- ...api_user_stats_with_user_escaped_item_request_builder.go | 6 +++--- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 8e0344fc..8425376e 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "1F2E3F16AD1164BC535473DE8FBF3FF0C773EEADF2589BC3277A7DEB78306F57E6708CF83716C4FDD5A91263A32EDB7A21EDB69FF5E06DBEA1B7062EFD818839", + "descriptionHash": "CDEF6C3DAC0E0FEF9CD50CECF39A8E9192F22D889C522151D331319FC11F45E2805F96C590C59D6766503A18665DB53F820E59879C0ECAC12B40A270EB42D897", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go index 2858f356..6bc11ae3 100644 --- a/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go @@ -15,9 +15,9 @@ type ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder struct { type ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderGetQueryParameters struct { // The direction to sort the results by. Direction *i668a5d59a0d5a0e25bc1604cf7a50b2d949f1e3f49a4c9ec4b197e7a9b3d7b0a.GetDirectionQueryParameterType `uriparametername:"direction"` - // The maximum timestamp to query for stats + // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Max_timestamp *string `uriparametername:"max_timestamp"` - // The minimum timestamp to query for stats + // The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Min_timestamp *string `uriparametername:"min_timestamp"` // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -29,7 +29,7 @@ type ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderGetQueryParameters // NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderInternal instantiates a new ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder and sets the default values. func NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder) { m := &ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go b/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go index 40a917ea..21bccdc2 100644 --- a/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go +++ b/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go @@ -15,9 +15,9 @@ type ItemInsightsApiSubjectStatsRequestBuilder struct { type ItemInsightsApiSubjectStatsRequestBuilderGetQueryParameters struct { // The direction to sort the results by. Direction *i66b1523c4c4ef510ea098d616fe90f80d2679e0386fabfe6a2f1742954997624.GetDirectionQueryParameterType `uriparametername:"direction"` - // The maximum timestamp to query for stats + // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Max_timestamp *string `uriparametername:"max_timestamp"` - // The minimum timestamp to query for stats + // The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Min_timestamp *string `uriparametername:"min_timestamp"` // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -29,7 +29,7 @@ type ItemInsightsApiSubjectStatsRequestBuilderGetQueryParameters struct { // NewItemInsightsApiSubjectStatsRequestBuilderInternal instantiates a new ItemInsightsApiSubjectStatsRequestBuilder and sets the default values. func NewItemInsightsApiSubjectStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSubjectStatsRequestBuilder) { m := &ItemInsightsApiSubjectStatsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_summary_stats_item_with_actor_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_summary_stats_item_with_actor_escaped_item_request_builder.go index c2fbf967..dd7fcef3 100644 --- a/pkg/github/orgs/item_insights_api_summary_stats_item_with_actor_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_insights_api_summary_stats_item_with_actor_escaped_item_request_builder.go @@ -12,15 +12,15 @@ type ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder struct { } // ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderGetQueryParameters get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. type ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderGetQueryParameters struct { - // The maximum timestamp to query for stats + // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Max_timestamp *string `uriparametername:"max_timestamp"` - // The minimum timestamp to query for stats + // The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Min_timestamp *string `uriparametername:"min_timestamp"` } // NewItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderInternal instantiates a new ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder and sets the default values. func NewItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder) { m := &ItemInsightsApiSummaryStatsItemWithActor_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&max_timestamp*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_summary_stats_request_builder.go b/pkg/github/orgs/item_insights_api_summary_stats_request_builder.go index 4d0af031..68ede787 100644 --- a/pkg/github/orgs/item_insights_api_summary_stats_request_builder.go +++ b/pkg/github/orgs/item_insights_api_summary_stats_request_builder.go @@ -12,9 +12,9 @@ type ItemInsightsApiSummaryStatsRequestBuilder struct { } // ItemInsightsApiSummaryStatsRequestBuilderGetQueryParameters get overall statistics of API requests made within an organization by all users and apps within a specified time frame. type ItemInsightsApiSummaryStatsRequestBuilderGetQueryParameters struct { - // The maximum timestamp to query for stats + // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Max_timestamp *string `uriparametername:"max_timestamp"` - // The minimum timestamp to query for stats + // The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Min_timestamp *string `uriparametername:"min_timestamp"` } // ByActor_type gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.insights.api.summaryStats.item collection @@ -32,7 +32,7 @@ func (m *ItemInsightsApiSummaryStatsRequestBuilder) ByActor_type(actor_type stri // NewItemInsightsApiSummaryStatsRequestBuilderInternal instantiates a new ItemInsightsApiSummaryStatsRequestBuilder and sets the default values. func NewItemInsightsApiSummaryStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsRequestBuilder) { m := &ItemInsightsApiSummaryStatsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats?min_timestamp={min_timestamp}{&max_timestamp*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_summary_stats_users_with_user_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_summary_stats_users_with_user_escaped_item_request_builder.go index 38636532..9c59b805 100644 --- a/pkg/github/orgs/item_insights_api_summary_stats_users_with_user_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_insights_api_summary_stats_users_with_user_escaped_item_request_builder.go @@ -12,15 +12,15 @@ type ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder struct { } // ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderGetQueryParameters get overall statistics of API requests within the organization for a user. type ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderGetQueryParameters struct { - // The maximum timestamp to query for stats + // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Max_timestamp *string `uriparametername:"max_timestamp"` - // The minimum timestamp to query for stats + // The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Min_timestamp *string `uriparametername:"min_timestamp"` } // NewItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderInternal instantiates a new ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder and sets the default values. func NewItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder) { m := &ItemInsightsApiSummaryStatsUsersWithUser_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users/{user_id}?min_timestamp={min_timestamp}{&max_timestamp*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_time_stats_item_with_actor_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_time_stats_item_with_actor_escaped_item_request_builder.go index 160523c3..b040be3f 100644 --- a/pkg/github/orgs/item_insights_api_time_stats_item_with_actor_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_insights_api_time_stats_item_with_actor_escaped_item_request_builder.go @@ -12,9 +12,9 @@ type ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder struct { } // ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderGetQueryParameters get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. type ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderGetQueryParameters struct { - // The maximum timestamp to query for stats + // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Max_timestamp *string `uriparametername:"max_timestamp"` - // The minimum timestamp to query for stats + // The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Min_timestamp *string `uriparametername:"min_timestamp"` // The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) Timestamp_increment *string `uriparametername:"timestamp_increment"` @@ -22,7 +22,7 @@ type ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderGetQueryParameters // NewItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderInternal instantiates a new ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder and sets the default values. func NewItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder) { m := &ItemInsightsApiTimeStatsItemWithActor_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_time_stats_request_builder.go b/pkg/github/orgs/item_insights_api_time_stats_request_builder.go index abe64bce..5f9360a2 100644 --- a/pkg/github/orgs/item_insights_api_time_stats_request_builder.go +++ b/pkg/github/orgs/item_insights_api_time_stats_request_builder.go @@ -12,9 +12,9 @@ type ItemInsightsApiTimeStatsRequestBuilder struct { } // ItemInsightsApiTimeStatsRequestBuilderGetQueryParameters get the number of API requests and rate-limited requests made within an organization over a specified time period. type ItemInsightsApiTimeStatsRequestBuilderGetQueryParameters struct { - // The maximum timestamp to query for stats + // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Max_timestamp *string `uriparametername:"max_timestamp"` - // The minimum timestamp to query for stats + // The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Min_timestamp *string `uriparametername:"min_timestamp"` // The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) Timestamp_increment *string `uriparametername:"timestamp_increment"` @@ -34,7 +34,7 @@ func (m *ItemInsightsApiTimeStatsRequestBuilder) ByActor_type(actor_type string) // NewItemInsightsApiTimeStatsRequestBuilderInternal instantiates a new ItemInsightsApiTimeStatsRequestBuilder and sets the default values. func NewItemInsightsApiTimeStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsRequestBuilder) { m := &ItemInsightsApiTimeStatsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_time_stats_users_with_user_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_time_stats_users_with_user_escaped_item_request_builder.go index 7a67c3ee..f516f2a4 100644 --- a/pkg/github/orgs/item_insights_api_time_stats_users_with_user_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_insights_api_time_stats_users_with_user_escaped_item_request_builder.go @@ -12,9 +12,9 @@ type ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder struct { } // ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderGetQueryParameters get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. type ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderGetQueryParameters struct { - // The maximum timestamp to query for stats + // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Max_timestamp *string `uriparametername:"max_timestamp"` - // The minimum timestamp to query for stats + // The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Min_timestamp *string `uriparametername:"min_timestamp"` // The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) Timestamp_increment *string `uriparametername:"timestamp_increment"` @@ -22,7 +22,7 @@ type ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderGetQueryParameters // NewItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderInternal instantiates a new ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder and sets the default values. func NewItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder) { m := &ItemInsightsApiTimeStatsUsersWithUser_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users/{user_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go index b23e9a7d..a2dd5c07 100644 --- a/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go @@ -15,9 +15,9 @@ type ItemInsightsApiUserStatsWithUser_ItemRequestBuilder struct { type ItemInsightsApiUserStatsWithUser_ItemRequestBuilderGetQueryParameters struct { // The direction to sort the results by. Direction *i7d233d983aef6d2ef322e211e3103c6ba3de064a22b55751ba43d02c6e28fa48.GetDirectionQueryParameterType `uriparametername:"direction"` - // The maximum timestamp to query for stats + // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Max_timestamp *string `uriparametername:"max_timestamp"` - // The minimum timestamp to query for stats + // The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Min_timestamp *string `uriparametername:"min_timestamp"` // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -29,7 +29,7 @@ type ItemInsightsApiUserStatsWithUser_ItemRequestBuilderGetQueryParameters struc // NewItemInsightsApiUserStatsWithUser_ItemRequestBuilderInternal instantiates a new ItemInsightsApiUserStatsWithUser_ItemRequestBuilder and sets the default values. func NewItemInsightsApiUserStatsWithUser_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiUserStatsWithUser_ItemRequestBuilder) { m := &ItemInsightsApiUserStatsWithUser_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters), } return m } From 5787b1e3699a6edd738090faa9619d75b76769fd Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 21 Nov 2024 00:09:56 +0000 Subject: [PATCH 06/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/copilot_dotcom_chat_escaped_models.go | 6 +++--- ...com_pull_requests_escaped_repositories_escaped_models.go | 6 +++--- .../copilot_ide_chat_escaped_editors_escaped_models.go | 6 +++--- ...t_ide_code_completions_escaped_editors_escaped_models.go | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 8425376e..506b3a0b 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "CDEF6C3DAC0E0FEF9CD50CECF39A8E9192F22D889C522151D331319FC11F45E2805F96C590C59D6766503A18665DB53F820E59879C0ECAC12B40A270EB42D897", + "descriptionHash": "0AB8C0BEBB4CF2CCBAA118062E332EAAB5120B55A149F9ADCA6C6FCA3F01668CDA3C0B67CC026F7F5171A453F27F4A184F747AA1CED8E8AB979AE5C080815180", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/copilot_dotcom_chat_escaped_models.go b/pkg/github/models/copilot_dotcom_chat_escaped_models.go index 1d434464..75a5039e 100644 --- a/pkg/github/models/copilot_dotcom_chat_escaped_models.go +++ b/pkg/github/models/copilot_dotcom_chat_escaped_models.go @@ -11,7 +11,7 @@ type CopilotDotcomChat_models struct { custom_model_training_date *string // Indicates whether a model is custom or default. is_custom_model *bool - // Name of the language used for Copilot code completion suggestions, for the given editor. + // Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. name *string // Total number of chats initiated by users on github.com. total_chats *int32 @@ -101,7 +101,7 @@ func (m *CopilotDotcomChat_models) GetFieldDeserializers()(map[string]func(i878a func (m *CopilotDotcomChat_models) GetIsCustomModel()(*bool) { return m.is_custom_model } -// GetName gets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// GetName gets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. // returns a *string when successful func (m *CopilotDotcomChat_models) GetName()(*string) { return m.name @@ -168,7 +168,7 @@ func (m *CopilotDotcomChat_models) SetCustomModelTrainingDate(value *string)() { func (m *CopilotDotcomChat_models) SetIsCustomModel(value *bool)() { m.is_custom_model = value } -// SetName sets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// SetName sets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. func (m *CopilotDotcomChat_models) SetName(value *string)() { m.name = value } diff --git a/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go b/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go index 87551878..3d91291f 100644 --- a/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go +++ b/pkg/github/models/copilot_dotcom_pull_requests_escaped_repositories_escaped_models.go @@ -11,7 +11,7 @@ type CopilotDotcomPullRequests_repositories_models struct { custom_model_training_date *string // Indicates whether a model is custom or default. is_custom_model *bool - // Name of the language used for Copilot code completion suggestions, for the given editor. + // Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. name *string // The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model. total_engaged_users *int32 @@ -101,7 +101,7 @@ func (m *CopilotDotcomPullRequests_repositories_models) GetFieldDeserializers()( func (m *CopilotDotcomPullRequests_repositories_models) GetIsCustomModel()(*bool) { return m.is_custom_model } -// GetName gets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// GetName gets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. // returns a *string when successful func (m *CopilotDotcomPullRequests_repositories_models) GetName()(*string) { return m.name @@ -168,7 +168,7 @@ func (m *CopilotDotcomPullRequests_repositories_models) SetCustomModelTrainingDa func (m *CopilotDotcomPullRequests_repositories_models) SetIsCustomModel(value *bool)() { m.is_custom_model = value } -// SetName sets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// SetName sets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. func (m *CopilotDotcomPullRequests_repositories_models) SetName(value *string)() { m.name = value } diff --git a/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go b/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go index 41320171..0847bcce 100644 --- a/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go +++ b/pkg/github/models/copilot_ide_chat_escaped_editors_escaped_models.go @@ -11,7 +11,7 @@ type CopilotIdeChat_editors_models struct { custom_model_training_date *string // Indicates whether a model is custom or default. is_custom_model *bool - // Name of the language used for Copilot code completion suggestions, for the given editor. + // Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. name *string // The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor. total_chat_copy_events *int32 @@ -125,7 +125,7 @@ func (m *CopilotIdeChat_editors_models) GetFieldDeserializers()(map[string]func( func (m *CopilotIdeChat_editors_models) GetIsCustomModel()(*bool) { return m.is_custom_model } -// GetName gets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// GetName gets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. // returns a *string when successful func (m *CopilotIdeChat_editors_models) GetName()(*string) { return m.name @@ -214,7 +214,7 @@ func (m *CopilotIdeChat_editors_models) SetCustomModelTrainingDate(value *string func (m *CopilotIdeChat_editors_models) SetIsCustomModel(value *bool)() { m.is_custom_model = value } -// SetName sets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// SetName sets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. func (m *CopilotIdeChat_editors_models) SetName(value *string)() { m.name = value } diff --git a/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models.go b/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models.go index 20fcb897..177516a5 100644 --- a/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models.go +++ b/pkg/github/models/copilot_ide_code_completions_escaped_editors_escaped_models.go @@ -13,7 +13,7 @@ type CopilotIdeCodeCompletions_editors_models struct { is_custom_model *bool // Code completion metrics for active languages, for the given editor. languages []CopilotIdeCodeCompletions_editors_models_languagesable - // Name of the language used for Copilot code completion suggestions, for the given editor. + // Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. name *string // Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances. total_engaged_users *int32 @@ -112,7 +112,7 @@ func (m *CopilotIdeCodeCompletions_editors_models) GetIsCustomModel()(*bool) { func (m *CopilotIdeCodeCompletions_editors_models) GetLanguages()([]CopilotIdeCodeCompletions_editors_models_languagesable) { return m.languages } -// GetName gets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// GetName gets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. // returns a *string when successful func (m *CopilotIdeCodeCompletions_editors_models) GetName()(*string) { return m.name @@ -184,7 +184,7 @@ func (m *CopilotIdeCodeCompletions_editors_models) SetIsCustomModel(value *bool) func (m *CopilotIdeCodeCompletions_editors_models) SetLanguages(value []CopilotIdeCodeCompletions_editors_models_languagesable)() { m.languages = value } -// SetName sets the name property value. Name of the language used for Copilot code completion suggestions, for the given editor. +// SetName sets the name property value. Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. func (m *CopilotIdeCodeCompletions_editors_models) SetName(value *string)() { m.name = value } From 7d12c0dbc246e3e0aab5401963c122915b097dee Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Sat, 23 Nov 2024 00:09:53 +0000 Subject: [PATCH 07/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/billing_usage_report.go | 92 +++++ .../models/billing_usage_report503_error.go | 146 +++++++ ...illing_usage_report_escaped_usage_items.go | 370 ++++++++++++++++++ .../item_settings_billing_request_builder.go | 28 ++ ..._settings_billing_usage_request_builder.go | 78 ++++ .../item_settings_request_builder.go | 28 ++ .../organizations_request_builder.go | 12 + .../with_org_item_request_builder.go | 28 ++ 9 files changed, 783 insertions(+), 1 deletion(-) create mode 100644 pkg/github/models/billing_usage_report.go create mode 100644 pkg/github/models/billing_usage_report503_error.go create mode 100644 pkg/github/models/billing_usage_report_escaped_usage_items.go create mode 100644 pkg/github/organizations/item_settings_billing_request_builder.go create mode 100644 pkg/github/organizations/item_settings_billing_usage_request_builder.go create mode 100644 pkg/github/organizations/item_settings_request_builder.go create mode 100644 pkg/github/organizations/with_org_item_request_builder.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 506b3a0b..a58718bb 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "0AB8C0BEBB4CF2CCBAA118062E332EAAB5120B55A149F9ADCA6C6FCA3F01668CDA3C0B67CC026F7F5171A453F27F4A184F747AA1CED8E8AB979AE5C080815180", + "descriptionHash": "1726ECC93DFC3434B7C4AADBCC50E99BA698E8F7EF9A01AEFF155B3686861D56E1882C516831318147B4FE5E00EE71F611D0EDAC2432C1A565188558FC0B9884", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/billing_usage_report.go b/pkg/github/models/billing_usage_report.go new file mode 100644 index 00000000..746e912a --- /dev/null +++ b/pkg/github/models/billing_usage_report.go @@ -0,0 +1,92 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BillingUsageReport struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The usageItems property + usageItems []BillingUsageReport_usageItemsable +} +// NewBillingUsageReport instantiates a new BillingUsageReport and sets the default values. +func NewBillingUsageReport()(*BillingUsageReport) { + m := &BillingUsageReport{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBillingUsageReportFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBillingUsageReportFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBillingUsageReport(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BillingUsageReport) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BillingUsageReport) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["usageItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBillingUsageReport_usageItemsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BillingUsageReport_usageItemsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(BillingUsageReport_usageItemsable) + } + } + m.SetUsageItems(res) + } + return nil + } + return res +} +// GetUsageItems gets the usageItems property value. The usageItems property +// returns a []BillingUsageReport_usageItemsable when successful +func (m *BillingUsageReport) GetUsageItems()([]BillingUsageReport_usageItemsable) { + return m.usageItems +} +// Serialize serializes information the current object +func (m *BillingUsageReport) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetUsageItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsageItems())) + for i, v := range m.GetUsageItems() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("usageItems", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BillingUsageReport) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetUsageItems sets the usageItems property value. The usageItems property +func (m *BillingUsageReport) SetUsageItems(value []BillingUsageReport_usageItemsable)() { + m.usageItems = value +} +type BillingUsageReportable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUsageItems()([]BillingUsageReport_usageItemsable) + SetUsageItems(value []BillingUsageReport_usageItemsable)() +} diff --git a/pkg/github/models/billing_usage_report503_error.go b/pkg/github/models/billing_usage_report503_error.go new file mode 100644 index 00000000..d85562a5 --- /dev/null +++ b/pkg/github/models/billing_usage_report503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BillingUsageReport503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewBillingUsageReport503Error instantiates a new BillingUsageReport503Error and sets the default values. +func NewBillingUsageReport503Error()(*BillingUsageReport503Error) { + m := &BillingUsageReport503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBillingUsageReport503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBillingUsageReport503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBillingUsageReport503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *BillingUsageReport503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BillingUsageReport503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *BillingUsageReport503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *BillingUsageReport503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BillingUsageReport503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *BillingUsageReport503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *BillingUsageReport503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BillingUsageReport503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *BillingUsageReport503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *BillingUsageReport503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *BillingUsageReport503Error) SetMessage(value *string)() { + m.message = value +} +type BillingUsageReport503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/billing_usage_report_escaped_usage_items.go b/pkg/github/models/billing_usage_report_escaped_usage_items.go new file mode 100644 index 00000000..c7766aaa --- /dev/null +++ b/pkg/github/models/billing_usage_report_escaped_usage_items.go @@ -0,0 +1,370 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type BillingUsageReport_usageItems struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Date of the usage line item. + date *string + // Discount amount of the usage line item. + discountAmount *float64 + // Gross amount of the usage line item. + grossAmount *float64 + // Net amount of the usage line item. + netAmount *float64 + // Name of the organization. + organizationName *string + // Price per unit of the usage line item. + pricePerUnit *float64 + // Product name. + product *string + // Quantity of the usage line item. + quantity *int32 + // Name of the repository. + repositoryName *string + // SKU name. + sku *string + // Unit type of the usage line item. + unitType *string +} +// NewBillingUsageReport_usageItems instantiates a new BillingUsageReport_usageItems and sets the default values. +func NewBillingUsageReport_usageItems()(*BillingUsageReport_usageItems) { + m := &BillingUsageReport_usageItems{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateBillingUsageReport_usageItemsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateBillingUsageReport_usageItemsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBillingUsageReport_usageItems(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *BillingUsageReport_usageItems) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDate gets the date property value. Date of the usage line item. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetDate()(*string) { + return m.date +} +// GetDiscountAmount gets the discountAmount property value. Discount amount of the usage line item. +// returns a *float64 when successful +func (m *BillingUsageReport_usageItems) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *BillingUsageReport_usageItems) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["grossAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetGrossAmount(val) + } + return nil + } + res["netAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmount(val) + } + return nil + } + res["organizationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationName(val) + } + return nil + } + res["pricePerUnit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPricePerUnit(val) + } + return nil + } + res["product"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProduct(val) + } + return nil + } + res["quantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetQuantity(val) + } + return nil + } + res["repositoryName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryName(val) + } + return nil + } + res["sku"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSku(val) + } + return nil + } + res["unitType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUnitType(val) + } + return nil + } + return res +} +// GetGrossAmount gets the grossAmount property value. Gross amount of the usage line item. +// returns a *float64 when successful +func (m *BillingUsageReport_usageItems) GetGrossAmount()(*float64) { + return m.grossAmount +} +// GetNetAmount gets the netAmount property value. Net amount of the usage line item. +// returns a *float64 when successful +func (m *BillingUsageReport_usageItems) GetNetAmount()(*float64) { + return m.netAmount +} +// GetOrganizationName gets the organizationName property value. Name of the organization. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetOrganizationName()(*string) { + return m.organizationName +} +// GetPricePerUnit gets the pricePerUnit property value. Price per unit of the usage line item. +// returns a *float64 when successful +func (m *BillingUsageReport_usageItems) GetPricePerUnit()(*float64) { + return m.pricePerUnit +} +// GetProduct gets the product property value. Product name. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetProduct()(*string) { + return m.product +} +// GetQuantity gets the quantity property value. Quantity of the usage line item. +// returns a *int32 when successful +func (m *BillingUsageReport_usageItems) GetQuantity()(*int32) { + return m.quantity +} +// GetRepositoryName gets the repositoryName property value. Name of the repository. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetRepositoryName()(*string) { + return m.repositoryName +} +// GetSku gets the sku property value. SKU name. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetSku()(*string) { + return m.sku +} +// GetUnitType gets the unitType property value. Unit type of the usage line item. +// returns a *string when successful +func (m *BillingUsageReport_usageItems) GetUnitType()(*string) { + return m.unitType +} +// Serialize serializes information the current object +func (m *BillingUsageReport_usageItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("grossAmount", m.GetGrossAmount()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("netAmount", m.GetNetAmount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organizationName", m.GetOrganizationName()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("pricePerUnit", m.GetPricePerUnit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("product", m.GetProduct()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("quantity", m.GetQuantity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("repositoryName", m.GetRepositoryName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sku", m.GetSku()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("unitType", m.GetUnitType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *BillingUsageReport_usageItems) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDate sets the date property value. Date of the usage line item. +func (m *BillingUsageReport_usageItems) SetDate(value *string)() { + m.date = value +} +// SetDiscountAmount sets the discountAmount property value. Discount amount of the usage line item. +func (m *BillingUsageReport_usageItems) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetGrossAmount sets the grossAmount property value. Gross amount of the usage line item. +func (m *BillingUsageReport_usageItems) SetGrossAmount(value *float64)() { + m.grossAmount = value +} +// SetNetAmount sets the netAmount property value. Net amount of the usage line item. +func (m *BillingUsageReport_usageItems) SetNetAmount(value *float64)() { + m.netAmount = value +} +// SetOrganizationName sets the organizationName property value. Name of the organization. +func (m *BillingUsageReport_usageItems) SetOrganizationName(value *string)() { + m.organizationName = value +} +// SetPricePerUnit sets the pricePerUnit property value. Price per unit of the usage line item. +func (m *BillingUsageReport_usageItems) SetPricePerUnit(value *float64)() { + m.pricePerUnit = value +} +// SetProduct sets the product property value. Product name. +func (m *BillingUsageReport_usageItems) SetProduct(value *string)() { + m.product = value +} +// SetQuantity sets the quantity property value. Quantity of the usage line item. +func (m *BillingUsageReport_usageItems) SetQuantity(value *int32)() { + m.quantity = value +} +// SetRepositoryName sets the repositoryName property value. Name of the repository. +func (m *BillingUsageReport_usageItems) SetRepositoryName(value *string)() { + m.repositoryName = value +} +// SetSku sets the sku property value. SKU name. +func (m *BillingUsageReport_usageItems) SetSku(value *string)() { + m.sku = value +} +// SetUnitType sets the unitType property value. Unit type of the usage line item. +func (m *BillingUsageReport_usageItems) SetUnitType(value *string)() { + m.unitType = value +} +type BillingUsageReport_usageItemsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*string) + GetDiscountAmount()(*float64) + GetGrossAmount()(*float64) + GetNetAmount()(*float64) + GetOrganizationName()(*string) + GetPricePerUnit()(*float64) + GetProduct()(*string) + GetQuantity()(*int32) + GetRepositoryName()(*string) + GetSku()(*string) + GetUnitType()(*string) + SetDate(value *string)() + SetDiscountAmount(value *float64)() + SetGrossAmount(value *float64)() + SetNetAmount(value *float64)() + SetOrganizationName(value *string)() + SetPricePerUnit(value *float64)() + SetProduct(value *string)() + SetQuantity(value *int32)() + SetRepositoryName(value *string)() + SetSku(value *string)() + SetUnitType(value *string)() +} diff --git a/pkg/github/organizations/item_settings_billing_request_builder.go b/pkg/github/organizations/item_settings_billing_request_builder.go new file mode 100644 index 00000000..fa4aacb4 --- /dev/null +++ b/pkg/github/organizations/item_settings_billing_request_builder.go @@ -0,0 +1,28 @@ +package organizations + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsBillingRequestBuilder builds and executes requests for operations under \organizations\{org}\settings\billing +type ItemSettingsBillingRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemSettingsBillingRequestBuilderInternal instantiates a new ItemSettingsBillingRequestBuilder and sets the default values. +func NewItemSettingsBillingRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingRequestBuilder) { + m := &ItemSettingsBillingRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{org}/settings/billing", pathParameters), + } + return m +} +// NewItemSettingsBillingRequestBuilder instantiates a new ItemSettingsBillingRequestBuilder and sets the default values. +func NewItemSettingsBillingRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingRequestBuilderInternal(urlParams, requestAdapter) +} +// Usage the usage property +// returns a *ItemSettingsBillingUsageRequestBuilder when successful +func (m *ItemSettingsBillingRequestBuilder) Usage()(*ItemSettingsBillingUsageRequestBuilder) { + return NewItemSettingsBillingUsageRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/organizations/item_settings_billing_usage_request_builder.go b/pkg/github/organizations/item_settings_billing_usage_request_builder.go new file mode 100644 index 00000000..1761d7c1 --- /dev/null +++ b/pkg/github/organizations/item_settings_billing_usage_request_builder.go @@ -0,0 +1,78 @@ +package organizations + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemSettingsBillingUsageRequestBuilder builds and executes requests for operations under \organizations\{org}\settings\billing\usage +type ItemSettingsBillingUsageRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemSettingsBillingUsageRequestBuilderGetQueryParameters gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." +type ItemSettingsBillingUsageRequestBuilderGetQueryParameters struct { + // If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. + Day *int32 `uriparametername:"day"` + // If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. + Hour *int32 `uriparametername:"hour"` + // If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. + Month *int32 `uriparametername:"month"` + // If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2024`. Default value is the current year. + Year *int32 `uriparametername:"year"` +} +// NewItemSettingsBillingUsageRequestBuilderInternal instantiates a new ItemSettingsBillingUsageRequestBuilder and sets the default values. +func NewItemSettingsBillingUsageRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingUsageRequestBuilder) { + m := &ItemSettingsBillingUsageRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{org}/settings/billing/usage{?day*,hour*,month*,year*}", pathParameters), + } + return m +} +// NewItemSettingsBillingUsageRequestBuilder instantiates a new ItemSettingsBillingUsageRequestBuilder and sets the default values. +func NewItemSettingsBillingUsageRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsBillingUsageRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsBillingUsageRequestBuilderInternal(urlParams, requestAdapter) +} +// Get gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." +// returns a BillingUsageReportable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 500 status code +// returns a BillingUsageReport503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/billing/enhanced-billing#get-billing-usage-report-for-an-organization +func (m *ItemSettingsBillingUsageRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsBillingUsageRequestBuilderGetQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.BillingUsageReportable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "500": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "503": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBillingUsageReport503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBillingUsageReportFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.BillingUsageReportable), nil +} +// ToGetRequestInformation gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." +// returns a *RequestInformation when successful +func (m *ItemSettingsBillingUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemSettingsBillingUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemSettingsBillingUsageRequestBuilder when successful +func (m *ItemSettingsBillingUsageRequestBuilder) WithUrl(rawUrl string)(*ItemSettingsBillingUsageRequestBuilder) { + return NewItemSettingsBillingUsageRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/organizations/item_settings_request_builder.go b/pkg/github/organizations/item_settings_request_builder.go new file mode 100644 index 00000000..521b8ee3 --- /dev/null +++ b/pkg/github/organizations/item_settings_request_builder.go @@ -0,0 +1,28 @@ +package organizations + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemSettingsRequestBuilder builds and executes requests for operations under \organizations\{org}\settings +type ItemSettingsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// Billing the billing property +// returns a *ItemSettingsBillingRequestBuilder when successful +func (m *ItemSettingsRequestBuilder) Billing()(*ItemSettingsBillingRequestBuilder) { + return NewItemSettingsBillingRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemSettingsRequestBuilderInternal instantiates a new ItemSettingsRequestBuilder and sets the default values. +func NewItemSettingsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsRequestBuilder) { + m := &ItemSettingsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{org}/settings", pathParameters), + } + return m +} +// NewItemSettingsRequestBuilder instantiates a new ItemSettingsRequestBuilder and sets the default values. +func NewItemSettingsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemSettingsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemSettingsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/organizations/organizations_request_builder.go b/pkg/github/organizations/organizations_request_builder.go index c5c04e82..d809ec5a 100644 --- a/pkg/github/organizations/organizations_request_builder.go +++ b/pkg/github/organizations/organizations_request_builder.go @@ -17,6 +17,18 @@ type OrganizationsRequestBuilderGetQueryParameters struct { // An organization ID. Only return organizations with an ID greater than this ID. Since *int32 `uriparametername:"since"` } +// ByOrg gets an item from the github.com/octokit/go-sdk/pkg/github.organizations.item collection +// returns a *WithOrgItemRequestBuilder when successful +func (m *OrganizationsRequestBuilder) ByOrg(org string)(*WithOrgItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if org != "" { + urlTplParams["org"] = org + } + return NewWithOrgItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} // NewOrganizationsRequestBuilderInternal instantiates a new OrganizationsRequestBuilder and sets the default values. func NewOrganizationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*OrganizationsRequestBuilder) { m := &OrganizationsRequestBuilder{ diff --git a/pkg/github/organizations/with_org_item_request_builder.go b/pkg/github/organizations/with_org_item_request_builder.go new file mode 100644 index 00000000..a03b8d47 --- /dev/null +++ b/pkg/github/organizations/with_org_item_request_builder.go @@ -0,0 +1,28 @@ +package organizations + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// WithOrgItemRequestBuilder builds and executes requests for operations under \organizations\{org} +type WithOrgItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewWithOrgItemRequestBuilderInternal instantiates a new WithOrgItemRequestBuilder and sets the default values. +func NewWithOrgItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithOrgItemRequestBuilder) { + m := &WithOrgItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/organizations/{org}", pathParameters), + } + return m +} +// NewWithOrgItemRequestBuilder instantiates a new WithOrgItemRequestBuilder and sets the default values. +func NewWithOrgItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithOrgItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithOrgItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Settings the settings property +// returns a *ItemSettingsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Settings()(*ItemSettingsRequestBuilder) { + return NewItemSettingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} From e784d28baf98d005652f0526caaef7c035a3d833 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Wed, 27 Nov 2024 00:09:59 +0000 Subject: [PATCH 08/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- ...mit_escaped_commit_escaped_verification.go | 29 +++ .../models/git_commit_escaped_verification.go | 29 +++ pkg/github/models/secret_scanning_scan.go | 169 ++++++++++++++ .../models/secret_scanning_scan_history.go | 215 ++++++++++++++++++ .../secret_scanning_scan_history503_error.go | 146 ++++++++++++ ...ne_committed_event_escaped_verification.go | 29 +++ pkg/github/models/verification.go | 29 +++ .../item_item_actions_runs_request_builder.go | 6 +- ...ons_workflows_item_runs_request_builder.go | 6 +- ...em_item_secret_scanning_request_builder.go | 5 + ...t_scanning_scan_history_request_builder.go | 61 +++++ 12 files changed, 719 insertions(+), 7 deletions(-) create mode 100644 pkg/github/models/secret_scanning_scan.go create mode 100644 pkg/github/models/secret_scanning_scan_history.go create mode 100644 pkg/github/models/secret_scanning_scan_history503_error.go create mode 100644 pkg/github/repos/item_item_secret_scanning_scan_history_request_builder.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index a58718bb..d8308af7 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "1726ECC93DFC3434B7C4AADBCC50E99BA698E8F7EF9A01AEFF155B3686861D56E1882C516831318147B4FE5E00EE71F611D0EDAC2432C1A565188558FC0B9884", + "descriptionHash": "AF2382320C5DD5BEAD56DB025BDBBE6C47DC2337A6C71EC1016BE7A6310FCBFF91800C2EBB4164C2CA3A67AE2F72177A58064CC60C08F6E578B2733DE301ABB4", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/file_commit_escaped_commit_escaped_verification.go b/pkg/github/models/file_commit_escaped_commit_escaped_verification.go index 255b309c..bf260d63 100644 --- a/pkg/github/models/file_commit_escaped_commit_escaped_verification.go +++ b/pkg/github/models/file_commit_escaped_commit_escaped_verification.go @@ -15,6 +15,8 @@ type FileCommit_commit_verification struct { signature *string // The verified property verified *bool + // The verified_at property + verified_at *string } // NewFileCommit_commit_verification instantiates a new FileCommit_commit_verification and sets the default values. func NewFileCommit_commit_verification()(*FileCommit_commit_verification) { @@ -77,6 +79,16 @@ func (m *FileCommit_commit_verification) GetFieldDeserializers()(map[string]func } return nil } + res["verified_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVerifiedAt(val) + } + return nil + } return res } // GetPayload gets the payload property value. The payload property @@ -99,6 +111,11 @@ func (m *FileCommit_commit_verification) GetSignature()(*string) { func (m *FileCommit_commit_verification) GetVerified()(*bool) { return m.verified } +// GetVerifiedAt gets the verified_at property value. The verified_at property +// returns a *string when successful +func (m *FileCommit_commit_verification) GetVerifiedAt()(*string) { + return m.verified_at +} // Serialize serializes information the current object func (m *FileCommit_commit_verification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -125,6 +142,12 @@ func (m *FileCommit_commit_verification) Serialize(writer i878a80d2330e89d268963 return err } } + { + err := writer.WriteStringValue("verified_at", m.GetVerifiedAt()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -153,6 +176,10 @@ func (m *FileCommit_commit_verification) SetSignature(value *string)() { func (m *FileCommit_commit_verification) SetVerified(value *bool)() { m.verified = value } +// SetVerifiedAt sets the verified_at property value. The verified_at property +func (m *FileCommit_commit_verification) SetVerifiedAt(value *string)() { + m.verified_at = value +} type FileCommit_commit_verificationable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -160,8 +187,10 @@ type FileCommit_commit_verificationable interface { GetReason()(*string) GetSignature()(*string) GetVerified()(*bool) + GetVerifiedAt()(*string) SetPayload(value *string)() SetReason(value *string)() SetSignature(value *string)() SetVerified(value *bool)() + SetVerifiedAt(value *string)() } diff --git a/pkg/github/models/git_commit_escaped_verification.go b/pkg/github/models/git_commit_escaped_verification.go index aa555741..e27e5fad 100644 --- a/pkg/github/models/git_commit_escaped_verification.go +++ b/pkg/github/models/git_commit_escaped_verification.go @@ -15,6 +15,8 @@ type GitCommit_verification struct { signature *string // The verified property verified *bool + // The verified_at property + verified_at *string } // NewGitCommit_verification instantiates a new GitCommit_verification and sets the default values. func NewGitCommit_verification()(*GitCommit_verification) { @@ -77,6 +79,16 @@ func (m *GitCommit_verification) GetFieldDeserializers()(map[string]func(i878a80 } return nil } + res["verified_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVerifiedAt(val) + } + return nil + } return res } // GetPayload gets the payload property value. The payload property @@ -99,6 +111,11 @@ func (m *GitCommit_verification) GetSignature()(*string) { func (m *GitCommit_verification) GetVerified()(*bool) { return m.verified } +// GetVerifiedAt gets the verified_at property value. The verified_at property +// returns a *string when successful +func (m *GitCommit_verification) GetVerifiedAt()(*string) { + return m.verified_at +} // Serialize serializes information the current object func (m *GitCommit_verification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -125,6 +142,12 @@ func (m *GitCommit_verification) Serialize(writer i878a80d2330e89d26896388a3f487 return err } } + { + err := writer.WriteStringValue("verified_at", m.GetVerifiedAt()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -153,6 +176,10 @@ func (m *GitCommit_verification) SetSignature(value *string)() { func (m *GitCommit_verification) SetVerified(value *bool)() { m.verified = value } +// SetVerifiedAt sets the verified_at property value. The verified_at property +func (m *GitCommit_verification) SetVerifiedAt(value *string)() { + m.verified_at = value +} type GitCommit_verificationable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -160,8 +187,10 @@ type GitCommit_verificationable interface { GetReason()(*string) GetSignature()(*string) GetVerified()(*bool) + GetVerifiedAt()(*string) SetPayload(value *string)() SetReason(value *string)() SetSignature(value *string)() SetVerified(value *bool)() + SetVerifiedAt(value *string)() } diff --git a/pkg/github/models/secret_scanning_scan.go b/pkg/github/models/secret_scanning_scan.go new file mode 100644 index 00000000..721a3c66 --- /dev/null +++ b/pkg/github/models/secret_scanning_scan.go @@ -0,0 +1,169 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecretScanningScan information on a single scan performed by secret scanning on the repository +type SecretScanningScan struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The time that the scan was completed. Empty if the scan is active + completed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time that the scan was started + started_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The state of the scan. Either "completed" or "running" + status *string + // The type of scan + typeEscaped *string +} +// NewSecretScanningScan instantiates a new SecretScanningScan and sets the default values. +func NewSecretScanningScan()(*SecretScanningScan) { + m := &SecretScanningScan{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningScanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningScanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningScan(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningScan) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCompletedAt gets the completed_at property value. The time that the scan was completed. Empty if the scan is active +// returns a *Time when successful +func (m *SecretScanningScan) GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completed_at +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningScan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["completed_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedAt(val) + } + return nil + } + res["started_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedAt(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val) + } + return nil + } + return res +} +// GetStartedAt gets the started_at property value. The time that the scan was started +// returns a *Time when successful +func (m *SecretScanningScan) GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.started_at +} +// GetStatus gets the status property value. The state of the scan. Either "completed" or "running" +// returns a *string when successful +func (m *SecretScanningScan) GetStatus()(*string) { + return m.status +} +// GetTypeEscaped gets the type property value. The type of scan +// returns a *string when successful +func (m *SecretScanningScan) GetTypeEscaped()(*string) { + return m.typeEscaped +} +// Serialize serializes information the current object +func (m *SecretScanningScan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("completed_at", m.GetCompletedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("started_at", m.GetStartedAt()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetTypeEscaped()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningScan) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCompletedAt sets the completed_at property value. The time that the scan was completed. Empty if the scan is active +func (m *SecretScanningScan) SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completed_at = value +} +// SetStartedAt sets the started_at property value. The time that the scan was started +func (m *SecretScanningScan) SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.started_at = value +} +// SetStatus sets the status property value. The state of the scan. Either "completed" or "running" +func (m *SecretScanningScan) SetStatus(value *string)() { + m.status = value +} +// SetTypeEscaped sets the type property value. The type of scan +func (m *SecretScanningScan) SetTypeEscaped(value *string)() { + m.typeEscaped = value +} +type SecretScanningScanable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*string) + GetTypeEscaped()(*string) + SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *string)() + SetTypeEscaped(value *string)() +} diff --git a/pkg/github/models/secret_scanning_scan_history.go b/pkg/github/models/secret_scanning_scan_history.go new file mode 100644 index 00000000..a3b6e684 --- /dev/null +++ b/pkg/github/models/secret_scanning_scan_history.go @@ -0,0 +1,215 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecretScanningScanHistory struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The backfill_scans property + backfill_scans []SecretScanningScanable + // The custom_pattern_backfill_scans property + custom_pattern_backfill_scans []SecretScanningScanable + // The incremental_scans property + incremental_scans []SecretScanningScanable + // The pattern_update_scans property + pattern_update_scans []SecretScanningScanable +} +// NewSecretScanningScanHistory instantiates a new SecretScanningScanHistory and sets the default values. +func NewSecretScanningScanHistory()(*SecretScanningScanHistory) { + m := &SecretScanningScanHistory{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningScanHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningScanHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningScanHistory(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningScanHistory) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBackfillScans gets the backfill_scans property value. The backfill_scans property +// returns a []SecretScanningScanable when successful +func (m *SecretScanningScanHistory) GetBackfillScans()([]SecretScanningScanable) { + return m.backfill_scans +} +// GetCustomPatternBackfillScans gets the custom_pattern_backfill_scans property value. The custom_pattern_backfill_scans property +// returns a []SecretScanningScanable when successful +func (m *SecretScanningScanHistory) GetCustomPatternBackfillScans()([]SecretScanningScanable) { + return m.custom_pattern_backfill_scans +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningScanHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["backfill_scans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecretScanningScanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecretScanningScanable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SecretScanningScanable) + } + } + m.SetBackfillScans(res) + } + return nil + } + res["custom_pattern_backfill_scans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecretScanningScanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecretScanningScanable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SecretScanningScanable) + } + } + m.SetCustomPatternBackfillScans(res) + } + return nil + } + res["incremental_scans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecretScanningScanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecretScanningScanable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SecretScanningScanable) + } + } + m.SetIncrementalScans(res) + } + return nil + } + res["pattern_update_scans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecretScanningScanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecretScanningScanable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SecretScanningScanable) + } + } + m.SetPatternUpdateScans(res) + } + return nil + } + return res +} +// GetIncrementalScans gets the incremental_scans property value. The incremental_scans property +// returns a []SecretScanningScanable when successful +func (m *SecretScanningScanHistory) GetIncrementalScans()([]SecretScanningScanable) { + return m.incremental_scans +} +// GetPatternUpdateScans gets the pattern_update_scans property value. The pattern_update_scans property +// returns a []SecretScanningScanable when successful +func (m *SecretScanningScanHistory) GetPatternUpdateScans()([]SecretScanningScanable) { + return m.pattern_update_scans +} +// Serialize serializes information the current object +func (m *SecretScanningScanHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBackfillScans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBackfillScans())) + for i, v := range m.GetBackfillScans() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("backfill_scans", cast) + if err != nil { + return err + } + } + if m.GetCustomPatternBackfillScans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomPatternBackfillScans())) + for i, v := range m.GetCustomPatternBackfillScans() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("custom_pattern_backfill_scans", cast) + if err != nil { + return err + } + } + if m.GetIncrementalScans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncrementalScans())) + for i, v := range m.GetIncrementalScans() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("incremental_scans", cast) + if err != nil { + return err + } + } + if m.GetPatternUpdateScans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPatternUpdateScans())) + for i, v := range m.GetPatternUpdateScans() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("pattern_update_scans", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningScanHistory) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBackfillScans sets the backfill_scans property value. The backfill_scans property +func (m *SecretScanningScanHistory) SetBackfillScans(value []SecretScanningScanable)() { + m.backfill_scans = value +} +// SetCustomPatternBackfillScans sets the custom_pattern_backfill_scans property value. The custom_pattern_backfill_scans property +func (m *SecretScanningScanHistory) SetCustomPatternBackfillScans(value []SecretScanningScanable)() { + m.custom_pattern_backfill_scans = value +} +// SetIncrementalScans sets the incremental_scans property value. The incremental_scans property +func (m *SecretScanningScanHistory) SetIncrementalScans(value []SecretScanningScanable)() { + m.incremental_scans = value +} +// SetPatternUpdateScans sets the pattern_update_scans property value. The pattern_update_scans property +func (m *SecretScanningScanHistory) SetPatternUpdateScans(value []SecretScanningScanable)() { + m.pattern_update_scans = value +} +type SecretScanningScanHistoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackfillScans()([]SecretScanningScanable) + GetCustomPatternBackfillScans()([]SecretScanningScanable) + GetIncrementalScans()([]SecretScanningScanable) + GetPatternUpdateScans()([]SecretScanningScanable) + SetBackfillScans(value []SecretScanningScanable)() + SetCustomPatternBackfillScans(value []SecretScanningScanable)() + SetIncrementalScans(value []SecretScanningScanable)() + SetPatternUpdateScans(value []SecretScanningScanable)() +} diff --git a/pkg/github/models/secret_scanning_scan_history503_error.go b/pkg/github/models/secret_scanning_scan_history503_error.go new file mode 100644 index 00000000..a93e1006 --- /dev/null +++ b/pkg/github/models/secret_scanning_scan_history503_error.go @@ -0,0 +1,146 @@ +package models + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SecretScanningScanHistory503Error struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The code property + code *string + // The documentation_url property + documentation_url *string + // The message property + message *string +} +// NewSecretScanningScanHistory503Error instantiates a new SecretScanningScanHistory503Error and sets the default values. +func NewSecretScanningScanHistory503Error()(*SecretScanningScanHistory503Error) { + m := &SecretScanningScanHistory503Error{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSecretScanningScanHistory503ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSecretScanningScanHistory503ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecretScanningScanHistory503Error(), nil +} +// Error the primary error message. +// returns a string when successful +func (m *SecretScanningScanHistory503Error) Error()(string) { + return m.ApiError.Error() +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SecretScanningScanHistory503Error) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCode gets the code property value. The code property +// returns a *string when successful +func (m *SecretScanningScanHistory503Error) GetCode()(*string) { + return m.code +} +// GetDocumentationUrl gets the documentation_url property value. The documentation_url property +// returns a *string when successful +func (m *SecretScanningScanHistory503Error) GetDocumentationUrl()(*string) { + return m.documentation_url +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SecretScanningScanHistory503Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["documentation_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +// returns a *string when successful +func (m *SecretScanningScanHistory503Error) GetMessage()(*string) { + return m.message +} +// Serialize serializes information the current object +func (m *SecretScanningScanHistory503Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentation_url", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SecretScanningScanHistory503Error) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *SecretScanningScanHistory503Error) SetCode(value *string)() { + m.code = value +} +// SetDocumentationUrl sets the documentation_url property value. The documentation_url property +func (m *SecretScanningScanHistory503Error) SetDocumentationUrl(value *string)() { + m.documentation_url = value +} +// SetMessage sets the message property value. The message property +func (m *SecretScanningScanHistory503Error) SetMessage(value *string)() { + m.message = value +} +type SecretScanningScanHistory503Errorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDocumentationUrl()(*string) + GetMessage()(*string) + SetCode(value *string)() + SetDocumentationUrl(value *string)() + SetMessage(value *string)() +} diff --git a/pkg/github/models/timeline_committed_event_escaped_verification.go b/pkg/github/models/timeline_committed_event_escaped_verification.go index 8d14cad8..0ee6d71f 100644 --- a/pkg/github/models/timeline_committed_event_escaped_verification.go +++ b/pkg/github/models/timeline_committed_event_escaped_verification.go @@ -15,6 +15,8 @@ type TimelineCommittedEvent_verification struct { signature *string // The verified property verified *bool + // The verified_at property + verified_at *string } // NewTimelineCommittedEvent_verification instantiates a new TimelineCommittedEvent_verification and sets the default values. func NewTimelineCommittedEvent_verification()(*TimelineCommittedEvent_verification) { @@ -77,6 +79,16 @@ func (m *TimelineCommittedEvent_verification) GetFieldDeserializers()(map[string } return nil } + res["verified_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVerifiedAt(val) + } + return nil + } return res } // GetPayload gets the payload property value. The payload property @@ -99,6 +111,11 @@ func (m *TimelineCommittedEvent_verification) GetSignature()(*string) { func (m *TimelineCommittedEvent_verification) GetVerified()(*bool) { return m.verified } +// GetVerifiedAt gets the verified_at property value. The verified_at property +// returns a *string when successful +func (m *TimelineCommittedEvent_verification) GetVerifiedAt()(*string) { + return m.verified_at +} // Serialize serializes information the current object func (m *TimelineCommittedEvent_verification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -125,6 +142,12 @@ func (m *TimelineCommittedEvent_verification) Serialize(writer i878a80d2330e89d2 return err } } + { + err := writer.WriteStringValue("verified_at", m.GetVerifiedAt()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -153,6 +176,10 @@ func (m *TimelineCommittedEvent_verification) SetSignature(value *string)() { func (m *TimelineCommittedEvent_verification) SetVerified(value *bool)() { m.verified = value } +// SetVerifiedAt sets the verified_at property value. The verified_at property +func (m *TimelineCommittedEvent_verification) SetVerifiedAt(value *string)() { + m.verified_at = value +} type TimelineCommittedEvent_verificationable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -160,8 +187,10 @@ type TimelineCommittedEvent_verificationable interface { GetReason()(*string) GetSignature()(*string) GetVerified()(*bool) + GetVerifiedAt()(*string) SetPayload(value *string)() SetReason(value *string)() SetSignature(value *string)() SetVerified(value *bool)() + SetVerifiedAt(value *string)() } diff --git a/pkg/github/models/verification.go b/pkg/github/models/verification.go index 8ee7f11e..90478a0a 100644 --- a/pkg/github/models/verification.go +++ b/pkg/github/models/verification.go @@ -15,6 +15,8 @@ type Verification struct { signature *string // The verified property verified *bool + // The verified_at property + verified_at *string } // NewVerification instantiates a new Verification and sets the default values. func NewVerification()(*Verification) { @@ -77,6 +79,16 @@ func (m *Verification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d2 } return nil } + res["verified_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVerifiedAt(val) + } + return nil + } return res } // GetPayload gets the payload property value. The payload property @@ -99,6 +111,11 @@ func (m *Verification) GetSignature()(*string) { func (m *Verification) GetVerified()(*bool) { return m.verified } +// GetVerifiedAt gets the verified_at property value. The verified_at property +// returns a *string when successful +func (m *Verification) GetVerifiedAt()(*string) { + return m.verified_at +} // Serialize serializes information the current object func (m *Verification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { @@ -125,6 +142,12 @@ func (m *Verification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e return err } } + { + err := writer.WriteStringValue("verified_at", m.GetVerifiedAt()) + if err != nil { + return err + } + } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { @@ -153,6 +176,10 @@ func (m *Verification) SetSignature(value *string)() { func (m *Verification) SetVerified(value *bool)() { m.verified = value } +// SetVerifiedAt sets the verified_at property value. The verified_at property +func (m *Verification) SetVerifiedAt(value *string)() { + m.verified_at = value +} type Verificationable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable @@ -160,8 +187,10 @@ type Verificationable interface { GetReason()(*string) GetSignature()(*string) GetVerified()(*bool) + GetVerifiedAt()(*string) SetPayload(value *string)() SetReason(value *string)() SetSignature(value *string)() SetVerified(value *bool)() + SetVerifiedAt(value *string)() } diff --git a/pkg/github/repos/item_item_actions_runs_request_builder.go b/pkg/github/repos/item_item_actions_runs_request_builder.go index 2f127dd4..6b5e6cb0 100644 --- a/pkg/github/repos/item_item_actions_runs_request_builder.go +++ b/pkg/github/repos/item_item_actions_runs_request_builder.go @@ -12,7 +12,7 @@ import ( type ItemItemActionsRunsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemActionsRunsRequestBuilderGetQueryParameters lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. +// ItemItemActionsRunsRequestBuilderGetQueryParameters lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. type ItemItemActionsRunsRequestBuilderGetQueryParameters struct { // Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. Actor *string `uriparametername:"actor"` @@ -58,7 +58,7 @@ func NewItemItemActionsRunsRequestBuilder(rawUrl string, requestAdapter i2ae4187 urlParams["request-raw-url"] = rawUrl return NewItemItemActionsRunsRequestBuilderInternal(urlParams, requestAdapter) } -// Get lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. +// Get lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. // returns a ItemItemActionsRunsGetResponseable when successful // [API method documentation] // @@ -77,7 +77,7 @@ func (m *ItemItemActionsRunsRequestBuilder) Get(ctx context.Context, requestConf } return res.(ItemItemActionsRunsGetResponseable), nil } -// ToGetRequestInformation lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. +// ToGetRequestInformation lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. // returns a *RequestInformation when successful func (m *ItemItemActionsRunsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsRunsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go b/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go index 9cae1954..6d2dc8fc 100644 --- a/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go +++ b/pkg/github/repos/item_item_actions_workflows_item_runs_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemItemActionsWorkflowsItemRunsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. type ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters struct { // Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. Actor *string `uriparametername:"actor"` @@ -47,7 +47,7 @@ func NewItemItemActionsWorkflowsItemRunsRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewItemItemActionsWorkflowsItemRunsRequestBuilderInternal(urlParams, requestAdapter) } -// Get list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// Get list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. // returns a ItemItemActionsWorkflowsItemRunsGetResponseable when successful // [API method documentation] // @@ -66,7 +66,7 @@ func (m *ItemItemActionsWorkflowsItemRunsRequestBuilder) Get(ctx context.Context } return res.(ItemItemActionsWorkflowsItemRunsGetResponseable), nil } -// ToGetRequestInformation list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. +// ToGetRequestInformation list all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. // returns a *RequestInformation when successful func (m *ItemItemActionsWorkflowsItemRunsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_secret_scanning_request_builder.go b/pkg/github/repos/item_item_secret_scanning_request_builder.go index bbb693f7..a51d43d5 100644 --- a/pkg/github/repos/item_item_secret_scanning_request_builder.go +++ b/pkg/github/repos/item_item_secret_scanning_request_builder.go @@ -31,3 +31,8 @@ func NewItemItemSecretScanningRequestBuilder(rawUrl string, requestAdapter i2ae4 func (m *ItemItemSecretScanningRequestBuilder) PushProtectionBypasses()(*ItemItemSecretScanningPushProtectionBypassesRequestBuilder) { return NewItemItemSecretScanningPushProtectionBypassesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ScanHistory the scanHistory property +// returns a *ItemItemSecretScanningScanHistoryRequestBuilder when successful +func (m *ItemItemSecretScanningRequestBuilder) ScanHistory()(*ItemItemSecretScanningScanHistoryRequestBuilder) { + return NewItemItemSecretScanningScanHistoryRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/pkg/github/repos/item_item_secret_scanning_scan_history_request_builder.go b/pkg/github/repos/item_item_secret_scanning_scan_history_request_builder.go new file mode 100644 index 00000000..a6857e45 --- /dev/null +++ b/pkg/github/repos/item_item_secret_scanning_scan_history_request_builder.go @@ -0,0 +1,61 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemSecretScanningScanHistoryRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\scan-history +type ItemItemSecretScanningScanHistoryRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemSecretScanningScanHistoryRequestBuilderInternal instantiates a new ItemItemSecretScanningScanHistoryRequestBuilder and sets the default values. +func NewItemItemSecretScanningScanHistoryRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningScanHistoryRequestBuilder) { + m := &ItemItemSecretScanningScanHistoryRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/scan-history", pathParameters), + } + return m +} +// NewItemItemSecretScanningScanHistoryRequestBuilder instantiates a new ItemItemSecretScanningScanHistoryRequestBuilder and sets the default values. +func NewItemItemSecretScanningScanHistoryRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemSecretScanningScanHistoryRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemSecretScanningScanHistoryRequestBuilderInternal(urlParams, requestAdapter) +} +// Get lists the latest incremental and backfill scans by type for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a SecretScanningScanHistoryable when successful +// returns a SecretScanningScanHistory503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/secret-scanning/secret-scanning#get-secret-scanning-scan-history-for-a-repository +func (m *ItemItemSecretScanningScanHistoryRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningScanHistoryable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "503": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateSecretScanningScanHistory503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateSecretScanningScanHistoryFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecretScanningScanHistoryable), nil +} +// ToGetRequestInformation lists the latest incremental and backfill scans by type for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. +// returns a *RequestInformation when successful +func (m *ItemItemSecretScanningScanHistoryRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemSecretScanningScanHistoryRequestBuilder when successful +func (m *ItemItemSecretScanningScanHistoryRequestBuilder) WithUrl(rawUrl string)(*ItemItemSecretScanningScanHistoryRequestBuilder) { + return NewItemItemSecretScanningScanHistoryRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} From 967c7a7883015ca92c6885525f53948a7f7d3e66 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Thu, 28 Nov 2024 00:10:16 +0000 Subject: [PATCH 09/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/orgs/item_rulesets_rule_suites_request_builder.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index d8308af7..81cf142b 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "AF2382320C5DD5BEAD56DB025BDBBE6C47DC2337A6C71EC1016BE7A6310FCBFF91800C2EBB4164C2CA3A67AE2F72177A58064CC60C08F6E578B2733DE301ABB4", + "descriptionHash": "894F6D51E4EDEF79DB434C0D6720E5CEA3D3762F1C907C113D32F4EEF0D7A3E6CF78E082A91D68CF2742DE54EDA63C36DF8910CDA4246429A0F6840FE788F4DB", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go b/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go index f30ab829..ac713b73 100644 --- a/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go +++ b/pkg/github/orgs/item_rulesets_rule_suites_request_builder.go @@ -22,8 +22,8 @@ type ItemRulesetsRuleSuitesRequestBuilderGetQueryParameters struct { Per_page *int32 `uriparametername:"per_page"` // The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. Ref *string `uriparametername:"ref"` - // The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. - Repository_name *int32 `uriparametername:"repository_name"` + // The name of the repository to filter on. + Repository_name *string `uriparametername:"repository_name"` // The rule results to filter on. When specified, only suites with this result will be returned. Rule_suite_result *ice77a9476603b5b5bdcf7933e87c368075e96312df44ed011cd574d7f2e817b9.GetRule_suite_resultQueryParameterType `uriparametername:"rule_suite_result"` // The time period to filter by.For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). From f4eb09d99dfd6e35723b2f1f9f1cd61249006bc3 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 29 Nov 2024 00:09:59 +0000 Subject: [PATCH 10/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/issue.go | 29 ++++ pkg/github/models/issue_search_result_item.go | 29 ++++ ...aped_sub_escaped_issues_escaped_summary.go | 138 ++++++++++++++++++ pkg/github/models/nullable_issue.go | 29 ++++ pkg/github/models/sub_issues_summary.go | 138 ++++++++++++++++++ ...m_sub_escaped_issue_delete_request_body.go | 80 ++++++++++ ..._item_sub_escaped_issue_request_builder.go | 67 +++++++++ ...em_sub_escaped_issues_post_request_body.go | 109 ++++++++++++++ ...aped_issues_priority_patch_request_body.go | 138 ++++++++++++++++++ ...escaped_issues_priority_request_builder.go | 71 +++++++++ ...item_sub_escaped_issues_request_builder.go | 119 +++++++++++++++ ...sue_escaped_number_item_request_builder.go | 10 ++ 13 files changed, 958 insertions(+), 1 deletion(-) create mode 100644 pkg/github/models/issue_search_result_item_escaped_sub_escaped_issues_escaped_summary.go create mode 100644 pkg/github/models/sub_issues_summary.go create mode 100644 pkg/github/repos/item_item_issues_item_sub_escaped_issue_delete_request_body.go create mode 100644 pkg/github/repos/item_item_issues_item_sub_escaped_issue_request_builder.go create mode 100644 pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go create mode 100644 pkg/github/repos/item_item_issues_item_sub_escaped_issues_priority_patch_request_body.go create mode 100644 pkg/github/repos/item_item_issues_item_sub_escaped_issues_priority_request_builder.go create mode 100644 pkg/github/repos/item_item_issues_item_sub_escaped_issues_request_builder.go diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 81cf142b..279bc46f 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "894F6D51E4EDEF79DB434C0D6720E5CEA3D3762F1C907C113D32F4EEF0D7A3E6CF78E082A91D68CF2742DE54EDA63C36DF8910CDA4246429A0F6840FE788F4DB", + "descriptionHash": "C966AA1F69D8C99B1BFB2C98E13B04FEB083AECF171723D11080BEA576A1890D098CCDDFBFA347E6623377889E6414EBA6BCE196AA71D829CC01B9D7F49C3D58", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/issue.go b/pkg/github/models/issue.go index 465c7bb2..b561598e 100644 --- a/pkg/github/models/issue.go +++ b/pkg/github/models/issue.go @@ -67,6 +67,8 @@ type Issue struct { state *string // The reason for the current state state_reason *Issue_state_reason + // The sub_issues_summary property + sub_issues_summary SubIssuesSummaryable // The timeline_url property timeline_url *string // Title of the issue @@ -471,6 +473,16 @@ func (m *Issue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388 } return nil } + res["sub_issues_summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSubIssuesSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubIssuesSummary(val.(SubIssuesSummaryable)) + } + return nil + } res["timeline_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -598,6 +610,11 @@ func (m *Issue) GetState()(*string) { func (m *Issue) GetStateReason()(*Issue_state_reason) { return m.state_reason } +// GetSubIssuesSummary gets the sub_issues_summary property value. The sub_issues_summary property +// returns a SubIssuesSummaryable when successful +func (m *Issue) GetSubIssuesSummary()(SubIssuesSummaryable) { + return m.sub_issues_summary +} // GetTimelineUrl gets the timeline_url property value. The timeline_url property // returns a *string when successful func (m *Issue) GetTimelineUrl()(*string) { @@ -807,6 +824,12 @@ func (m *Issue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c4 return err } } + { + err := writer.WriteObjectValue("sub_issues_summary", m.GetSubIssuesSummary()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("timeline_url", m.GetTimelineUrl()) if err != nil { @@ -965,6 +988,10 @@ func (m *Issue) SetState(value *string)() { func (m *Issue) SetStateReason(value *Issue_state_reason)() { m.state_reason = value } +// SetSubIssuesSummary sets the sub_issues_summary property value. The sub_issues_summary property +func (m *Issue) SetSubIssuesSummary(value SubIssuesSummaryable)() { + m.sub_issues_summary = value +} // SetTimelineUrl sets the timeline_url property value. The timeline_url property func (m *Issue) SetTimelineUrl(value *string)() { m.timeline_url = value @@ -1017,6 +1044,7 @@ type Issueable interface { GetRepositoryUrl()(*string) GetState()(*string) GetStateReason()(*Issue_state_reason) + GetSubIssuesSummary()(SubIssuesSummaryable) GetTimelineUrl()(*string) GetTitle()(*string) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -1051,6 +1079,7 @@ type Issueable interface { SetRepositoryUrl(value *string)() SetState(value *string)() SetStateReason(value *Issue_state_reason)() + SetSubIssuesSummary(value SubIssuesSummaryable)() SetTimelineUrl(value *string)() SetTitle(value *string)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/models/issue_search_result_item.go b/pkg/github/models/issue_search_result_item.go index bb48360b..8c177135 100644 --- a/pkg/github/models/issue_search_result_item.go +++ b/pkg/github/models/issue_search_result_item.go @@ -67,6 +67,8 @@ type IssueSearchResultItem struct { state *string // The state_reason property state_reason *string + // The sub_issues_summary property + sub_issues_summary IssueSearchResultItem_sub_issues_summaryable // The text_matches property text_matches []Issuesable // The timeline_url property @@ -468,6 +470,16 @@ func (m *IssueSearchResultItem) GetFieldDeserializers()(map[string]func(i878a80d } return nil } + res["sub_issues_summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIssueSearchResultItem_sub_issues_summaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubIssuesSummary(val.(IssueSearchResultItem_sub_issues_summaryable)) + } + return nil + } res["text_matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateIssuesFromDiscriminatorValue) if err != nil { @@ -616,6 +628,11 @@ func (m *IssueSearchResultItem) GetState()(*string) { func (m *IssueSearchResultItem) GetStateReason()(*string) { return m.state_reason } +// GetSubIssuesSummary gets the sub_issues_summary property value. The sub_issues_summary property +// returns a IssueSearchResultItem_sub_issues_summaryable when successful +func (m *IssueSearchResultItem) GetSubIssuesSummary()(IssueSearchResultItem_sub_issues_summaryable) { + return m.sub_issues_summary +} // GetTextMatches gets the text_matches property value. The text_matches property // returns a []Issuesable when successful func (m *IssueSearchResultItem) GetTextMatches()([]Issuesable) { @@ -835,6 +852,12 @@ func (m *IssueSearchResultItem) Serialize(writer i878a80d2330e89d26896388a3f487e return err } } + { + err := writer.WriteObjectValue("sub_issues_summary", m.GetSubIssuesSummary()) + if err != nil { + return err + } + } if m.GetTextMatches() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTextMatches())) for i, v := range m.GetTextMatches() { @@ -1005,6 +1028,10 @@ func (m *IssueSearchResultItem) SetState(value *string)() { func (m *IssueSearchResultItem) SetStateReason(value *string)() { m.state_reason = value } +// SetSubIssuesSummary sets the sub_issues_summary property value. The sub_issues_summary property +func (m *IssueSearchResultItem) SetSubIssuesSummary(value IssueSearchResultItem_sub_issues_summaryable)() { + m.sub_issues_summary = value +} // SetTextMatches sets the text_matches property value. The text_matches property func (m *IssueSearchResultItem) SetTextMatches(value []Issuesable)() { m.text_matches = value @@ -1061,6 +1088,7 @@ type IssueSearchResultItemable interface { GetScore()(*float64) GetState()(*string) GetStateReason()(*string) + GetSubIssuesSummary()(IssueSearchResultItem_sub_issues_summaryable) GetTextMatches()([]Issuesable) GetTimelineUrl()(*string) GetTitle()(*string) @@ -1096,6 +1124,7 @@ type IssueSearchResultItemable interface { SetScore(value *float64)() SetState(value *string)() SetStateReason(value *string)() + SetSubIssuesSummary(value IssueSearchResultItem_sub_issues_summaryable)() SetTextMatches(value []Issuesable)() SetTimelineUrl(value *string)() SetTitle(value *string)() diff --git a/pkg/github/models/issue_search_result_item_escaped_sub_escaped_issues_escaped_summary.go b/pkg/github/models/issue_search_result_item_escaped_sub_escaped_issues_escaped_summary.go new file mode 100644 index 00000000..0e2a5c07 --- /dev/null +++ b/pkg/github/models/issue_search_result_item_escaped_sub_escaped_issues_escaped_summary.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type IssueSearchResultItem_sub_issues_summary struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The completed property + completed *int32 + // The percent_completed property + percent_completed *int32 + // The total property + total *int32 +} +// NewIssueSearchResultItem_sub_issues_summary instantiates a new IssueSearchResultItem_sub_issues_summary and sets the default values. +func NewIssueSearchResultItem_sub_issues_summary()(*IssueSearchResultItem_sub_issues_summary) { + m := &IssueSearchResultItem_sub_issues_summary{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateIssueSearchResultItem_sub_issues_summaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateIssueSearchResultItem_sub_issues_summaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIssueSearchResultItem_sub_issues_summary(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *IssueSearchResultItem_sub_issues_summary) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCompleted gets the completed property value. The completed property +// returns a *int32 when successful +func (m *IssueSearchResultItem_sub_issues_summary) GetCompleted()(*int32) { + return m.completed +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *IssueSearchResultItem_sub_issues_summary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["completed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompleted(val) + } + return nil + } + res["percent_completed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPercentCompleted(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetPercentCompleted gets the percent_completed property value. The percent_completed property +// returns a *int32 when successful +func (m *IssueSearchResultItem_sub_issues_summary) GetPercentCompleted()(*int32) { + return m.percent_completed +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *IssueSearchResultItem_sub_issues_summary) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *IssueSearchResultItem_sub_issues_summary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("completed", m.GetCompleted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("percent_completed", m.GetPercentCompleted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *IssueSearchResultItem_sub_issues_summary) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCompleted sets the completed property value. The completed property +func (m *IssueSearchResultItem_sub_issues_summary) SetCompleted(value *int32)() { + m.completed = value +} +// SetPercentCompleted sets the percent_completed property value. The percent_completed property +func (m *IssueSearchResultItem_sub_issues_summary) SetPercentCompleted(value *int32)() { + m.percent_completed = value +} +// SetTotal sets the total property value. The total property +func (m *IssueSearchResultItem_sub_issues_summary) SetTotal(value *int32)() { + m.total = value +} +type IssueSearchResultItem_sub_issues_summaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompleted()(*int32) + GetPercentCompleted()(*int32) + GetTotal()(*int32) + SetCompleted(value *int32)() + SetPercentCompleted(value *int32)() + SetTotal(value *int32)() +} diff --git a/pkg/github/models/nullable_issue.go b/pkg/github/models/nullable_issue.go index 8eb356a5..c109f518 100644 --- a/pkg/github/models/nullable_issue.go +++ b/pkg/github/models/nullable_issue.go @@ -67,6 +67,8 @@ type NullableIssue struct { state *string // The reason for the current state state_reason *NullableIssue_state_reason + // The sub_issues_summary property + sub_issues_summary SubIssuesSummaryable // The timeline_url property timeline_url *string // Title of the issue @@ -471,6 +473,16 @@ func (m *NullableIssue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d } return nil } + res["sub_issues_summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSubIssuesSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubIssuesSummary(val.(SubIssuesSummaryable)) + } + return nil + } res["timeline_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -598,6 +610,11 @@ func (m *NullableIssue) GetState()(*string) { func (m *NullableIssue) GetStateReason()(*NullableIssue_state_reason) { return m.state_reason } +// GetSubIssuesSummary gets the sub_issues_summary property value. The sub_issues_summary property +// returns a SubIssuesSummaryable when successful +func (m *NullableIssue) GetSubIssuesSummary()(SubIssuesSummaryable) { + return m.sub_issues_summary +} // GetTimelineUrl gets the timeline_url property value. The timeline_url property // returns a *string when successful func (m *NullableIssue) GetTimelineUrl()(*string) { @@ -807,6 +824,12 @@ func (m *NullableIssue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 return err } } + { + err := writer.WriteObjectValue("sub_issues_summary", m.GetSubIssuesSummary()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("timeline_url", m.GetTimelineUrl()) if err != nil { @@ -965,6 +988,10 @@ func (m *NullableIssue) SetState(value *string)() { func (m *NullableIssue) SetStateReason(value *NullableIssue_state_reason)() { m.state_reason = value } +// SetSubIssuesSummary sets the sub_issues_summary property value. The sub_issues_summary property +func (m *NullableIssue) SetSubIssuesSummary(value SubIssuesSummaryable)() { + m.sub_issues_summary = value +} // SetTimelineUrl sets the timeline_url property value. The timeline_url property func (m *NullableIssue) SetTimelineUrl(value *string)() { m.timeline_url = value @@ -1017,6 +1044,7 @@ type NullableIssueable interface { GetRepositoryUrl()(*string) GetState()(*string) GetStateReason()(*NullableIssue_state_reason) + GetSubIssuesSummary()(SubIssuesSummaryable) GetTimelineUrl()(*string) GetTitle()(*string) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) @@ -1051,6 +1079,7 @@ type NullableIssueable interface { SetRepositoryUrl(value *string)() SetState(value *string)() SetStateReason(value *NullableIssue_state_reason)() + SetSubIssuesSummary(value SubIssuesSummaryable)() SetTimelineUrl(value *string)() SetTitle(value *string)() SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() diff --git a/pkg/github/models/sub_issues_summary.go b/pkg/github/models/sub_issues_summary.go new file mode 100644 index 00000000..6f875b61 --- /dev/null +++ b/pkg/github/models/sub_issues_summary.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SubIssuesSummary struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The completed property + completed *int32 + // The percent_completed property + percent_completed *int32 + // The total property + total *int32 +} +// NewSubIssuesSummary instantiates a new SubIssuesSummary and sets the default values. +func NewSubIssuesSummary()(*SubIssuesSummary) { + m := &SubIssuesSummary{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSubIssuesSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSubIssuesSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSubIssuesSummary(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *SubIssuesSummary) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCompleted gets the completed property value. The completed property +// returns a *int32 when successful +func (m *SubIssuesSummary) GetCompleted()(*int32) { + return m.completed +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SubIssuesSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["completed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompleted(val) + } + return nil + } + res["percent_completed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPercentCompleted(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetPercentCompleted gets the percent_completed property value. The percent_completed property +// returns a *int32 when successful +func (m *SubIssuesSummary) GetPercentCompleted()(*int32) { + return m.percent_completed +} +// GetTotal gets the total property value. The total property +// returns a *int32 when successful +func (m *SubIssuesSummary) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *SubIssuesSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("completed", m.GetCompleted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("percent_completed", m.GetPercentCompleted()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SubIssuesSummary) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCompleted sets the completed property value. The completed property +func (m *SubIssuesSummary) SetCompleted(value *int32)() { + m.completed = value +} +// SetPercentCompleted sets the percent_completed property value. The percent_completed property +func (m *SubIssuesSummary) SetPercentCompleted(value *int32)() { + m.percent_completed = value +} +// SetTotal sets the total property value. The total property +func (m *SubIssuesSummary) SetTotal(value *int32)() { + m.total = value +} +type SubIssuesSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompleted()(*int32) + GetPercentCompleted()(*int32) + GetTotal()(*int32) + SetCompleted(value *int32)() + SetPercentCompleted(value *int32)() + SetTotal(value *int32)() +} diff --git a/pkg/github/repos/item_item_issues_item_sub_escaped_issue_delete_request_body.go b/pkg/github/repos/item_item_issues_item_sub_escaped_issue_delete_request_body.go new file mode 100644 index 00000000..f0d3875b --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_sub_escaped_issue_delete_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemSub_issueDeleteRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The sub-issue to remove + sub_issue_id *int32 +} +// NewItemItemIssuesItemSub_issueDeleteRequestBody instantiates a new ItemItemIssuesItemSub_issueDeleteRequestBody and sets the default values. +func NewItemItemIssuesItemSub_issueDeleteRequestBody()(*ItemItemIssuesItemSub_issueDeleteRequestBody) { + m := &ItemItemIssuesItemSub_issueDeleteRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemSub_issueDeleteRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemSub_issueDeleteRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemSub_issueDeleteRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["sub_issue_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubIssueId(val) + } + return nil + } + return res +} +// GetSubIssueId gets the sub_issue_id property value. The sub-issue to remove +// returns a *int32 when successful +func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) GetSubIssueId()(*int32) { + return m.sub_issue_id +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("sub_issue_id", m.GetSubIssueId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSubIssueId sets the sub_issue_id property value. The sub-issue to remove +func (m *ItemItemIssuesItemSub_issueDeleteRequestBody) SetSubIssueId(value *int32)() { + m.sub_issue_id = value +} +type ItemItemIssuesItemSub_issueDeleteRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSubIssueId()(*int32) + SetSubIssueId(value *int32)() +} diff --git a/pkg/github/repos/item_item_issues_item_sub_escaped_issue_request_builder.go b/pkg/github/repos/item_item_issues_item_sub_escaped_issue_request_builder.go new file mode 100644 index 00000000..a02d4018 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_sub_escaped_issue_request_builder.go @@ -0,0 +1,67 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemIssuesItemSub_issueRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\sub_issue +type ItemItemIssuesItemSub_issueRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemIssuesItemSub_issueRequestBuilderInternal instantiates a new ItemItemIssuesItemSub_issueRequestBuilder and sets the default values. +func NewItemItemIssuesItemSub_issueRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemSub_issueRequestBuilder) { + m := &ItemItemIssuesItemSub_issueRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issue", pathParameters), + } + return m +} +// NewItemItemIssuesItemSub_issueRequestBuilder instantiates a new ItemItemIssuesItemSub_issueRequestBuilder and sets the default values. +func NewItemItemIssuesItemSub_issueRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemSub_issueRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemSub_issueRequestBuilderInternal(urlParams, requestAdapter) +} +// Delete you can use the REST API to remove a sub-issue from an issue.Removing content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a Issueable when successful +// returns a BasicError error when the service returns a 400 status code +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/issues/sub-issues#remove-sub-issue +func (m *ItemItemIssuesItemSub_issueRequestBuilder) Delete(ctx context.Context, body ItemItemIssuesItemSub_issueDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Issueable, error) { + requestInfo, err := m.ToDeleteRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "400": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Issueable), nil +} +// ToDeleteRequestInformation you can use the REST API to remove a sub-issue from an issue.Removing content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemSub_issueRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemItemIssuesItemSub_issueDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemSub_issueRequestBuilder when successful +func (m *ItemItemIssuesItemSub_issueRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemSub_issueRequestBuilder) { + return NewItemItemIssuesItemSub_issueRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go new file mode 100644 index 00000000..0bae5fe1 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_post_request_body.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemSub_issuesPostRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Option that, when true, instructs the operation to replace the sub-issues current parent issue + replace_parent *bool + // The sub-issue to add + sub_issue_id *int32 +} +// NewItemItemIssuesItemSub_issuesPostRequestBody instantiates a new ItemItemIssuesItemSub_issuesPostRequestBody and sets the default values. +func NewItemItemIssuesItemSub_issuesPostRequestBody()(*ItemItemIssuesItemSub_issuesPostRequestBody) { + m := &ItemItemIssuesItemSub_issuesPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemSub_issuesPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemSub_issuesPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemSub_issuesPostRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["replace_parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetReplaceParent(val) + } + return nil + } + res["sub_issue_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubIssueId(val) + } + return nil + } + return res +} +// GetReplaceParent gets the replace_parent property value. Option that, when true, instructs the operation to replace the sub-issues current parent issue +// returns a *bool when successful +func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetReplaceParent()(*bool) { + return m.replace_parent +} +// GetSubIssueId gets the sub_issue_id property value. The sub-issue to add +// returns a *int32 when successful +func (m *ItemItemIssuesItemSub_issuesPostRequestBody) GetSubIssueId()(*int32) { + return m.sub_issue_id +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemSub_issuesPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("replace_parent", m.GetReplaceParent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("sub_issue_id", m.GetSubIssueId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesItemSub_issuesPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetReplaceParent sets the replace_parent property value. Option that, when true, instructs the operation to replace the sub-issues current parent issue +func (m *ItemItemIssuesItemSub_issuesPostRequestBody) SetReplaceParent(value *bool)() { + m.replace_parent = value +} +// SetSubIssueId sets the sub_issue_id property value. The sub-issue to add +func (m *ItemItemIssuesItemSub_issuesPostRequestBody) SetSubIssueId(value *int32)() { + m.sub_issue_id = value +} +type ItemItemIssuesItemSub_issuesPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReplaceParent()(*bool) + GetSubIssueId()(*int32) + SetReplaceParent(value *bool)() + SetSubIssueId(value *int32)() +} diff --git a/pkg/github/repos/item_item_issues_item_sub_escaped_issues_priority_patch_request_body.go b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_priority_patch_request_body.go new file mode 100644 index 00000000..682e710f --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_priority_patch_request_body.go @@ -0,0 +1,138 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemIssuesItemSub_issuesPriorityPatchRequestBody struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The id of the sub-issue to be prioritized after (either positional argument after OR before should be specified). + after_id *int32 + // The id of the sub-issue to be prioritized before (either positional argument after OR before should be specified). + before_id *int32 + // The id of the sub-issue to reprioritize + sub_issue_id *int32 +} +// NewItemItemIssuesItemSub_issuesPriorityPatchRequestBody instantiates a new ItemItemIssuesItemSub_issuesPriorityPatchRequestBody and sets the default values. +func NewItemItemIssuesItemSub_issuesPriorityPatchRequestBody()(*ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) { + m := &ItemItemIssuesItemSub_issuesPriorityPatchRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemIssuesItemSub_issuesPriorityPatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemIssuesItemSub_issuesPriorityPatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemIssuesItemSub_issuesPriorityPatchRequestBody(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAfterId gets the after_id property value. The id of the sub-issue to be prioritized after (either positional argument after OR before should be specified). +// returns a *int32 when successful +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) GetAfterId()(*int32) { + return m.after_id +} +// GetBeforeId gets the before_id property value. The id of the sub-issue to be prioritized before (either positional argument after OR before should be specified). +// returns a *int32 when successful +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) GetBeforeId()(*int32) { + return m.before_id +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["after_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAfterId(val) + } + return nil + } + res["before_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBeforeId(val) + } + return nil + } + res["sub_issue_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubIssueId(val) + } + return nil + } + return res +} +// GetSubIssueId gets the sub_issue_id property value. The id of the sub-issue to reprioritize +// returns a *int32 when successful +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) GetSubIssueId()(*int32) { + return m.sub_issue_id +} +// Serialize serializes information the current object +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("after_id", m.GetAfterId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("before_id", m.GetBeforeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("sub_issue_id", m.GetSubIssueId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAfterId sets the after_id property value. The id of the sub-issue to be prioritized after (either positional argument after OR before should be specified). +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) SetAfterId(value *int32)() { + m.after_id = value +} +// SetBeforeId sets the before_id property value. The id of the sub-issue to be prioritized before (either positional argument after OR before should be specified). +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) SetBeforeId(value *int32)() { + m.before_id = value +} +// SetSubIssueId sets the sub_issue_id property value. The id of the sub-issue to reprioritize +func (m *ItemItemIssuesItemSub_issuesPriorityPatchRequestBody) SetSubIssueId(value *int32)() { + m.sub_issue_id = value +} +type ItemItemIssuesItemSub_issuesPriorityPatchRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAfterId()(*int32) + GetBeforeId()(*int32) + GetSubIssueId()(*int32) + SetAfterId(value *int32)() + SetBeforeId(value *int32)() + SetSubIssueId(value *int32)() +} diff --git a/pkg/github/repos/item_item_issues_item_sub_escaped_issues_priority_request_builder.go b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_priority_request_builder.go new file mode 100644 index 00000000..3f91d4e9 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_priority_request_builder.go @@ -0,0 +1,71 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemIssuesItemSub_issuesPriorityRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\sub_issues\priority +type ItemItemIssuesItemSub_issuesPriorityRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// NewItemItemIssuesItemSub_issuesPriorityRequestBuilderInternal instantiates a new ItemItemIssuesItemSub_issuesPriorityRequestBuilder and sets the default values. +func NewItemItemIssuesItemSub_issuesPriorityRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemSub_issuesPriorityRequestBuilder) { + m := &ItemItemIssuesItemSub_issuesPriorityRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues/priority", pathParameters), + } + return m +} +// NewItemItemIssuesItemSub_issuesPriorityRequestBuilder instantiates a new ItemItemIssuesItemSub_issuesPriorityRequestBuilder and sets the default values. +func NewItemItemIssuesItemSub_issuesPriorityRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemSub_issuesPriorityRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemSub_issuesPriorityRequestBuilderInternal(urlParams, requestAdapter) +} +// Patch you can use the REST API to reprioritize a sub-issue to a different position in the parent list. +// returns a Issueable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a ValidationErrorSimple error when the service returns a 422 status code +// returns a Issue503Error error when the service returns a 503 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/issues/sub-issues#reprioritize-sub-issue +func (m *ItemItemIssuesItemSub_issuesPriorityRequestBuilder) Patch(ctx context.Context, body ItemItemIssuesItemSub_issuesPriorityPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Issueable, error) { + requestInfo, err := m.ToPatchRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorSimpleFromDiscriminatorValue, + "503": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateIssue503ErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Issueable), nil +} +// ToPatchRequestInformation you can use the REST API to reprioritize a sub-issue to a different position in the parent list. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemSub_issuesPriorityRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemItemIssuesItemSub_issuesPriorityPatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.PATCH, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemSub_issuesPriorityRequestBuilder when successful +func (m *ItemItemIssuesItemSub_issuesPriorityRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemSub_issuesPriorityRequestBuilder) { + return NewItemItemIssuesItemSub_issuesPriorityRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_item_sub_escaped_issues_request_builder.go b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_request_builder.go new file mode 100644 index 00000000..c14d5217 --- /dev/null +++ b/pkg/github/repos/item_item_issues_item_sub_escaped_issues_request_builder.go @@ -0,0 +1,119 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemIssuesItemSub_issuesRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\sub_issues +type ItemItemIssuesItemSub_issuesRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemIssuesItemSub_issuesRequestBuilderGetQueryParameters you can use the REST API to list the sub-issues on an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +type ItemItemIssuesItemSub_issuesRequestBuilderGetQueryParameters struct { + // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Page *int32 `uriparametername:"page"` + // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + Per_page *int32 `uriparametername:"per_page"` +} +// NewItemItemIssuesItemSub_issuesRequestBuilderInternal instantiates a new ItemItemIssuesItemSub_issuesRequestBuilder and sets the default values. +func NewItemItemIssuesItemSub_issuesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemSub_issuesRequestBuilder) { + m := &ItemItemIssuesItemSub_issuesRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues{?page*,per_page*}", pathParameters), + } + return m +} +// NewItemItemIssuesItemSub_issuesRequestBuilder instantiates a new ItemItemIssuesItemSub_issuesRequestBuilder and sets the default values. +func NewItemItemIssuesItemSub_issuesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemIssuesItemSub_issuesRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemIssuesItemSub_issuesRequestBuilderInternal(urlParams, requestAdapter) +} +// Get you can use the REST API to list the sub-issues on an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a []Issueable when successful +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/issues/sub-issues#list-sub-issues +func (m *ItemItemIssuesItemSub_issuesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemSub_issuesRequestBuilderGetQueryParameters])([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Issueable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "410": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.SendCollection(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + val := make([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Issueable, len(res)) + for i, v := range res { + if v != nil { + val[i] = v.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Issueable) + } + } + return val, nil +} +// Post you can use the REST API to add sub-issues to issues.Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a Issueable when successful +// returns a BasicError error when the service returns a 403 status code +// returns a BasicError error when the service returns a 404 status code +// returns a BasicError error when the service returns a 410 status code +// returns a ValidationError error when the service returns a 422 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/issues/sub-issues#add-sub-issue +func (m *ItemItemIssuesItemSub_issuesRequestBuilder) Post(ctx context.Context, body ItemItemIssuesItemSub_issuesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Issueable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "410": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateIssueFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Issueable), nil +} +// Priority the priority property +// returns a *ItemItemIssuesItemSub_issuesPriorityRequestBuilder when successful +func (m *ItemItemIssuesItemSub_issuesRequestBuilder) Priority()(*ItemItemIssuesItemSub_issuesPriorityRequestBuilder) { + return NewItemItemIssuesItemSub_issuesPriorityRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// ToGetRequestInformation you can use the REST API to list the sub-issues on an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemSub_issuesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemIssuesItemSub_issuesRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} +// ToPostRequestInformation you can use the REST API to add sub-issues to issues.Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. +// returns a *RequestInformation when successful +func (m *ItemItemIssuesItemSub_issuesRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemIssuesItemSub_issuesPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) + requestInfo.Headers.TryAdd("Accept", "application/json") + err := requestInfo.SetContentFromParsable(ctx, m.BaseRequestBuilder.RequestAdapter, "application/json", body) + if err != nil { + return nil, err + } + return requestInfo, nil +} +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +// returns a *ItemItemIssuesItemSub_issuesRequestBuilder when successful +func (m *ItemItemIssuesItemSub_issuesRequestBuilder) WithUrl(rawUrl string)(*ItemItemIssuesItemSub_issuesRequestBuilder) { + return NewItemItemIssuesItemSub_issuesRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_issues_with_issue_escaped_number_item_request_builder.go b/pkg/github/repos/item_item_issues_with_issue_escaped_number_item_request_builder.go index 4e98ebf7..26e3e227 100644 --- a/pkg/github/repos/item_item_issues_with_issue_escaped_number_item_request_builder.go +++ b/pkg/github/repos/item_item_issues_with_issue_escaped_number_item_request_builder.go @@ -109,6 +109,16 @@ func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Patch(ctx context.Con func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Reactions()(*ItemItemIssuesItemReactionsRequestBuilder) { return NewItemItemIssuesItemReactionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Sub_issue the sub_issue property +// returns a *ItemItemIssuesItemSub_issueRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Sub_issue()(*ItemItemIssuesItemSub_issueRequestBuilder) { + return NewItemItemIssuesItemSub_issueRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} +// Sub_issues the sub_issues property +// returns a *ItemItemIssuesItemSub_issuesRequestBuilder when successful +func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Sub_issues()(*ItemItemIssuesItemSub_issuesRequestBuilder) { + return NewItemItemIssuesItemSub_issuesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Timeline the timeline property // returns a *ItemItemIssuesItemTimelineRequestBuilder when successful func (m *ItemItemIssuesWithIssue_numberItemRequestBuilder) Timeline()(*ItemItemIssuesItemTimelineRequestBuilder) { From d19124d5a104454a45bb72390b8f95ab3b8f890c Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Tue, 3 Dec 2024 00:11:14 +0000 Subject: [PATCH 11/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/orgs/item_hooks_request_builder.go | 6 +++--- .../item_hooks_with_hook_escaped_item_request_builder.go | 4 ++-- ...tem_item_hooks_with_hook_escaped_item_request_builder.go | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 279bc46f..5e5c82b5 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "C966AA1F69D8C99B1BFB2C98E13B04FEB083AECF171723D11080BEA576A1890D098CCDDFBFA347E6623377889E6414EBA6BCE196AA71D829CC01B9D7F49C3D58", + "descriptionHash": "BBF7C7349BB3868C068B4E567070DB695192AE635A18EBE7A46181BC90535CA703D543D6BC3F3B7FCEDAD257CA811839C5854873707A75CD4FFAAC0F5F738977", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/orgs/item_hooks_request_builder.go b/pkg/github/orgs/item_hooks_request_builder.go index 97347a47..57132e92 100644 --- a/pkg/github/orgs/item_hooks_request_builder.go +++ b/pkg/github/orgs/item_hooks_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemHooksRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemHooksRequestBuilderGetQueryParameters you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// ItemHooksRequestBuilderGetQueryParameters list webhooks for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. type ItemHooksRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -41,7 +41,7 @@ func NewItemHooksRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee2633 urlParams["request-raw-url"] = rawUrl return NewItemHooksRequestBuilderInternal(urlParams, requestAdapter) } -// Get you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// Get list webhooks for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. // returns a []OrgHookable when successful // returns a BasicError error when the service returns a 404 status code // [API method documentation] @@ -92,7 +92,7 @@ func (m *ItemHooksRequestBuilder) Post(ctx context.Context, body ItemHooksPostRe } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.OrgHookable), nil } -// ToGetRequestInformation you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// ToGetRequestInformation list webhooks for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. // returns a *RequestInformation when successful func (m *ItemHooksRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemHooksRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_hooks_with_hook_escaped_item_request_builder.go b/pkg/github/orgs/item_hooks_with_hook_escaped_item_request_builder.go index 213293bd..9a89da55 100644 --- a/pkg/github/orgs/item_hooks_with_hook_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_hooks_with_hook_escaped_item_request_builder.go @@ -28,7 +28,7 @@ func NewItemHooksWithHook_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4 urlParams["request-raw-url"] = rawUrl return NewItemHooksWithHook_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// Delete delete a webhook for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. // returns a BasicError error when the service returns a 404 status code // [API method documentation] // @@ -105,7 +105,7 @@ func (m *ItemHooksWithHook_ItemRequestBuilder) Patch(ctx context.Context, body I func (m *ItemHooksWithHook_ItemRequestBuilder) Pings()(*ItemHooksItemPingsRequestBuilder) { return NewItemHooksItemPingsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToDeleteRequestInformation you must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. +// ToDeleteRequestInformation delete a webhook for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. // returns a *RequestInformation when successful func (m *ItemHooksWithHook_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_hooks_with_hook_escaped_item_request_builder.go b/pkg/github/repos/item_item_hooks_with_hook_escaped_item_request_builder.go index fe0edb16..737b10b8 100644 --- a/pkg/github/repos/item_item_hooks_with_hook_escaped_item_request_builder.go +++ b/pkg/github/repos/item_item_hooks_with_hook_escaped_item_request_builder.go @@ -28,7 +28,7 @@ func NewItemItemHooksWithHook_ItemRequestBuilder(rawUrl string, requestAdapter i urlParams["request-raw-url"] = rawUrl return NewItemItemHooksWithHook_ItemRequestBuilderInternal(urlParams, requestAdapter) } -// Delete delete a repository webhook +// Delete delete a webhook for an organization.The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. // returns a BasicError error when the service returns a 404 status code // [API method documentation] // @@ -110,6 +110,7 @@ func (m *ItemItemHooksWithHook_ItemRequestBuilder) Pings()(*ItemItemHooksItemPin func (m *ItemItemHooksWithHook_ItemRequestBuilder) Tests()(*ItemItemHooksItemTestsRequestBuilder) { return NewItemItemHooksItemTestsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ToDeleteRequestInformation delete a webhook for an organization.The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. // returns a *RequestInformation when successful func (m *ItemItemHooksWithHook_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) From 173d2971d1ddffcaf521127c83635827fa0fa258 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Wed, 4 Dec 2024 00:10:05 +0000 Subject: [PATCH 12/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- ..._item_commits_commit_escaped_sha_item_request_builder.go | 6 +++--- pkg/github/repos/item_item_commits_request_builder.go | 6 +++--- .../item_item_compare_with_basehead_item_request_builder.go | 6 +++--- pkg/github/repos/item_item_git_commits_request_builder.go | 4 ++-- ..._commits_with_commit_escaped_sha_item_request_builder.go | 4 ++-- pkg/github/repos/item_item_git_tags_request_builder.go | 4 ++-- ...em_git_tags_with_tag_escaped_sha_item_request_builder.go | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 5e5c82b5..64341647 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "BBF7C7349BB3868C068B4E567070DB695192AE635A18EBE7A46181BC90535CA703D543D6BC3F3B7FCEDAD257CA811839C5854873707A75CD4FFAAC0F5F738977", + "descriptionHash": "247F166DCC16C9D6A8A5EBC7483603178FCE1344AA4751A77249627F790966ABB58CD29302790763E21952A7FBC459BAC58A66041A5A36DDEE80974707F6476D", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/repos/item_item_commits_commit_escaped_sha_item_request_builder.go b/pkg/github/repos/item_item_commits_commit_escaped_sha_item_request_builder.go index c8152a79..00a95da3 100644 --- a/pkg/github/repos/item_item_commits_commit_escaped_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_commits_commit_escaped_sha_item_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemItemCommitsCommit_shaItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | type ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -50,7 +50,7 @@ func NewItemItemCommitsCommit_shaItemRequestBuilder(rawUrl string, requestAdapte urlParams["request-raw-url"] = rawUrl return NewItemItemCommitsCommit_shaItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a Commitable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 409 status code @@ -96,7 +96,7 @@ func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Status()(*ItemItemCommitsI func (m *ItemItemCommitsCommit_shaItemRequestBuilder) Statuses()(*ItemItemCommitsItemStatusesRequestBuilder) { return NewItemItemCommitsItemStatusesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } -// ToGetRequestInformation returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemCommitsCommit_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsCommit_shaItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_commits_request_builder.go b/pkg/github/repos/item_item_commits_request_builder.go index 821a41c3..e73a9783 100644 --- a/pkg/github/repos/item_item_commits_request_builder.go +++ b/pkg/github/repos/item_item_commits_request_builder.go @@ -11,7 +11,7 @@ import ( type ItemItemCommitsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemCommitsRequestBuilderGetQueryParameters **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ItemItemCommitsRequestBuilderGetQueryParameters **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | type ItemItemCommitsRequestBuilderGetQueryParameters struct { // GitHub username or email address to use to filter by commit author. Author *string `uriparametername:"author"` @@ -55,7 +55,7 @@ func NewItemItemCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da urlParams["request-raw-url"] = rawUrl return NewItemItemCommitsRequestBuilderInternal(urlParams, requestAdapter) } -// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a []Commitable when successful // returns a BasicError error when the service returns a 400 status code // returns a BasicError error when the service returns a 404 status code @@ -87,7 +87,7 @@ func (m *ItemItemCommitsRequestBuilder) Get(ctx context.Context, requestConfigur } return val, nil } -// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemCommitsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCommitsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go b/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go index 3b10de36..6f053274 100644 --- a/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go +++ b/pkg/github/repos/item_item_compare_with_basehead_item_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemItemCompareWithBaseheadItemRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | type ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -30,7 +30,7 @@ func NewItemItemCompareWithBaseheadItemRequestBuilder(rawUrl string, requestAdap urlParams["request-raw-url"] = rawUrl return NewItemItemCompareWithBaseheadItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a CommitComparisonable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 500 status code @@ -57,7 +57,7 @@ func (m *ItemItemCompareWithBaseheadItemRequestBuilder) Get(ctx context.Context, } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CommitComparisonable), nil } -// ToGetRequestInformation compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemCompareWithBaseheadItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemCompareWithBaseheadItemRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_git_commits_request_builder.go b/pkg/github/repos/item_item_git_commits_request_builder.go index e58a64ea..53ade71b 100644 --- a/pkg/github/repos/item_item_git_commits_request_builder.go +++ b/pkg/github/repos/item_item_git_commits_request_builder.go @@ -35,7 +35,7 @@ func NewItemItemGitCommitsRequestBuilder(rawUrl string, requestAdapter i2ae4187f urlParams["request-raw-url"] = rawUrl return NewItemItemGitCommitsRequestBuilderInternal(urlParams, requestAdapter) } -// Post creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Post creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitCommitable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 409 status code @@ -62,7 +62,7 @@ func (m *ItemItemGitCommitsRequestBuilder) Post(ctx context.Context, body ItemIt } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.GitCommitable), nil } -// ToPostRequestInformation creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToPostRequestInformation creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemGitCommitsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGitCommitsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_git_commits_with_commit_escaped_sha_item_request_builder.go b/pkg/github/repos/item_item_git_commits_with_commit_escaped_sha_item_request_builder.go index 936cfcbc..a3cbdad8 100644 --- a/pkg/github/repos/item_item_git_commits_with_commit_escaped_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_git_commits_with_commit_escaped_sha_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemGitCommitsWithCommit_shaItemRequestBuilder(rawUrl string, reques urlParams["request-raw-url"] = rawUrl return NewItemItemGitCommitsWithCommit_shaItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitCommitable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 409 status code @@ -48,7 +48,7 @@ func (m *ItemItemGitCommitsWithCommit_shaItemRequestBuilder) Get(ctx context.Con } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.GitCommitable), nil } -// ToGetRequestInformation gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemGitCommitsWithCommit_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_git_tags_request_builder.go b/pkg/github/repos/item_item_git_tags_request_builder.go index b539d619..d68eee2a 100644 --- a/pkg/github/repos/item_item_git_tags_request_builder.go +++ b/pkg/github/repos/item_item_git_tags_request_builder.go @@ -35,7 +35,7 @@ func NewItemItemGitTagsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7da urlParams["request-raw-url"] = rawUrl return NewItemItemGitTagsRequestBuilderInternal(urlParams, requestAdapter) } -// Post note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Post note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitTagable when successful // returns a BasicError error when the service returns a 409 status code // returns a ValidationError error when the service returns a 422 status code @@ -60,7 +60,7 @@ func (m *ItemItemGitTagsRequestBuilder) Post(ctx context.Context, body ItemItemG } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.GitTagable), nil } -// ToPostRequestInformation note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToPostRequestInformation note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemGitTagsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemGitTagsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/repos/item_item_git_tags_with_tag_escaped_sha_item_request_builder.go b/pkg/github/repos/item_item_git_tags_with_tag_escaped_sha_item_request_builder.go index f66097e2..e3998bc9 100644 --- a/pkg/github/repos/item_item_git_tags_with_tag_escaped_sha_item_request_builder.go +++ b/pkg/github/repos/item_item_git_tags_with_tag_escaped_sha_item_request_builder.go @@ -23,7 +23,7 @@ func NewItemItemGitTagsWithTag_shaItemRequestBuilder(rawUrl string, requestAdapt urlParams["request-raw-url"] = rawUrl return NewItemItemGitTagsWithTag_shaItemRequestBuilderInternal(urlParams, requestAdapter) } -// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// Get **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a GitTagable when successful // returns a BasicError error when the service returns a 404 status code // returns a BasicError error when the service returns a 409 status code @@ -48,7 +48,7 @@ func (m *ItemItemGitTagsWithTag_shaItemRequestBuilder) Get(ctx context.Context, } return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.GitTagable), nil } -// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | +// ToGetRequestInformation **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | // returns a *RequestInformation when successful func (m *ItemItemGitTagsWithTag_shaItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) From 6e47b0575f6ee133da1fa19cc2459cbdac18df02 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 6 Dec 2024 00:10:26 +0000 Subject: [PATCH 13/14] New updates to generated code --- ...am_item_copilot_metrics_request_builder.go | 6 +- ...team_item_copilot_usage_request_builder.go | 6 +- pkg/github/kiota-lock.json | 2 +- ...b59492eadd3e4017b0a48943c55b6b91eae9285.go | 111 ++++++++++++++++++ .../code_scanning_default_setup_options.go | 111 ++++++++++++++++++ ...tup_options_escaped_runner_escaped_type.go | 37 ++++++ .../code_scanning_default_setup_update.go | 59 ++++++++++ ...etup_update_escaped_runner_escaped_type.go | 34 ++++++ .../models/code_security_configuration.go | 29 +++++ ...58a5a9e3ba9faad24f475c69d5a05a975db2dfa.go | 37 ++++++ pkg/github/models/secret_scanning_scan.go | 18 +-- ...onfiguration_escaped_patch_request_body.go | 30 +++++ ...curity_configurations_post_request_body.go | 30 +++++ ..._selected_escaped_teams_request_builder.go | 8 +- ..._selected_escaped_users_request_builder.go | 8 +- ...with_actor_escaped_item_request_builder.go | 4 +- ...ights_api_subject_stats_request_builder.go | 4 +- ..._with_user_escaped_item_request_builder.go | 4 +- 18 files changed, 511 insertions(+), 27 deletions(-) create mode 100644 pkg/github/models/325f8ea3c936a82756cbc60bbb59492eadd3e4017b0a48943c55b6b91eae9285.go create mode 100644 pkg/github/models/code_scanning_default_setup_options.go create mode 100644 pkg/github/models/code_scanning_default_setup_options_escaped_runner_escaped_type.go create mode 100644 pkg/github/models/code_scanning_default_setup_update_escaped_runner_escaped_type.go create mode 100644 pkg/github/models/e33943afdb81c0ec9c82b1d4d58a5a9e3ba9faad24f475c69d5a05a975db2dfa.go diff --git a/pkg/github/enterprises/item_team_item_copilot_metrics_request_builder.go b/pkg/github/enterprises/item_team_item_copilot_metrics_request_builder.go index 2456168b..24dd7c96 100644 --- a/pkg/github/enterprises/item_team_item_copilot_metrics_request_builder.go +++ b/pkg/github/enterprises/item_team_item_copilot_metrics_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemTeamItemCopilotMetricsRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. type ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -34,7 +34,7 @@ func NewItemTeamItemCopilotMetricsRequestBuilder(rawUrl string, requestAdapter i urlParams["request-raw-url"] = rawUrl return NewItemTeamItemCopilotMetricsRequestBuilderInternal(urlParams, requestAdapter) } -// Get use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a []CopilotUsageMetricsDayable when successful // returns a BasicError error when the service returns a 403 status code // returns a BasicError error when the service returns a 404 status code @@ -66,7 +66,7 @@ func (m *ItemTeamItemCopilotMetricsRequestBuilder) Get(ctx context.Context, requ } return val, nil } -// ToGetRequestInformation use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemTeamItemCopilotMetricsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotMetricsRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/enterprises/item_team_item_copilot_usage_request_builder.go b/pkg/github/enterprises/item_team_item_copilot_usage_request_builder.go index 6b42157b..b0409e71 100644 --- a/pkg/github/enterprises/item_team_item_copilot_usage_request_builder.go +++ b/pkg/github/enterprises/item_team_item_copilot_usage_request_builder.go @@ -10,7 +10,7 @@ import ( type ItemTeamItemCopilotUsageRequestBuilder struct { i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder } -// ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters > [!NOTE]> This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. type ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters struct { // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` @@ -34,7 +34,7 @@ func NewItemTeamItemCopilotUsageRequestBuilder(rawUrl string, requestAdapter i2a urlParams["request-raw-url"] = rawUrl return NewItemTeamItemCopilotUsageRequestBuilderInternal(urlParams, requestAdapter) } -// Get > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// Get > [!NOTE]> This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a []CopilotUsageMetricsable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -66,7 +66,7 @@ func (m *ItemTeamItemCopilotUsageRequestBuilder) Get(ctx context.Context, reques } return val, nil } -// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. +// ToGetRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemTeamItemCopilotUsageRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemTeamItemCopilotUsageRequestBuilderGetQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 64341647..7234d69a 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "247F166DCC16C9D6A8A5EBC7483603178FCE1344AA4751A77249627F790966ABB58CD29302790763E21952A7FBC459BAC58A66041A5A36DDEE80974707F6476D", + "descriptionHash": "A15CBDE583A29CD0CF5D52E1824B631949336666270FA4CD8183CF78DFD97CD38B54A99A8D168D5F1924C7846A68FFE32B81A9D6C1A90A48309F1E7CF81CF9BB", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/325f8ea3c936a82756cbc60bbb59492eadd3e4017b0a48943c55b6b91eae9285.go b/pkg/github/models/325f8ea3c936a82756cbc60bbb59492eadd3e4017b0a48943c55b6b91eae9285.go new file mode 100644 index 00000000..728d3428 --- /dev/null +++ b/pkg/github/models/325f8ea3c936a82756cbc60bbb59492eadd3e4017b0a48943c55b6b91eae9285.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeSecurityConfiguration_code_scanning_default_setup_options feature options for code scanning default setup +type CodeSecurityConfiguration_code_scanning_default_setup_options struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The label of the runner to use for code scanning when runner_type is 'labeled'. + runner_label *string + // Whether to use labeled runners or standard GitHub runners. + runner_type *CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type +} +// NewCodeSecurityConfiguration_code_scanning_default_setup_options instantiates a new CodeSecurityConfiguration_code_scanning_default_setup_options and sets the default values. +func NewCodeSecurityConfiguration_code_scanning_default_setup_options()(*CodeSecurityConfiguration_code_scanning_default_setup_options) { + m := &CodeSecurityConfiguration_code_scanning_default_setup_options{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeSecurityConfiguration_code_scanning_default_setup_optionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeSecurityConfiguration_code_scanning_default_setup_optionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeSecurityConfiguration_code_scanning_default_setup_options(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeSecurityConfiguration_code_scanning_default_setup_options) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeSecurityConfiguration_code_scanning_default_setup_options) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runner_label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunnerLabel(val) + } + return nil + } + res["runner_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeSecurityConfiguration_code_scanning_default_setup_options_runner_type) + if err != nil { + return err + } + if val != nil { + m.SetRunnerType(val.(*CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type)) + } + return nil + } + return res +} +// GetRunnerLabel gets the runner_label property value. The label of the runner to use for code scanning when runner_type is 'labeled'. +// returns a *string when successful +func (m *CodeSecurityConfiguration_code_scanning_default_setup_options) GetRunnerLabel()(*string) { + return m.runner_label +} +// GetRunnerType gets the runner_type property value. Whether to use labeled runners or standard GitHub runners. +// returns a *CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type when successful +func (m *CodeSecurityConfiguration_code_scanning_default_setup_options) GetRunnerType()(*CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type) { + return m.runner_type +} +// Serialize serializes information the current object +func (m *CodeSecurityConfiguration_code_scanning_default_setup_options) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("runner_label", m.GetRunnerLabel()) + if err != nil { + return err + } + } + if m.GetRunnerType() != nil { + cast := (*m.GetRunnerType()).String() + err := writer.WriteStringValue("runner_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeSecurityConfiguration_code_scanning_default_setup_options) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunnerLabel sets the runner_label property value. The label of the runner to use for code scanning when runner_type is 'labeled'. +func (m *CodeSecurityConfiguration_code_scanning_default_setup_options) SetRunnerLabel(value *string)() { + m.runner_label = value +} +// SetRunnerType sets the runner_type property value. Whether to use labeled runners or standard GitHub runners. +func (m *CodeSecurityConfiguration_code_scanning_default_setup_options) SetRunnerType(value *CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type)() { + m.runner_type = value +} +type CodeSecurityConfiguration_code_scanning_default_setup_optionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunnerLabel()(*string) + GetRunnerType()(*CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type) + SetRunnerLabel(value *string)() + SetRunnerType(value *CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type)() +} diff --git a/pkg/github/models/code_scanning_default_setup_options.go b/pkg/github/models/code_scanning_default_setup_options.go new file mode 100644 index 00000000..67b08236 --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_options.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CodeScanningDefaultSetupOptions feature options for code scanning default setup +type CodeScanningDefaultSetupOptions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The label of the runner to use for code scanning default setup when runner_type is 'labeled'. + runner_label *string + // Whether to use labeled runners or standard GitHub runners. + runner_type *CodeScanningDefaultSetupOptions_runner_type +} +// NewCodeScanningDefaultSetupOptions instantiates a new CodeScanningDefaultSetupOptions and sets the default values. +func NewCodeScanningDefaultSetupOptions()(*CodeScanningDefaultSetupOptions) { + m := &CodeScanningDefaultSetupOptions{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateCodeScanningDefaultSetupOptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateCodeScanningDefaultSetupOptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCodeScanningDefaultSetupOptions(), nil +} +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +// returns a map[string]any when successful +func (m *CodeScanningDefaultSetupOptions) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *CodeScanningDefaultSetupOptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["runner_label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunnerLabel(val) + } + return nil + } + res["runner_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningDefaultSetupOptions_runner_type) + if err != nil { + return err + } + if val != nil { + m.SetRunnerType(val.(*CodeScanningDefaultSetupOptions_runner_type)) + } + return nil + } + return res +} +// GetRunnerLabel gets the runner_label property value. The label of the runner to use for code scanning default setup when runner_type is 'labeled'. +// returns a *string when successful +func (m *CodeScanningDefaultSetupOptions) GetRunnerLabel()(*string) { + return m.runner_label +} +// GetRunnerType gets the runner_type property value. Whether to use labeled runners or standard GitHub runners. +// returns a *CodeScanningDefaultSetupOptions_runner_type when successful +func (m *CodeScanningDefaultSetupOptions) GetRunnerType()(*CodeScanningDefaultSetupOptions_runner_type) { + return m.runner_type +} +// Serialize serializes information the current object +func (m *CodeScanningDefaultSetupOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("runner_label", m.GetRunnerLabel()) + if err != nil { + return err + } + } + if m.GetRunnerType() != nil { + cast := (*m.GetRunnerType()).String() + err := writer.WriteStringValue("runner_type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *CodeScanningDefaultSetupOptions) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRunnerLabel sets the runner_label property value. The label of the runner to use for code scanning default setup when runner_type is 'labeled'. +func (m *CodeScanningDefaultSetupOptions) SetRunnerLabel(value *string)() { + m.runner_label = value +} +// SetRunnerType sets the runner_type property value. Whether to use labeled runners or standard GitHub runners. +func (m *CodeScanningDefaultSetupOptions) SetRunnerType(value *CodeScanningDefaultSetupOptions_runner_type)() { + m.runner_type = value +} +type CodeScanningDefaultSetupOptionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunnerLabel()(*string) + GetRunnerType()(*CodeScanningDefaultSetupOptions_runner_type) + SetRunnerLabel(value *string)() + SetRunnerType(value *CodeScanningDefaultSetupOptions_runner_type)() +} diff --git a/pkg/github/models/code_scanning_default_setup_options_escaped_runner_escaped_type.go b/pkg/github/models/code_scanning_default_setup_options_escaped_runner_escaped_type.go new file mode 100644 index 00000000..c30919b4 --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_options_escaped_runner_escaped_type.go @@ -0,0 +1,37 @@ +package models +// Whether to use labeled runners or standard GitHub runners. +type CodeScanningDefaultSetupOptions_runner_type int + +const ( + STANDARD_CODESCANNINGDEFAULTSETUPOPTIONS_RUNNER_TYPE CodeScanningDefaultSetupOptions_runner_type = iota + LABELED_CODESCANNINGDEFAULTSETUPOPTIONS_RUNNER_TYPE + NOT_SET_CODESCANNINGDEFAULTSETUPOPTIONS_RUNNER_TYPE +) + +func (i CodeScanningDefaultSetupOptions_runner_type) String() string { + return []string{"standard", "labeled", "not_set"}[i] +} +func ParseCodeScanningDefaultSetupOptions_runner_type(v string) (any, error) { + result := STANDARD_CODESCANNINGDEFAULTSETUPOPTIONS_RUNNER_TYPE + switch v { + case "standard": + result = STANDARD_CODESCANNINGDEFAULTSETUPOPTIONS_RUNNER_TYPE + case "labeled": + result = LABELED_CODESCANNINGDEFAULTSETUPOPTIONS_RUNNER_TYPE + case "not_set": + result = NOT_SET_CODESCANNINGDEFAULTSETUPOPTIONS_RUNNER_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeCodeScanningDefaultSetupOptions_runner_type(values []CodeScanningDefaultSetupOptions_runner_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetupOptions_runner_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_scanning_default_setup_update.go b/pkg/github/models/code_scanning_default_setup_update.go index afe9a8c2..bdc9c7ed 100644 --- a/pkg/github/models/code_scanning_default_setup_update.go +++ b/pkg/github/models/code_scanning_default_setup_update.go @@ -10,6 +10,10 @@ type CodeScanningDefaultSetupUpdate struct { languages []CodeScanningDefaultSetupUpdate_languages // CodeQL query suite to be used. query_suite *CodeScanningDefaultSetupUpdate_query_suite + // Runner label to be used if the runner type is labeled. + runner_label *string + // Runner type to be used. + runner_type *CodeScanningDefaultSetupUpdate_runner_type // The desired state of code scanning default setup. state *CodeScanningDefaultSetupUpdate_state } @@ -54,6 +58,26 @@ func (m *CodeScanningDefaultSetupUpdate) GetFieldDeserializers()(map[string]func } return nil } + res["runner_label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunnerLabel(val) + } + return nil + } + res["runner_type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCodeScanningDefaultSetupUpdate_runner_type) + if err != nil { + return err + } + if val != nil { + m.SetRunnerType(val.(*CodeScanningDefaultSetupUpdate_runner_type)) + } + return nil + } res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseCodeScanningDefaultSetupUpdate_state) if err != nil { @@ -76,6 +100,16 @@ func (m *CodeScanningDefaultSetupUpdate) GetLanguages()([]CodeScanningDefaultSet func (m *CodeScanningDefaultSetupUpdate) GetQuerySuite()(*CodeScanningDefaultSetupUpdate_query_suite) { return m.query_suite } +// GetRunnerLabel gets the runner_label property value. Runner label to be used if the runner type is labeled. +// returns a *string when successful +func (m *CodeScanningDefaultSetupUpdate) GetRunnerLabel()(*string) { + return m.runner_label +} +// GetRunnerType gets the runner_type property value. Runner type to be used. +// returns a *CodeScanningDefaultSetupUpdate_runner_type when successful +func (m *CodeScanningDefaultSetupUpdate) GetRunnerType()(*CodeScanningDefaultSetupUpdate_runner_type) { + return m.runner_type +} // GetState gets the state property value. The desired state of code scanning default setup. // returns a *CodeScanningDefaultSetupUpdate_state when successful func (m *CodeScanningDefaultSetupUpdate) GetState()(*CodeScanningDefaultSetupUpdate_state) { @@ -96,6 +130,19 @@ func (m *CodeScanningDefaultSetupUpdate) Serialize(writer i878a80d2330e89d268963 return err } } + { + err := writer.WriteStringValue("runner_label", m.GetRunnerLabel()) + if err != nil { + return err + } + } + if m.GetRunnerType() != nil { + cast := (*m.GetRunnerType()).String() + err := writer.WriteStringValue("runner_type", &cast) + if err != nil { + return err + } + } if m.GetState() != nil { cast := (*m.GetState()).String() err := writer.WriteStringValue("state", &cast) @@ -113,6 +160,14 @@ func (m *CodeScanningDefaultSetupUpdate) SetLanguages(value []CodeScanningDefaul func (m *CodeScanningDefaultSetupUpdate) SetQuerySuite(value *CodeScanningDefaultSetupUpdate_query_suite)() { m.query_suite = value } +// SetRunnerLabel sets the runner_label property value. Runner label to be used if the runner type is labeled. +func (m *CodeScanningDefaultSetupUpdate) SetRunnerLabel(value *string)() { + m.runner_label = value +} +// SetRunnerType sets the runner_type property value. Runner type to be used. +func (m *CodeScanningDefaultSetupUpdate) SetRunnerType(value *CodeScanningDefaultSetupUpdate_runner_type)() { + m.runner_type = value +} // SetState sets the state property value. The desired state of code scanning default setup. func (m *CodeScanningDefaultSetupUpdate) SetState(value *CodeScanningDefaultSetupUpdate_state)() { m.state = value @@ -121,8 +176,12 @@ type CodeScanningDefaultSetupUpdateable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetLanguages()([]CodeScanningDefaultSetupUpdate_languages) GetQuerySuite()(*CodeScanningDefaultSetupUpdate_query_suite) + GetRunnerLabel()(*string) + GetRunnerType()(*CodeScanningDefaultSetupUpdate_runner_type) GetState()(*CodeScanningDefaultSetupUpdate_state) SetLanguages(value []CodeScanningDefaultSetupUpdate_languages)() SetQuerySuite(value *CodeScanningDefaultSetupUpdate_query_suite)() + SetRunnerLabel(value *string)() + SetRunnerType(value *CodeScanningDefaultSetupUpdate_runner_type)() SetState(value *CodeScanningDefaultSetupUpdate_state)() } diff --git a/pkg/github/models/code_scanning_default_setup_update_escaped_runner_escaped_type.go b/pkg/github/models/code_scanning_default_setup_update_escaped_runner_escaped_type.go new file mode 100644 index 00000000..81c2fd03 --- /dev/null +++ b/pkg/github/models/code_scanning_default_setup_update_escaped_runner_escaped_type.go @@ -0,0 +1,34 @@ +package models +// Runner type to be used. +type CodeScanningDefaultSetupUpdate_runner_type int + +const ( + STANDARD_CODESCANNINGDEFAULTSETUPUPDATE_RUNNER_TYPE CodeScanningDefaultSetupUpdate_runner_type = iota + LABELED_CODESCANNINGDEFAULTSETUPUPDATE_RUNNER_TYPE +) + +func (i CodeScanningDefaultSetupUpdate_runner_type) String() string { + return []string{"standard", "labeled"}[i] +} +func ParseCodeScanningDefaultSetupUpdate_runner_type(v string) (any, error) { + result := STANDARD_CODESCANNINGDEFAULTSETUPUPDATE_RUNNER_TYPE + switch v { + case "standard": + result = STANDARD_CODESCANNINGDEFAULTSETUPUPDATE_RUNNER_TYPE + case "labeled": + result = LABELED_CODESCANNINGDEFAULTSETUPUPDATE_RUNNER_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeCodeScanningDefaultSetupUpdate_runner_type(values []CodeScanningDefaultSetupUpdate_runner_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeScanningDefaultSetupUpdate_runner_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/code_security_configuration.go b/pkg/github/models/code_security_configuration.go index 7a4c75b3..af22e337 100644 --- a/pkg/github/models/code_security_configuration.go +++ b/pkg/github/models/code_security_configuration.go @@ -13,6 +13,8 @@ type CodeSecurityConfiguration struct { advanced_security *CodeSecurityConfiguration_advanced_security // The enablement status of code scanning default setup code_scanning_default_setup *CodeSecurityConfiguration_code_scanning_default_setup + // Feature options for code scanning default setup + code_scanning_default_setup_options CodeSecurityConfiguration_code_scanning_default_setup_optionsable // The created_at property created_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time // The enablement status of Dependabot alerts @@ -83,6 +85,11 @@ func (m *CodeSecurityConfiguration) GetAdvancedSecurity()(*CodeSecurityConfigura func (m *CodeSecurityConfiguration) GetCodeScanningDefaultSetup()(*CodeSecurityConfiguration_code_scanning_default_setup) { return m.code_scanning_default_setup } +// GetCodeScanningDefaultSetupOptions gets the code_scanning_default_setup_options property value. Feature options for code scanning default setup +// returns a CodeSecurityConfiguration_code_scanning_default_setup_optionsable when successful +func (m *CodeSecurityConfiguration) GetCodeScanningDefaultSetupOptions()(CodeSecurityConfiguration_code_scanning_default_setup_optionsable) { + return m.code_scanning_default_setup_options +} // GetCreatedAt gets the created_at property value. The created_at property // returns a *Time when successful func (m *CodeSecurityConfiguration) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { @@ -147,6 +154,16 @@ func (m *CodeSecurityConfiguration) GetFieldDeserializers()(map[string]func(i878 } return nil } + res["code_scanning_default_setup_options"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCodeSecurityConfiguration_code_scanning_default_setup_optionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeScanningDefaultSetupOptions(val.(CodeSecurityConfiguration_code_scanning_default_setup_optionsable)) + } + return nil + } res["created_at"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { @@ -440,6 +457,12 @@ func (m *CodeSecurityConfiguration) Serialize(writer i878a80d2330e89d26896388a3f return err } } + { + err := writer.WriteObjectValue("code_scanning_default_setup_options", m.GetCodeScanningDefaultSetupOptions()) + if err != nil { + return err + } + } { err := writer.WriteTimeValue("created_at", m.GetCreatedAt()) if err != nil { @@ -598,6 +621,10 @@ func (m *CodeSecurityConfiguration) SetAdvancedSecurity(value *CodeSecurityConfi func (m *CodeSecurityConfiguration) SetCodeScanningDefaultSetup(value *CodeSecurityConfiguration_code_scanning_default_setup)() { m.code_scanning_default_setup = value } +// SetCodeScanningDefaultSetupOptions sets the code_scanning_default_setup_options property value. Feature options for code scanning default setup +func (m *CodeSecurityConfiguration) SetCodeScanningDefaultSetupOptions(value CodeSecurityConfiguration_code_scanning_default_setup_optionsable)() { + m.code_scanning_default_setup_options = value +} // SetCreatedAt sets the created_at property value. The created_at property func (m *CodeSecurityConfiguration) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.created_at = value @@ -687,6 +714,7 @@ type CodeSecurityConfigurationable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAdvancedSecurity()(*CodeSecurityConfiguration_advanced_security) GetCodeScanningDefaultSetup()(*CodeSecurityConfiguration_code_scanning_default_setup) + GetCodeScanningDefaultSetupOptions()(CodeSecurityConfiguration_code_scanning_default_setup_optionsable) GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDependabotAlerts()(*CodeSecurityConfiguration_dependabot_alerts) GetDependabotSecurityUpdates()(*CodeSecurityConfiguration_dependabot_security_updates) @@ -710,6 +738,7 @@ type CodeSecurityConfigurationable interface { GetUrl()(*string) SetAdvancedSecurity(value *CodeSecurityConfiguration_advanced_security)() SetCodeScanningDefaultSetup(value *CodeSecurityConfiguration_code_scanning_default_setup)() + SetCodeScanningDefaultSetupOptions(value CodeSecurityConfiguration_code_scanning_default_setup_optionsable)() SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDependabotAlerts(value *CodeSecurityConfiguration_dependabot_alerts)() SetDependabotSecurityUpdates(value *CodeSecurityConfiguration_dependabot_security_updates)() diff --git a/pkg/github/models/e33943afdb81c0ec9c82b1d4d58a5a9e3ba9faad24f475c69d5a05a975db2dfa.go b/pkg/github/models/e33943afdb81c0ec9c82b1d4d58a5a9e3ba9faad24f475c69d5a05a975db2dfa.go new file mode 100644 index 00000000..cbf23995 --- /dev/null +++ b/pkg/github/models/e33943afdb81c0ec9c82b1d4d58a5a9e3ba9faad24f475c69d5a05a975db2dfa.go @@ -0,0 +1,37 @@ +package models +// Whether to use labeled runners or standard GitHub runners. +type CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type int + +const ( + STANDARD_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP_OPTIONS_RUNNER_TYPE CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type = iota + LABELED_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP_OPTIONS_RUNNER_TYPE + NOT_SET_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP_OPTIONS_RUNNER_TYPE +) + +func (i CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type) String() string { + return []string{"standard", "labeled", "not_set"}[i] +} +func ParseCodeSecurityConfiguration_code_scanning_default_setup_options_runner_type(v string) (any, error) { + result := STANDARD_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP_OPTIONS_RUNNER_TYPE + switch v { + case "standard": + result = STANDARD_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP_OPTIONS_RUNNER_TYPE + case "labeled": + result = LABELED_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP_OPTIONS_RUNNER_TYPE + case "not_set": + result = NOT_SET_CODESECURITYCONFIGURATION_CODE_SCANNING_DEFAULT_SETUP_OPTIONS_RUNNER_TYPE + default: + return nil, nil + } + return &result, nil +} +func SerializeCodeSecurityConfiguration_code_scanning_default_setup_options_runner_type(values []CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type) isMultiValue() bool { + return false +} diff --git a/pkg/github/models/secret_scanning_scan.go b/pkg/github/models/secret_scanning_scan.go index 721a3c66..10c2597b 100644 --- a/pkg/github/models/secret_scanning_scan.go +++ b/pkg/github/models/secret_scanning_scan.go @@ -9,11 +9,11 @@ import ( type SecretScanningScan struct { // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additionalData map[string]any - // The time that the scan was completed. Empty if the scan is active + // The time that the scan was completed. Empty if the scan is running completed_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // The time that the scan was started + // The time that the scan was started. Empty if the scan is pending started_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time - // The state of the scan. Either "completed" or "running" + // The state of the scan. Either "completed", "running", or "pending" status *string // The type of scan typeEscaped *string @@ -35,7 +35,7 @@ func CreateSecretScanningScanFromDiscriminatorValue(parseNode i878a80d2330e89d26 func (m *SecretScanningScan) GetAdditionalData()(map[string]any) { return m.additionalData } -// GetCompletedAt gets the completed_at property value. The time that the scan was completed. Empty if the scan is active +// GetCompletedAt gets the completed_at property value. The time that the scan was completed. Empty if the scan is running // returns a *Time when successful func (m *SecretScanningScan) GetCompletedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { return m.completed_at @@ -86,12 +86,12 @@ func (m *SecretScanningScan) GetFieldDeserializers()(map[string]func(i878a80d233 } return res } -// GetStartedAt gets the started_at property value. The time that the scan was started +// GetStartedAt gets the started_at property value. The time that the scan was started. Empty if the scan is pending // returns a *Time when successful func (m *SecretScanningScan) GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { return m.started_at } -// GetStatus gets the status property value. The state of the scan. Either "completed" or "running" +// GetStatus gets the status property value. The state of the scan. Either "completed", "running", or "pending" // returns a *string when successful func (m *SecretScanningScan) GetStatus()(*string) { return m.status @@ -139,15 +139,15 @@ func (m *SecretScanningScan) Serialize(writer i878a80d2330e89d26896388a3f487eef2 func (m *SecretScanningScan) SetAdditionalData(value map[string]any)() { m.additionalData = value } -// SetCompletedAt sets the completed_at property value. The time that the scan was completed. Empty if the scan is active +// SetCompletedAt sets the completed_at property value. The time that the scan was completed. Empty if the scan is running func (m *SecretScanningScan) SetCompletedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.completed_at = value } -// SetStartedAt sets the started_at property value. The time that the scan was started +// SetStartedAt sets the started_at property value. The time that the scan was started. Empty if the scan is pending func (m *SecretScanningScan) SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.started_at = value } -// SetStatus sets the status property value. The state of the scan. Either "completed" or "running" +// SetStatus sets the status property value. The state of the scan. Either "completed", "running", or "pending" func (m *SecretScanningScan) SetStatus(value *string)() { m.status = value } diff --git a/pkg/github/orgs/item_code_security_configurations_item_with_configuration_escaped_patch_request_body.go b/pkg/github/orgs/item_code_security_configurations_item_with_configuration_escaped_patch_request_body.go index 73c65b8e..7e34d9ce 100644 --- a/pkg/github/orgs/item_code_security_configurations_item_with_configuration_escaped_patch_request_body.go +++ b/pkg/github/orgs/item_code_security_configurations_item_with_configuration_escaped_patch_request_body.go @@ -2,9 +2,12 @@ package orgs import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" ) type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody struct { + // Feature options for code scanning default setup + code_scanning_default_setup_options i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable // Feature options for Automatic dependency submission dependency_graph_autosubmit_action_options ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable // A description of the code security configuration @@ -25,6 +28,11 @@ func NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody()(* func CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody(), nil } +// GetCodeScanningDefaultSetupOptions gets the code_scanning_default_setup_options property value. Feature options for code scanning default setup +// returns a CodeScanningDefaultSetupOptionsable when successful +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) GetCodeScanningDefaultSetupOptions()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable) { + return m.code_scanning_default_setup_options +} // GetDependencyGraphAutosubmitActionOptions gets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission // returns a ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable when successful func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) GetDependencyGraphAutosubmitActionOptions()(ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable) { @@ -39,6 +47,16 @@ func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) G // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code_scanning_default_setup_options"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCodeScanningDefaultSetupOptionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeScanningDefaultSetupOptions(val.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable)) + } + return nil + } res["dependency_graph_autosubmit_action_options"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue) if err != nil { @@ -93,6 +111,12 @@ func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) G } // Serialize serializes information the current object func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("code_scanning_default_setup_options", m.GetCodeScanningDefaultSetupOptions()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("dependency_graph_autosubmit_action_options", m.GetDependencyGraphAutosubmitActionOptions()) if err != nil { @@ -119,6 +143,10 @@ func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) S } return nil } +// SetCodeScanningDefaultSetupOptions sets the code_scanning_default_setup_options property value. Feature options for code scanning default setup +func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) SetCodeScanningDefaultSetupOptions(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable)() { + m.code_scanning_default_setup_options = value +} // SetDependencyGraphAutosubmitActionOptions sets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) SetDependencyGraphAutosubmitActionOptions(value ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable)() { m.dependency_graph_autosubmit_action_options = value @@ -137,10 +165,12 @@ func (m *ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody) S } type ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCodeScanningDefaultSetupOptions()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable) GetDependencyGraphAutosubmitActionOptions()(ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable) GetDescription()(*string) GetName()(*string) GetSecretScanningDelegatedBypassOptions()(ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_optionsable) + SetCodeScanningDefaultSetupOptions(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable)() SetDependencyGraphAutosubmitActionOptions(value ItemCodeSecurityConfigurationsItemWithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_optionsable)() SetDescription(value *string)() SetName(value *string)() diff --git a/pkg/github/orgs/item_code_security_configurations_post_request_body.go b/pkg/github/orgs/item_code_security_configurations_post_request_body.go index cbbf0e2f..529b0d01 100644 --- a/pkg/github/orgs/item_code_security_configurations_post_request_body.go +++ b/pkg/github/orgs/item_code_security_configurations_post_request_body.go @@ -2,9 +2,12 @@ package orgs import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" ) type ItemCodeSecurityConfigurationsPostRequestBody struct { + // Feature options for code scanning default setup + code_scanning_default_setup_options i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable // Feature options for Automatic dependency submission dependency_graph_autosubmit_action_options ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable // A description of the code security configuration @@ -25,6 +28,11 @@ func NewItemCodeSecurityConfigurationsPostRequestBody()(*ItemCodeSecurityConfigu func CreateItemCodeSecurityConfigurationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewItemCodeSecurityConfigurationsPostRequestBody(), nil } +// GetCodeScanningDefaultSetupOptions gets the code_scanning_default_setup_options property value. Feature options for code scanning default setup +// returns a CodeScanningDefaultSetupOptionsable when successful +func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetCodeScanningDefaultSetupOptions()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable) { + return m.code_scanning_default_setup_options +} // GetDependencyGraphAutosubmitActionOptions gets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission // returns a ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable when successful func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetDependencyGraphAutosubmitActionOptions()(ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable) { @@ -39,6 +47,16 @@ func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetDescription()(*string // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code_scanning_default_setup_options"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateCodeScanningDefaultSetupOptionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCodeScanningDefaultSetupOptions(val.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable)) + } + return nil + } res["dependency_graph_autosubmit_action_options"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsFromDiscriminatorValue) if err != nil { @@ -93,6 +111,12 @@ func (m *ItemCodeSecurityConfigurationsPostRequestBody) GetSecretScanningDelegat } // Serialize serializes information the current object func (m *ItemCodeSecurityConfigurationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("code_scanning_default_setup_options", m.GetCodeScanningDefaultSetupOptions()) + if err != nil { + return err + } + } { err := writer.WriteObjectValue("dependency_graph_autosubmit_action_options", m.GetDependencyGraphAutosubmitActionOptions()) if err != nil { @@ -119,6 +143,10 @@ func (m *ItemCodeSecurityConfigurationsPostRequestBody) Serialize(writer i878a80 } return nil } +// SetCodeScanningDefaultSetupOptions sets the code_scanning_default_setup_options property value. Feature options for code scanning default setup +func (m *ItemCodeSecurityConfigurationsPostRequestBody) SetCodeScanningDefaultSetupOptions(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable)() { + m.code_scanning_default_setup_options = value +} // SetDependencyGraphAutosubmitActionOptions sets the dependency_graph_autosubmit_action_options property value. Feature options for Automatic dependency submission func (m *ItemCodeSecurityConfigurationsPostRequestBody) SetDependencyGraphAutosubmitActionOptions(value ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable)() { m.dependency_graph_autosubmit_action_options = value @@ -137,10 +165,12 @@ func (m *ItemCodeSecurityConfigurationsPostRequestBody) SetSecretScanningDelegat } type ItemCodeSecurityConfigurationsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCodeScanningDefaultSetupOptions()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable) GetDependencyGraphAutosubmitActionOptions()(ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable) GetDescription()(*string) GetName()(*string) GetSecretScanningDelegatedBypassOptions()(ItemCodeSecurityConfigurationsPostRequestBody_secret_scanning_delegated_bypass_optionsable) + SetCodeScanningDefaultSetupOptions(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CodeScanningDefaultSetupOptionsable)() SetDependencyGraphAutosubmitActionOptions(value ItemCodeSecurityConfigurationsPostRequestBody_dependency_graph_autosubmit_action_optionsable)() SetDescription(value *string)() SetName(value *string)() diff --git a/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_request_builder.go b/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_request_builder.go index cd27cc64..c7c86328 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_request_builder.go +++ b/pkg/github/orgs/item_copilot_billing_selected_escaped_teams_request_builder.go @@ -23,7 +23,7 @@ func NewItemCopilotBillingSelected_teamsRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingSelected_teamsRequestBuilderInternal(urlParams, requestAdapter) } -// Delete > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response will contain the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// Delete > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_teamsDeleteResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Delete(ctx context.Cont } return res.(ItemCopilotBillingSelected_teamsDeleteResponseable), nil } -// Post > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// Post > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_teamsPostResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -81,7 +81,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) Post(ctx context.Contex } return res.(ItemCopilotBillingSelected_teamsPostResponseable), nil } -// ToDeleteRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response will contain the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// ToDeleteRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -93,7 +93,7 @@ func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToDeleteRequestInformat } return requestInfo, nil } -// ToPostRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// ToPostRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_teamsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_teamsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_copilot_billing_selected_escaped_users_request_builder.go b/pkg/github/orgs/item_copilot_billing_selected_escaped_users_request_builder.go index fa866e1e..3ab10468 100644 --- a/pkg/github/orgs/item_copilot_billing_selected_escaped_users_request_builder.go +++ b/pkg/github/orgs/item_copilot_billing_selected_escaped_users_request_builder.go @@ -23,7 +23,7 @@ func NewItemCopilotBillingSelected_usersRequestBuilder(rawUrl string, requestAda urlParams["request-raw-url"] = rawUrl return NewItemCopilotBillingSelected_usersRequestBuilderInternal(urlParams, requestAdapter) } -// Delete > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response will contain the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// Delete > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_usersDeleteResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -52,7 +52,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) Delete(ctx context.Cont } return res.(ItemCopilotBillingSelected_usersDeleteResponseable), nil } -// Post > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// Post > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a ItemCopilotBillingSelected_usersPostResponseable when successful // returns a BasicError error when the service returns a 401 status code // returns a BasicError error when the service returns a 403 status code @@ -81,7 +81,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) Post(ctx context.Contex } return res.(ItemCopilotBillingSelected_usersPostResponseable), nil } -// ToDeleteRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response will contain the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// ToDeleteRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToDeleteRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersDeleteRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DELETE, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) @@ -93,7 +93,7 @@ func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToDeleteRequestInformat } return requestInfo, nil } -// ToPostRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. +// ToPostRequestInformation > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. // returns a *RequestInformation when successful func (m *ItemCopilotBillingSelected_usersRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemCopilotBillingSelected_usersPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) diff --git a/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go index 6bc11ae3..7871a44c 100644 --- a/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_insights_api_route_stats_item_with_actor_escaped_item_request_builder.go @@ -13,6 +13,8 @@ type ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder struct { } // ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderGetQueryParameters get API request count statistics for an actor broken down by route within a specified time frame. type ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderGetQueryParameters struct { + // Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search. + Api_route_substring *string `uriparametername:"api_route_substring"` // The direction to sort the results by. Direction *i668a5d59a0d5a0e25bc1604cf7a50b2d949f1e3f49a4c9ec4b197e7a9b3d7b0a.GetDirectionQueryParameterType `uriparametername:"direction"` // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. @@ -29,7 +31,7 @@ type ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderGetQueryParameters // NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderInternal instantiates a new ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder and sets the default values. func NewItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder) { m := &ItemInsightsApiRouteStatsItemWithActor_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&api_route_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go b/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go index 21bccdc2..824beb0b 100644 --- a/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go +++ b/pkg/github/orgs/item_insights_api_subject_stats_request_builder.go @@ -25,11 +25,13 @@ type ItemInsightsApiSubjectStatsRequestBuilderGetQueryParameters struct { Per_page *int32 `uriparametername:"per_page"` // The property to sort the results by. Sort []i66b1523c4c4ef510ea098d616fe90f80d2679e0386fabfe6a2f1742954997624.GetSortQueryParameterType `uriparametername:"sort"` + // Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. + Subject_name_substring *string `uriparametername:"subject_name_substring"` } // NewItemInsightsApiSubjectStatsRequestBuilderInternal instantiates a new ItemInsightsApiSubjectStatsRequestBuilder and sets the default values. func NewItemInsightsApiSubjectStatsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiSubjectStatsRequestBuilder) { m := &ItemInsightsApiSubjectStatsRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*,subject_name_substring*}", pathParameters), } return m } diff --git a/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go b/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go index a2dd5c07..2c6ed076 100644 --- a/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go +++ b/pkg/github/orgs/item_insights_api_user_stats_with_user_escaped_item_request_builder.go @@ -13,6 +13,8 @@ type ItemInsightsApiUserStatsWithUser_ItemRequestBuilder struct { } // ItemInsightsApiUserStatsWithUser_ItemRequestBuilderGetQueryParameters get API usage statistics within an organization for a user broken down by the type of access. type ItemInsightsApiUserStatsWithUser_ItemRequestBuilderGetQueryParameters struct { + // Providing a substring will filter results where the actor name contains the substring. This is a case-insensitive search. + Actor_name_substring *string `uriparametername:"actor_name_substring"` // The direction to sort the results by. Direction *i7d233d983aef6d2ef322e211e3103c6ba3de064a22b55751ba43d02c6e28fa48.GetDirectionQueryParameterType `uriparametername:"direction"` // The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. @@ -29,7 +31,7 @@ type ItemInsightsApiUserStatsWithUser_ItemRequestBuilderGetQueryParameters struc // NewItemInsightsApiUserStatsWithUser_ItemRequestBuilderInternal instantiates a new ItemInsightsApiUserStatsWithUser_ItemRequestBuilder and sets the default values. func NewItemInsightsApiUserStatsWithUser_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemInsightsApiUserStatsWithUser_ItemRequestBuilder) { m := &ItemInsightsApiUserStatsWithUser_ItemRequestBuilder{ - BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters), + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?min_timestamp={min_timestamp}{&actor_name_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters), } return m } From a499b2bb6634b0b9d3a2b3ab5aa23284fdab89f5 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Sat, 7 Dec 2024 00:10:03 +0000 Subject: [PATCH 14/14] New updates to generated code --- pkg/github/kiota-lock.json | 2 +- pkg/github/models/copilot_seat_details.go | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/github/kiota-lock.json b/pkg/github/kiota-lock.json index 7234d69a..02e8f68a 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "A15CBDE583A29CD0CF5D52E1824B631949336666270FA4CD8183CF78DFD97CD38B54A99A8D168D5F1924C7846A68FFE32B81A9D6C1A90A48309F1E7CF81CF9BB", + "descriptionHash": "6198535C8618DF52C604457271227C60CB25FBE843929DDB9970F53DB37EB9E31AEEA0A70CC974BC8F670CAEC656E55058A944AF09F1519B83FA55EA8A0076DA", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0", diff --git a/pkg/github/models/copilot_seat_details.go b/pkg/github/models/copilot_seat_details.go index 430064a1..82da2147 100644 --- a/pkg/github/models/copilot_seat_details.go +++ b/pkg/github/models/copilot_seat_details.go @@ -23,7 +23,8 @@ type CopilotSeatDetails struct { pending_cancellation_date *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly // The Copilot plan of the organization, or the parent enterprise, when applicable. plan_type *CopilotSeatDetails_plan_type - // Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + // **Closing down notice:** This field is no longer relevant and is closing down. Use the `created_at` field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + // Deprecated: updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time } // CopilotSeatDetails_CopilotSeatDetails_assigning_team composed type wrapper for classes EnterpriseTeamable, Teamable @@ -256,7 +257,8 @@ func (m *CopilotSeatDetails) GetPendingCancellationDate()(*i878a80d2330e89d26896 func (m *CopilotSeatDetails) GetPlanType()(*CopilotSeatDetails_plan_type) { return m.plan_type } -// GetUpdatedAt gets the updated_at property value. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. +// GetUpdatedAt gets the updated_at property value. **Closing down notice:** This field is no longer relevant and is closing down. Use the `created_at` field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. +// Deprecated: // returns a *Time when successful func (m *CopilotSeatDetails) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { return m.updated_at @@ -352,7 +354,8 @@ func (m *CopilotSeatDetails) SetPendingCancellationDate(value *i878a80d2330e89d2 func (m *CopilotSeatDetails) SetPlanType(value *CopilotSeatDetails_plan_type)() { m.plan_type = value } -// SetUpdatedAt sets the updated_at property value. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. +// SetUpdatedAt sets the updated_at property value. **Closing down notice:** This field is no longer relevant and is closing down. Use the `created_at` field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. +// Deprecated: func (m *CopilotSeatDetails) SetUpdatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { m.updated_at = value }