From f32922b415acfeffc43a6508edad76a7f492fd90 Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Fri, 28 Jun 2024 16:40:20 -0500 Subject: [PATCH] feat: first batch of integer overflow fixes, artifact attestations, docs changes (#81) * New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code --------- Co-authored-by: Octokit Bot --- ...item_copilot_billing_seats_get_response.go | 6 +- ...m_copilot_billing_seats_request_builder.go | 6 +- pkg/github/kiota-lock.json | 4 +- pkg/github/models/authorization.go | 16 +- ...ependency_graph_spdx_sbom_sbom_packages.go | 29 ++ pkg/github/models/deployment.go | 16 +- pkg/github/models/deployment_status.go | 16 +- pkg/github/models/organization_role.go | 16 +- .../models/pending_deployment_environment.go | 16 +- pkg/github/models/pull_request.go | 16 +- pkg/github/models/pull_request_minimal.go | 16 +- .../models/pull_request_minimal_base_repo.go | 16 +- .../models/pull_request_minimal_head_repo.go | 16 +- .../models/pull_request_review_comment.go | 32 +-- pkg/github/models/pull_request_simple.go | 16 +- pkg/github/models/review_comment.go | 32 +-- pkg/github/models/sigstore_bundle0.go | 139 ++++++++++ .../models/sigstore_bundle0_dsse_envelope.go | 150 +++++++++++ ...gstore_bundle0_dsse_envelope_signatures.go | 109 ++++++++ .../sigstore_bundle0_verification_material.go | 150 +++++++++++ ...dle0_verification_material_tlog_entries.go | 254 ++++++++++++++++++ ...material_tlog_entries_inclusion_promise.go | 80 ++++++ ...tion_material_tlog_entries_kind_version.go | 109 ++++++++ ...rification_material_tlog_entries_log_id.go | 80 ++++++ ...ication_material_x509_certificate_chain.go | 92 +++++++ ...ial_x509_certificate_chain_certificates.go | 80 ++++++ ...s_item_with_subject_digest_get_response.go | 92 +++++++ ...ubject_digest_get_response_attestations.go | 109 ++++++++ ...digest_get_response_attestations_bundle.go | 139 ++++++++++ ...ponse_attestations_bundle_dsse_envelope.go | 51 ++++ ...testations_bundle_verification_material.go | 51 ++++ .../orgs/item_attestations_request_builder.go | 35 +++ ...ith_subject_digest_item_request_builder.go | 65 +++++ .../orgs/with_org_item_request_builder.go | 5 + ...s_item_with_subject_digest_get_response.go | 92 +++++++ ...ubject_digest_get_response_attestations.go | 109 ++++++++ ...digest_get_response_attestations_bundle.go | 139 ++++++++++ ...ponse_attestations_bundle_dsse_envelope.go | 51 ++++ ...testations_bundle_verification_material.go | 51 ++++ ...tem_item_attestations_post_request_body.go | 80 ++++++ ...m_attestations_post_request_body_bundle.go | 139 ++++++++++ ..._post_request_body_bundle_dsse_envelope.go | 51 ++++ ...quest_body_bundle_verification_material.go | 51 ++++ .../item_item_attestations_post_response.go | 80 ++++++ .../item_item_attestations_request_builder.go | 79 ++++++ ...ith_subject_digest_item_request_builder.go | 65 +++++ .../repos/item_repo_item_request_builder.go | 5 + pkg/github/user/user_request_builder.go | 11 + .../user/with_account_item_request_builder.go | 145 ++++++++++ ...s_item_with_subject_digest_get_response.go | 92 +++++++ ...ubject_digest_get_response_attestations.go | 110 ++++++++ .../item_attestations_request_builder.go | 35 +++ ...ith_subject_digest_item_request_builder.go | 70 +++++ .../with_username_item_request_builder.go | 5 + 54 files changed, 3399 insertions(+), 120 deletions(-) create mode 100644 pkg/github/models/sigstore_bundle0.go create mode 100644 pkg/github/models/sigstore_bundle0_dsse_envelope.go create mode 100644 pkg/github/models/sigstore_bundle0_dsse_envelope_signatures.go create mode 100644 pkg/github/models/sigstore_bundle0_verification_material.go create mode 100644 pkg/github/models/sigstore_bundle0_verification_material_tlog_entries.go create mode 100644 pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_inclusion_promise.go create mode 100644 pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_kind_version.go create mode 100644 pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_log_id.go create mode 100644 pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain.go create mode 100644 pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain_certificates.go create mode 100644 pkg/github/orgs/item_attestations_item_with_subject_digest_get_response.go create mode 100644 pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations.go create mode 100644 pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle.go create mode 100644 pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go create mode 100644 pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go create mode 100644 pkg/github/orgs/item_attestations_request_builder.go create mode 100644 pkg/github/orgs/item_attestations_with_subject_digest_item_request_builder.go create mode 100644 pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response.go create mode 100644 pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations.go create mode 100644 pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle.go create mode 100644 pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go create mode 100644 pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go create mode 100644 pkg/github/repos/item_item_attestations_post_request_body.go create mode 100644 pkg/github/repos/item_item_attestations_post_request_body_bundle.go create mode 100644 pkg/github/repos/item_item_attestations_post_request_body_bundle_dsse_envelope.go create mode 100644 pkg/github/repos/item_item_attestations_post_request_body_bundle_verification_material.go create mode 100644 pkg/github/repos/item_item_attestations_post_response.go create mode 100644 pkg/github/repos/item_item_attestations_request_builder.go create mode 100644 pkg/github/repos/item_item_attestations_with_subject_digest_item_request_builder.go create mode 100644 pkg/github/user/with_account_item_request_builder.go create mode 100644 pkg/github/users/item_attestations_item_with_subject_digest_get_response.go create mode 100644 pkg/github/users/item_attestations_item_with_subject_digest_get_response_attestations.go create mode 100644 pkg/github/users/item_attestations_request_builder.go create mode 100644 pkg/github/users/item_attestations_with_subject_digest_item_request_builder.go diff --git a/pkg/github/enterprises/item_copilot_billing_seats_get_response.go b/pkg/github/enterprises/item_copilot_billing_seats_get_response.go index d960303c..3e6c50e4 100644 --- a/pkg/github/enterprises/item_copilot_billing_seats_get_response.go +++ b/pkg/github/enterprises/item_copilot_billing_seats_get_response.go @@ -10,7 +10,7 @@ type ItemCopilotBillingSeatsGetResponse struct { additionalData map[string]any // The seats property seats []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotSeatDetailsable - // Total number of Copilot seats for the organization currently being billed. + // The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. total_seats *int32 } // NewItemCopilotBillingSeatsGetResponse instantiates a new ItemCopilotBillingSeatsGetResponse and sets the default values. @@ -67,7 +67,7 @@ func (m *ItemCopilotBillingSeatsGetResponse) GetFieldDeserializers()(map[string] func (m *ItemCopilotBillingSeatsGetResponse) GetSeats()([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotSeatDetailsable) { return m.seats } -// GetTotalSeats gets the total_seats property value. Total number of Copilot seats for the organization currently being billed. +// GetTotalSeats gets the total_seats property value. The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. // returns a *int32 when successful func (m *ItemCopilotBillingSeatsGetResponse) GetTotalSeats()(*int32) { return m.total_seats @@ -108,7 +108,7 @@ func (m *ItemCopilotBillingSeatsGetResponse) SetAdditionalData(value map[string] func (m *ItemCopilotBillingSeatsGetResponse) SetSeats(value []i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CopilotSeatDetailsable)() { m.seats = value } -// SetTotalSeats sets the total_seats property value. Total number of Copilot seats for the organization currently being billed. +// SetTotalSeats sets the total_seats property value. The total number of Copilot seats the enterprise is being billed for. Users with access through multiple organizations or enterprise teams are only counted once. func (m *ItemCopilotBillingSeatsGetResponse) SetTotalSeats(value *int32)() { m.total_seats = value } 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 c65f61c7..0078d2e6 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 beta 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.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 beta 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. 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 beta 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.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 beta 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. // 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 beta 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.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 beta 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. // 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 843bf8bc..1fbbc75a 100644 --- a/pkg/github/kiota-lock.json +++ b/pkg/github/kiota-lock.json @@ -1,6 +1,6 @@ { - "descriptionHash": "524B7995C3F724FBD5311CE721AFE148291ACD56B5B0A77B7A38BD87C4ABB7861406A0A812CBC457F589E9F17D1493533C0EDCA1A7CC6A587DADAB2A2E2BF9DE", - "descriptionLocation": "../../../../schemas/downloaded.json", + "descriptionHash": "E4E2AABED4BD59401902818C72E41CA2F0687B3623E90C31913C14D9C4EF622958C3E7803B45FFDD22856FE8BE14B2FB3FB3AAF72B4F479A9809E2EEF45DD55C", + "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.14.0", "clientClassName": "ApiClient", diff --git a/pkg/github/models/authorization.go b/pkg/github/models/authorization.go index b6d718c1..df9a7c56 100644 --- a/pkg/github/models/authorization.go +++ b/pkg/github/models/authorization.go @@ -20,7 +20,7 @@ type Authorization struct { // The hashed_token property hashed_token *string // The id property - id *int32 + id *int64 // The installation property installation NullableScopedInstallationable // The note property @@ -127,7 +127,7 @@ func (m *Authorization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -245,8 +245,8 @@ func (m *Authorization) GetHashedToken()(*string) { return m.hashed_token } // GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *Authorization) GetId()(*int32) { +// returns a *int64 when successful +func (m *Authorization) GetId()(*int64) { return m.id } // GetInstallation gets the installation property value. The installation property @@ -327,7 +327,7 @@ func (m *Authorization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -419,7 +419,7 @@ func (m *Authorization) SetHashedToken(value *string)() { m.hashed_token = value } // SetId sets the id property value. The id property -func (m *Authorization) SetId(value *int32)() { +func (m *Authorization) SetId(value *int64)() { m.id = value } // SetInstallation sets the installation property value. The installation property @@ -466,7 +466,7 @@ type Authorizationable interface { GetExpiresAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetFingerprint()(*string) GetHashedToken()(*string) - GetId()(*int32) + GetId()(*int64) GetInstallation()(NullableScopedInstallationable) GetNote()(*string) GetNoteUrl()(*string) @@ -481,7 +481,7 @@ type Authorizationable interface { SetExpiresAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetFingerprint(value *string)() SetHashedToken(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetInstallation(value NullableScopedInstallationable)() SetNote(value *string)() SetNoteUrl(value *string)() diff --git a/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages.go b/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages.go index 917ded75..b397ec67 100644 --- a/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages.go +++ b/pkg/github/models/dependency_graph_spdx_sbom_sbom_packages.go @@ -7,6 +7,8 @@ import ( type DependencyGraphSpdxSbom_sbom_packages 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 copyright holders of the package, and any dates present with those notices, if available. + copyrightText *string // The location where the package can be downloaded,or NOASSERTION if this has not been determined. downloadLocation *string // The externalRefs property @@ -43,6 +45,11 @@ func CreateDependencyGraphSpdxSbom_sbom_packagesFromDiscriminatorValue(parseNode func (m *DependencyGraphSpdxSbom_sbom_packages) GetAdditionalData()(map[string]any) { return m.additionalData } +// GetCopyrightText gets the copyrightText property value. The copyright holders of the package, and any dates present with those notices, if available. +// returns a *string when successful +func (m *DependencyGraphSpdxSbom_sbom_packages) GetCopyrightText()(*string) { + return m.copyrightText +} // GetDownloadLocation gets the downloadLocation property value. The location where the package can be downloaded,or NOASSERTION if this has not been determined. // returns a *string when successful func (m *DependencyGraphSpdxSbom_sbom_packages) GetDownloadLocation()(*string) { @@ -57,6 +64,16 @@ func (m *DependencyGraphSpdxSbom_sbom_packages) GetExternalRefs()([]DependencyGr // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *DependencyGraphSpdxSbom_sbom_packages) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["copyrightText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCopyrightText(val) + } + return nil + } res["downloadLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { @@ -192,6 +209,12 @@ func (m *DependencyGraphSpdxSbom_sbom_packages) GetVersionInfo()(*string) { } // Serialize serializes information the current object func (m *DependencyGraphSpdxSbom_sbom_packages) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("copyrightText", m.GetCopyrightText()) + if err != nil { + return err + } + } { err := writer.WriteStringValue("downloadLocation", m.GetDownloadLocation()) if err != nil { @@ -264,6 +287,10 @@ func (m *DependencyGraphSpdxSbom_sbom_packages) Serialize(writer i878a80d2330e89 func (m *DependencyGraphSpdxSbom_sbom_packages) SetAdditionalData(value map[string]any)() { m.additionalData = value } +// SetCopyrightText sets the copyrightText property value. The copyright holders of the package, and any dates present with those notices, if available. +func (m *DependencyGraphSpdxSbom_sbom_packages) SetCopyrightText(value *string)() { + m.copyrightText = value +} // SetDownloadLocation sets the downloadLocation property value. The location where the package can be downloaded,or NOASSERTION if this has not been determined. func (m *DependencyGraphSpdxSbom_sbom_packages) SetDownloadLocation(value *string)() { m.downloadLocation = value @@ -303,6 +330,7 @@ func (m *DependencyGraphSpdxSbom_sbom_packages) SetVersionInfo(value *string)() type DependencyGraphSpdxSbom_sbom_packagesable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCopyrightText()(*string) GetDownloadLocation()(*string) GetExternalRefs()([]DependencyGraphSpdxSbom_sbom_packages_externalRefsable) GetFilesAnalyzed()(*bool) @@ -312,6 +340,7 @@ type DependencyGraphSpdxSbom_sbom_packagesable interface { GetSPDXID()(*string) GetSupplier()(*string) GetVersionInfo()(*string) + SetCopyrightText(value *string)() SetDownloadLocation(value *string)() SetExternalRefs(value []DependencyGraphSpdxSbom_sbom_packages_externalRefsable)() SetFilesAnalyzed(value *bool)() diff --git a/pkg/github/models/deployment.go b/pkg/github/models/deployment.go index 24f33bd3..7b7f0289 100644 --- a/pkg/github/models/deployment.go +++ b/pkg/github/models/deployment.go @@ -18,7 +18,7 @@ type Deployment struct { // Name for the target deployment environment. environment *string // Unique identifier of the deployment - id *int32 + id *int64 // The node_id property node_id *string // The original_environment property @@ -128,7 +128,7 @@ func (m *Deployment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268 return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -270,8 +270,8 @@ func (m *Deployment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d268 return res } // GetId gets the id property value. Unique identifier of the deployment -// returns a *int32 when successful -func (m *Deployment) GetId()(*int32) { +// returns a *int64 when successful +func (m *Deployment) GetId()(*int64) { return m.id } // GetNodeId gets the node_id property value. The node_id property @@ -366,7 +366,7 @@ func (m *Deployment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -478,7 +478,7 @@ func (m *Deployment) SetEnvironment(value *string)() { m.environment = value } // SetId sets the id property value. Unique identifier of the deployment -func (m *Deployment) SetId(value *int32)() { +func (m *Deployment) SetId(value *int64)() { m.id = value } // SetNodeId sets the node_id property value. The node_id property @@ -540,7 +540,7 @@ type Deploymentable interface { GetCreator()(NullableSimpleUserable) GetDescription()(*string) GetEnvironment()(*string) - GetId()(*int32) + GetId()(*int64) GetNodeId()(*string) GetOriginalEnvironment()(*string) GetPayload()(*string) @@ -558,7 +558,7 @@ type Deploymentable interface { SetCreator(value NullableSimpleUserable)() SetDescription(value *string)() SetEnvironment(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetNodeId(value *string)() SetOriginalEnvironment(value *string)() SetPayload(value *string)() diff --git a/pkg/github/models/deployment_status.go b/pkg/github/models/deployment_status.go index 42c66a2b..69367899 100644 --- a/pkg/github/models/deployment_status.go +++ b/pkg/github/models/deployment_status.go @@ -22,7 +22,7 @@ type DeploymentStatus struct { // The URL for accessing your environment. environment_url *string // The id property - id *int32 + id *int64 // The URL to associate with this status. log_url *string // The node_id property @@ -152,7 +152,7 @@ func (m *DeploymentStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -244,8 +244,8 @@ func (m *DeploymentStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e return res } // GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *DeploymentStatus) GetId()(*int32) { +// returns a *int64 when successful +func (m *DeploymentStatus) GetId()(*int64) { return m.id } // GetLogUrl gets the log_url property value. The URL to associate with this status. @@ -327,7 +327,7 @@ func (m *DeploymentStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -418,7 +418,7 @@ func (m *DeploymentStatus) SetEnvironmentUrl(value *string)() { m.environment_url = value } // SetId sets the id property value. The id property -func (m *DeploymentStatus) SetId(value *int32)() { +func (m *DeploymentStatus) SetId(value *int64)() { m.id = value } // SetLogUrl sets the log_url property value. The URL to associate with this status. @@ -462,7 +462,7 @@ type DeploymentStatusable interface { GetDescription()(*string) GetEnvironment()(*string) GetEnvironmentUrl()(*string) - GetId()(*int32) + GetId()(*int64) GetLogUrl()(*string) GetNodeId()(*string) GetPerformedViaGithubApp()(NullableIntegrationable) @@ -477,7 +477,7 @@ type DeploymentStatusable interface { SetDescription(value *string)() SetEnvironment(value *string)() SetEnvironmentUrl(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetLogUrl(value *string)() SetNodeId(value *string)() SetPerformedViaGithubApp(value NullableIntegrationable)() diff --git a/pkg/github/models/organization_role.go b/pkg/github/models/organization_role.go index 8ceb69d3..db45a281 100644 --- a/pkg/github/models/organization_role.go +++ b/pkg/github/models/organization_role.go @@ -14,7 +14,7 @@ type OrganizationRole struct { // A short description about who this role is for or what permissions it grants. description *string // The unique identifier of the role. - id *int32 + id *int64 // The name of the role. name *string // A GitHub user. @@ -76,7 +76,7 @@ func (m *OrganizationRole) GetFieldDeserializers()(map[string]func(i878a80d2330e return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -134,8 +134,8 @@ func (m *OrganizationRole) GetFieldDeserializers()(map[string]func(i878a80d2330e return res } // GetId gets the id property value. The unique identifier of the role. -// returns a *int32 when successful -func (m *OrganizationRole) GetId()(*int32) { +// returns a *int64 when successful +func (m *OrganizationRole) GetId()(*int64) { return m.id } // GetName gets the name property value. The name of the role. @@ -173,7 +173,7 @@ func (m *OrganizationRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -223,7 +223,7 @@ func (m *OrganizationRole) SetDescription(value *string)() { m.description = value } // SetId sets the id property value. The unique identifier of the role. -func (m *OrganizationRole) SetId(value *int32)() { +func (m *OrganizationRole) SetId(value *int64)() { m.id = value } // SetName sets the name property value. The name of the role. @@ -247,14 +247,14 @@ type OrganizationRoleable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDescription()(*string) - GetId()(*int32) + GetId()(*int64) GetName()(*string) GetOrganization()(NullableSimpleUserable) GetPermissions()([]string) GetUpdatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDescription(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetName(value *string)() SetOrganization(value NullableSimpleUserable)() SetPermissions(value []string)() diff --git a/pkg/github/models/pending_deployment_environment.go b/pkg/github/models/pending_deployment_environment.go index bc7b00d1..2c386d4e 100644 --- a/pkg/github/models/pending_deployment_environment.go +++ b/pkg/github/models/pending_deployment_environment.go @@ -10,7 +10,7 @@ type PendingDeployment_environment struct { // The html_url property html_url *string // The id of the environment. - id *int32 + id *int64 // The name of the environment. name *string // The node_id property @@ -50,7 +50,7 @@ func (m *PendingDeployment_environment) GetFieldDeserializers()(map[string]func( return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -97,8 +97,8 @@ func (m *PendingDeployment_environment) GetHtmlUrl()(*string) { return m.html_url } // GetId gets the id property value. The id of the environment. -// returns a *int32 when successful -func (m *PendingDeployment_environment) GetId()(*int32) { +// returns a *int64 when successful +func (m *PendingDeployment_environment) GetId()(*int64) { return m.id } // GetName gets the name property value. The name of the environment. @@ -125,7 +125,7 @@ func (m *PendingDeployment_environment) Serialize(writer i878a80d2330e89d2689638 } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -165,7 +165,7 @@ func (m *PendingDeployment_environment) SetHtmlUrl(value *string)() { m.html_url = value } // SetId sets the id property value. The id of the environment. -func (m *PendingDeployment_environment) SetId(value *int32)() { +func (m *PendingDeployment_environment) SetId(value *int64)() { m.id = value } // SetName sets the name property value. The name of the environment. @@ -184,12 +184,12 @@ type PendingDeployment_environmentable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetHtmlUrl()(*string) - GetId()(*int32) + GetId()(*int64) GetName()(*string) GetNodeId()(*string) GetUrl()(*string) SetHtmlUrl(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetName(value *string)() SetNodeId(value *string)() SetUrl(value *string)() diff --git a/pkg/github/models/pull_request.go b/pkg/github/models/pull_request.go index 8ca07838..f1d5c807 100644 --- a/pkg/github/models/pull_request.go +++ b/pkg/github/models/pull_request.go @@ -52,7 +52,7 @@ type PullRequest struct { // The html_url property html_url *string // The id property - id *int32 + id *int64 // The issue_url property issue_url *string // The labels property @@ -434,7 +434,7 @@ func (m *PullRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26 return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -734,8 +734,8 @@ func (m *PullRequest) GetHtmlUrl()(*string) { return m.html_url } // GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *PullRequest) GetId()(*int32) { +// returns a *int64 when successful +func (m *PullRequest) GetId()(*int64) { return m.id } // GetIssueUrl gets the issue_url property value. The issue_url property @@ -1003,7 +1003,7 @@ func (m *PullRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6 } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -1282,7 +1282,7 @@ func (m *PullRequest) SetHtmlUrl(value *string)() { m.html_url = value } // SetId sets the id property value. The id property -func (m *PullRequest) SetId(value *int32)() { +func (m *PullRequest) SetId(value *int64)() { m.id = value } // SetIssueUrl sets the issue_url property value. The issue_url property @@ -1416,7 +1416,7 @@ type PullRequestable interface { GetDraft()(*bool) GetHead()(PullRequest_headable) GetHtmlUrl()(*string) - GetId()(*int32) + GetId()(*int64) GetIssueUrl()(*string) GetLabels()([]PullRequest_labelsable) GetLinks()(PullRequest__linksable) @@ -1464,7 +1464,7 @@ type PullRequestable interface { SetDraft(value *bool)() SetHead(value PullRequest_headable)() SetHtmlUrl(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetIssueUrl(value *string)() SetLabels(value []PullRequest_labelsable)() SetLinks(value PullRequest__linksable)() diff --git a/pkg/github/models/pull_request_minimal.go b/pkg/github/models/pull_request_minimal.go index dfc99043..d7c372cd 100644 --- a/pkg/github/models/pull_request_minimal.go +++ b/pkg/github/models/pull_request_minimal.go @@ -12,7 +12,7 @@ type PullRequestMinimal struct { // The head property head PullRequestMinimal_headable // The id property - id *int32 + id *int64 // The number property number *int32 // The url property @@ -65,7 +65,7 @@ func (m *PullRequestMinimal) GetFieldDeserializers()(map[string]func(i878a80d233 return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -102,8 +102,8 @@ func (m *PullRequestMinimal) GetHead()(PullRequestMinimal_headable) { return m.head } // GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *PullRequestMinimal) GetId()(*int32) { +// returns a *int64 when successful +func (m *PullRequestMinimal) GetId()(*int64) { return m.id } // GetNumber gets the number property value. The number property @@ -131,7 +131,7 @@ func (m *PullRequestMinimal) Serialize(writer i878a80d2330e89d26896388a3f487eef2 } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -169,7 +169,7 @@ func (m *PullRequestMinimal) SetHead(value PullRequestMinimal_headable)() { m.head = value } // SetId sets the id property value. The id property -func (m *PullRequestMinimal) SetId(value *int32)() { +func (m *PullRequestMinimal) SetId(value *int64)() { m.id = value } // SetNumber sets the number property value. The number property @@ -185,12 +185,12 @@ type PullRequestMinimalable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBase()(PullRequestMinimal_baseable) GetHead()(PullRequestMinimal_headable) - GetId()(*int32) + GetId()(*int64) GetNumber()(*int32) GetUrl()(*string) SetBase(value PullRequestMinimal_baseable)() SetHead(value PullRequestMinimal_headable)() - SetId(value *int32)() + SetId(value *int64)() SetNumber(value *int32)() SetUrl(value *string)() } diff --git a/pkg/github/models/pull_request_minimal_base_repo.go b/pkg/github/models/pull_request_minimal_base_repo.go index 834fc375..3651138f 100644 --- a/pkg/github/models/pull_request_minimal_base_repo.go +++ b/pkg/github/models/pull_request_minimal_base_repo.go @@ -8,7 +8,7 @@ type PullRequestMinimal_base_repo 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 property - id *int32 + id *int64 // The name property name *string // The url property @@ -36,7 +36,7 @@ func (m *PullRequestMinimal_base_repo) GetAdditionalData()(map[string]any) { func (m *PullRequestMinimal_base_repo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -68,8 +68,8 @@ func (m *PullRequestMinimal_base_repo) GetFieldDeserializers()(map[string]func(i return res } // GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *PullRequestMinimal_base_repo) GetId()(*int32) { +// returns a *int64 when successful +func (m *PullRequestMinimal_base_repo) GetId()(*int64) { return m.id } // GetName gets the name property value. The name property @@ -85,7 +85,7 @@ func (m *PullRequestMinimal_base_repo) GetUrl()(*string) { // Serialize serializes information the current object func (m *PullRequestMinimal_base_repo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -115,7 +115,7 @@ func (m *PullRequestMinimal_base_repo) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetId sets the id property value. The id property -func (m *PullRequestMinimal_base_repo) SetId(value *int32)() { +func (m *PullRequestMinimal_base_repo) SetId(value *int64)() { m.id = value } // SetName sets the name property value. The name property @@ -129,10 +129,10 @@ func (m *PullRequestMinimal_base_repo) SetUrl(value *string)() { type PullRequestMinimal_base_repoable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetId()(*int32) + GetId()(*int64) GetName()(*string) GetUrl()(*string) - SetId(value *int32)() + SetId(value *int64)() SetName(value *string)() SetUrl(value *string)() } diff --git a/pkg/github/models/pull_request_minimal_head_repo.go b/pkg/github/models/pull_request_minimal_head_repo.go index 5882fcf0..8851842c 100644 --- a/pkg/github/models/pull_request_minimal_head_repo.go +++ b/pkg/github/models/pull_request_minimal_head_repo.go @@ -8,7 +8,7 @@ type PullRequestMinimal_head_repo 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 property - id *int32 + id *int64 // The name property name *string // The url property @@ -36,7 +36,7 @@ func (m *PullRequestMinimal_head_repo) GetAdditionalData()(map[string]any) { func (m *PullRequestMinimal_head_repo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -68,8 +68,8 @@ func (m *PullRequestMinimal_head_repo) GetFieldDeserializers()(map[string]func(i return res } // GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *PullRequestMinimal_head_repo) GetId()(*int32) { +// returns a *int64 when successful +func (m *PullRequestMinimal_head_repo) GetId()(*int64) { return m.id } // GetName gets the name property value. The name property @@ -85,7 +85,7 @@ func (m *PullRequestMinimal_head_repo) GetUrl()(*string) { // Serialize serializes information the current object func (m *PullRequestMinimal_head_repo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -115,7 +115,7 @@ func (m *PullRequestMinimal_head_repo) SetAdditionalData(value map[string]any)() m.additionalData = value } // SetId sets the id property value. The id property -func (m *PullRequestMinimal_head_repo) SetId(value *int32)() { +func (m *PullRequestMinimal_head_repo) SetId(value *int64)() { m.id = value } // SetName sets the name property value. The name property @@ -129,10 +129,10 @@ func (m *PullRequestMinimal_head_repo) SetUrl(value *string)() { type PullRequestMinimal_head_repoable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetId()(*int32) + GetId()(*int64) GetName()(*string) GetUrl()(*string) - SetId(value *int32)() + SetId(value *int64)() SetName(value *string)() SetUrl(value *string)() } diff --git a/pkg/github/models/pull_request_review_comment.go b/pkg/github/models/pull_request_review_comment.go index 511205f4..fcbc299d 100644 --- a/pkg/github/models/pull_request_review_comment.go +++ b/pkg/github/models/pull_request_review_comment.go @@ -28,7 +28,7 @@ type PullRequestReviewComment struct { // HTML URL for the pull request review comment. html_url *string // The ID of the pull request review comment. - id *int32 + id *int64 // The comment ID to reply to. in_reply_to_id *int32 // The line of the blob to which the comment applies. The last line of the range for a multi-line comment @@ -48,7 +48,7 @@ type PullRequestReviewComment struct { // The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. position *int32 // The ID of the pull request review to which the comment belongs. - pull_request_review_id *int32 + pull_request_review_id *int64 // URL for the pull request that the review comment belongs to. pull_request_url *string // The reactions property @@ -219,7 +219,7 @@ func (m *PullRequestReviewComment) GetFieldDeserializers()(map[string]func(i878a return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -319,7 +319,7 @@ func (m *PullRequestReviewComment) GetFieldDeserializers()(map[string]func(i878a return nil } res["pull_request_review_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -426,8 +426,8 @@ func (m *PullRequestReviewComment) GetHtmlUrl()(*string) { return m.html_url } // GetId gets the id property value. The ID of the pull request review comment. -// returns a *int32 when successful -func (m *PullRequestReviewComment) GetId()(*int32) { +// returns a *int64 when successful +func (m *PullRequestReviewComment) GetId()(*int64) { return m.id } // GetInReplyToId gets the in_reply_to_id property value. The comment ID to reply to. @@ -481,8 +481,8 @@ func (m *PullRequestReviewComment) GetPosition()(*int32) { return m.position } // GetPullRequestReviewId gets the pull_request_review_id property value. The ID of the pull request review to which the comment belongs. -// returns a *int32 when successful -func (m *PullRequestReviewComment) GetPullRequestReviewId()(*int32) { +// returns a *int64 when successful +func (m *PullRequestReviewComment) GetPullRequestReviewId()(*int64) { return m.pull_request_review_id } // GetPullRequestUrl gets the pull_request_url property value. URL for the pull request that the review comment belongs to. @@ -582,7 +582,7 @@ func (m *PullRequestReviewComment) Serialize(writer i878a80d2330e89d26896388a3f4 } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -642,7 +642,7 @@ func (m *PullRequestReviewComment) Serialize(writer i878a80d2330e89d26896388a3f4 } } { - err := writer.WriteInt32Value("pull_request_review_id", m.GetPullRequestReviewId()) + err := writer.WriteInt64Value("pull_request_review_id", m.GetPullRequestReviewId()) if err != nil { return err } @@ -755,7 +755,7 @@ func (m *PullRequestReviewComment) SetHtmlUrl(value *string)() { m.html_url = value } // SetId sets the id property value. The ID of the pull request review comment. -func (m *PullRequestReviewComment) SetId(value *int32)() { +func (m *PullRequestReviewComment) SetId(value *int64)() { m.id = value } // SetInReplyToId sets the in_reply_to_id property value. The comment ID to reply to. @@ -799,7 +799,7 @@ func (m *PullRequestReviewComment) SetPosition(value *int32)() { m.position = value } // SetPullRequestReviewId sets the pull_request_review_id property value. The ID of the pull request review to which the comment belongs. -func (m *PullRequestReviewComment) SetPullRequestReviewId(value *int32)() { +func (m *PullRequestReviewComment) SetPullRequestReviewId(value *int64)() { m.pull_request_review_id = value } // SetPullRequestUrl sets the pull_request_url property value. URL for the pull request that the review comment belongs to. @@ -849,7 +849,7 @@ type PullRequestReviewCommentable interface { GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDiffHunk()(*string) GetHtmlUrl()(*string) - GetId()(*int32) + GetId()(*int64) GetInReplyToId()(*int32) GetLine()(*int32) GetLinks()(PullRequestReviewComment__linksable) @@ -860,7 +860,7 @@ type PullRequestReviewCommentable interface { GetOriginalStartLine()(*int32) GetPath()(*string) GetPosition()(*int32) - GetPullRequestReviewId()(*int32) + GetPullRequestReviewId()(*int64) GetPullRequestUrl()(*string) GetReactions()(ReactionRollupable) GetSide()(*PullRequestReviewComment_side) @@ -878,7 +878,7 @@ type PullRequestReviewCommentable interface { SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDiffHunk(value *string)() SetHtmlUrl(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetInReplyToId(value *int32)() SetLine(value *int32)() SetLinks(value PullRequestReviewComment__linksable)() @@ -889,7 +889,7 @@ type PullRequestReviewCommentable interface { SetOriginalStartLine(value *int32)() SetPath(value *string)() SetPosition(value *int32)() - SetPullRequestReviewId(value *int32)() + SetPullRequestReviewId(value *int64)() SetPullRequestUrl(value *string)() SetReactions(value ReactionRollupable)() SetSide(value *PullRequestReviewComment_side)() diff --git a/pkg/github/models/pull_request_simple.go b/pkg/github/models/pull_request_simple.go index 42c8926b..eea89938 100644 --- a/pkg/github/models/pull_request_simple.go +++ b/pkg/github/models/pull_request_simple.go @@ -42,7 +42,7 @@ type PullRequestSimple struct { // The html_url property html_url *string // The id property - id *int32 + id *int64 // The issue_url property issue_url *string // The labels property @@ -335,7 +335,7 @@ func (m *PullRequestSimple) GetFieldDeserializers()(map[string]func(i878a80d2330 return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -565,8 +565,8 @@ func (m *PullRequestSimple) GetHtmlUrl()(*string) { return m.html_url } // GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *PullRequestSimple) GetId()(*int32) { +// returns a *int64 when successful +func (m *PullRequestSimple) GetId()(*int64) { return m.id } // GetIssueUrl gets the issue_url property value. The issue_url property @@ -769,7 +769,7 @@ func (m *PullRequestSimple) Serialize(writer i878a80d2330e89d26896388a3f487eef27 } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -985,7 +985,7 @@ func (m *PullRequestSimple) SetHtmlUrl(value *string)() { m.html_url = value } // SetId sets the id property value. The id property -func (m *PullRequestSimple) SetId(value *int32)() { +func (m *PullRequestSimple) SetId(value *int64)() { m.id = value } // SetIssueUrl sets the issue_url property value. The issue_url property @@ -1086,7 +1086,7 @@ type PullRequestSimpleable interface { GetDraft()(*bool) GetHead()(PullRequestSimple_headable) GetHtmlUrl()(*string) - GetId()(*int32) + GetId()(*int64) GetIssueUrl()(*string) GetLabels()([]PullRequestSimple_labelsable) GetLinks()(PullRequestSimple__linksable) @@ -1122,7 +1122,7 @@ type PullRequestSimpleable interface { SetDraft(value *bool)() SetHead(value PullRequestSimple_headable)() SetHtmlUrl(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetIssueUrl(value *string)() SetLabels(value []PullRequestSimple_labelsable)() SetLinks(value PullRequestSimple__linksable)() diff --git a/pkg/github/models/review_comment.go b/pkg/github/models/review_comment.go index b6397b98..f9e40b4f 100644 --- a/pkg/github/models/review_comment.go +++ b/pkg/github/models/review_comment.go @@ -28,7 +28,7 @@ type ReviewComment struct { // The html_url property html_url *string // The id property - id *int32 + id *int64 // The in_reply_to_id property in_reply_to_id *int32 // The line of the blob to which the comment applies. The last line of the range for a multi-line comment @@ -48,7 +48,7 @@ type ReviewComment struct { // The position property position *int32 // The pull_request_review_id property - pull_request_review_id *int32 + pull_request_review_id *int64 // The pull_request_url property pull_request_url *string // The reactions property @@ -217,7 +217,7 @@ func (m *ReviewComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -317,7 +317,7 @@ func (m *ReviewComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d return nil } res["pull_request_review_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() + val, err := n.GetInt64Value() if err != nil { return err } @@ -414,8 +414,8 @@ func (m *ReviewComment) GetHtmlUrl()(*string) { return m.html_url } // GetId gets the id property value. The id property -// returns a *int32 when successful -func (m *ReviewComment) GetId()(*int32) { +// returns a *int64 when successful +func (m *ReviewComment) GetId()(*int64) { return m.id } // GetInReplyToId gets the in_reply_to_id property value. The in_reply_to_id property @@ -469,8 +469,8 @@ func (m *ReviewComment) GetPosition()(*int32) { return m.position } // GetPullRequestReviewId gets the pull_request_review_id property value. The pull_request_review_id property -// returns a *int32 when successful -func (m *ReviewComment) GetPullRequestReviewId()(*int32) { +// returns a *int64 when successful +func (m *ReviewComment) GetPullRequestReviewId()(*int64) { return m.pull_request_review_id } // GetPullRequestUrl gets the pull_request_url property value. The pull_request_url property @@ -565,7 +565,7 @@ func (m *ReviewComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 } } { - err := writer.WriteInt32Value("id", m.GetId()) + err := writer.WriteInt64Value("id", m.GetId()) if err != nil { return err } @@ -625,7 +625,7 @@ func (m *ReviewComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0 } } { - err := writer.WriteInt32Value("pull_request_review_id", m.GetPullRequestReviewId()) + err := writer.WriteInt64Value("pull_request_review_id", m.GetPullRequestReviewId()) if err != nil { return err } @@ -731,7 +731,7 @@ func (m *ReviewComment) SetHtmlUrl(value *string)() { m.html_url = value } // SetId sets the id property value. The id property -func (m *ReviewComment) SetId(value *int32)() { +func (m *ReviewComment) SetId(value *int64)() { m.id = value } // SetInReplyToId sets the in_reply_to_id property value. The in_reply_to_id property @@ -775,7 +775,7 @@ func (m *ReviewComment) SetPosition(value *int32)() { m.position = value } // SetPullRequestReviewId sets the pull_request_review_id property value. The pull_request_review_id property -func (m *ReviewComment) SetPullRequestReviewId(value *int32)() { +func (m *ReviewComment) SetPullRequestReviewId(value *int64)() { m.pull_request_review_id = value } // SetPullRequestUrl sets the pull_request_url property value. The pull_request_url property @@ -821,7 +821,7 @@ type ReviewCommentable interface { GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDiffHunk()(*string) GetHtmlUrl()(*string) - GetId()(*int32) + GetId()(*int64) GetInReplyToId()(*int32) GetLine()(*int32) GetLinks()(ReviewComment__linksable) @@ -832,7 +832,7 @@ type ReviewCommentable interface { GetOriginalStartLine()(*int32) GetPath()(*string) GetPosition()(*int32) - GetPullRequestReviewId()(*int32) + GetPullRequestReviewId()(*int64) GetPullRequestUrl()(*string) GetReactions()(ReactionRollupable) GetSide()(*ReviewComment_side) @@ -849,7 +849,7 @@ type ReviewCommentable interface { SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDiffHunk(value *string)() SetHtmlUrl(value *string)() - SetId(value *int32)() + SetId(value *int64)() SetInReplyToId(value *int32)() SetLine(value *int32)() SetLinks(value ReviewComment__linksable)() @@ -860,7 +860,7 @@ type ReviewCommentable interface { SetOriginalStartLine(value *int32)() SetPath(value *string)() SetPosition(value *int32)() - SetPullRequestReviewId(value *int32)() + SetPullRequestReviewId(value *int64)() SetPullRequestUrl(value *string)() SetReactions(value ReactionRollupable)() SetSide(value *ReviewComment_side)() diff --git a/pkg/github/models/sigstore_bundle0.go b/pkg/github/models/sigstore_bundle0.go new file mode 100644 index 00000000..45c6d51f --- /dev/null +++ b/pkg/github/models/sigstore_bundle0.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SigstoreBundle0 sigstore Bundle v0.1 +type SigstoreBundle0 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 dsseEnvelope property + dsseEnvelope SigstoreBundle0_dsseEnvelopeable + // The mediaType property + mediaType *string + // The verificationMaterial property + verificationMaterial SigstoreBundle0_verificationMaterialable +} +// NewSigstoreBundle0 instantiates a new SigstoreBundle0 and sets the default values. +func NewSigstoreBundle0()(*SigstoreBundle0) { + m := &SigstoreBundle0{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0(), 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 *SigstoreBundle0) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property +// returns a SigstoreBundle0_dsseEnvelopeable when successful +func (m *SigstoreBundle0) GetDsseEnvelope()(SigstoreBundle0_dsseEnvelopeable) { + return m.dsseEnvelope +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_dsseEnvelopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDsseEnvelope(val.(SigstoreBundle0_dsseEnvelopeable)) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerificationMaterial(val.(SigstoreBundle0_verificationMaterialable)) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +// returns a *string when successful +func (m *SigstoreBundle0) GetMediaType()(*string) { + return m.mediaType +} +// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property +// returns a SigstoreBundle0_verificationMaterialable when successful +func (m *SigstoreBundle0) GetVerificationMaterial()(SigstoreBundle0_verificationMaterialable) { + return m.verificationMaterial +} +// Serialize serializes information the current object +func (m *SigstoreBundle0) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) + 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 *SigstoreBundle0) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property +func (m *SigstoreBundle0) SetDsseEnvelope(value SigstoreBundle0_dsseEnvelopeable)() { + m.dsseEnvelope = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *SigstoreBundle0) SetMediaType(value *string)() { + m.mediaType = value +} +// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property +func (m *SigstoreBundle0) SetVerificationMaterial(value SigstoreBundle0_verificationMaterialable)() { + m.verificationMaterial = value +} +type SigstoreBundle0able interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDsseEnvelope()(SigstoreBundle0_dsseEnvelopeable) + GetMediaType()(*string) + GetVerificationMaterial()(SigstoreBundle0_verificationMaterialable) + SetDsseEnvelope(value SigstoreBundle0_dsseEnvelopeable)() + SetMediaType(value *string)() + SetVerificationMaterial(value SigstoreBundle0_verificationMaterialable)() +} diff --git a/pkg/github/models/sigstore_bundle0_dsse_envelope.go b/pkg/github/models/sigstore_bundle0_dsse_envelope.go new file mode 100644 index 00000000..dbfa43c9 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_dsse_envelope.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_dsseEnvelope 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 payload property + payload *string + // The payloadType property + payloadType *string + // The signatures property + signatures []SigstoreBundle0_dsseEnvelope_signaturesable +} +// NewSigstoreBundle0_dsseEnvelope instantiates a new SigstoreBundle0_dsseEnvelope and sets the default values. +func NewSigstoreBundle0_dsseEnvelope()(*SigstoreBundle0_dsseEnvelope) { + m := &SigstoreBundle0_dsseEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_dsseEnvelope(), 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 *SigstoreBundle0_dsseEnvelope) 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 *SigstoreBundle0_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["payloadType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadType(val) + } + return nil + } + res["signatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSigstoreBundle0_dsseEnvelope_signaturesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SigstoreBundle0_dsseEnvelope_signaturesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SigstoreBundle0_dsseEnvelope_signaturesable) + } + } + m.SetSignatures(res) + } + return nil + } + return res +} +// GetPayload gets the payload property value. The payload property +// returns a *string when successful +func (m *SigstoreBundle0_dsseEnvelope) GetPayload()(*string) { + return m.payload +} +// GetPayloadType gets the payloadType property value. The payloadType property +// returns a *string when successful +func (m *SigstoreBundle0_dsseEnvelope) GetPayloadType()(*string) { + return m.payloadType +} +// GetSignatures gets the signatures property value. The signatures property +// returns a []SigstoreBundle0_dsseEnvelope_signaturesable when successful +func (m *SigstoreBundle0_dsseEnvelope) GetSignatures()([]SigstoreBundle0_dsseEnvelope_signaturesable) { + return m.signatures +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("payloadType", m.GetPayloadType()) + if err != nil { + return err + } + } + if m.GetSignatures() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSignatures())) + for i, v := range m.GetSignatures() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("signatures", 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 *SigstoreBundle0_dsseEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetPayload sets the payload property value. The payload property +func (m *SigstoreBundle0_dsseEnvelope) SetPayload(value *string)() { + m.payload = value +} +// SetPayloadType sets the payloadType property value. The payloadType property +func (m *SigstoreBundle0_dsseEnvelope) SetPayloadType(value *string)() { + m.payloadType = value +} +// SetSignatures sets the signatures property value. The signatures property +func (m *SigstoreBundle0_dsseEnvelope) SetSignatures(value []SigstoreBundle0_dsseEnvelope_signaturesable)() { + m.signatures = value +} +type SigstoreBundle0_dsseEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPayload()(*string) + GetPayloadType()(*string) + GetSignatures()([]SigstoreBundle0_dsseEnvelope_signaturesable) + SetPayload(value *string)() + SetPayloadType(value *string)() + SetSignatures(value []SigstoreBundle0_dsseEnvelope_signaturesable)() +} diff --git a/pkg/github/models/sigstore_bundle0_dsse_envelope_signatures.go b/pkg/github/models/sigstore_bundle0_dsse_envelope_signatures.go new file mode 100644 index 00000000..92c1cf2d --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_dsse_envelope_signatures.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_dsseEnvelope_signatures 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 keyid property + keyid *string + // The sig property + sig *string +} +// NewSigstoreBundle0_dsseEnvelope_signatures instantiates a new SigstoreBundle0_dsseEnvelope_signatures and sets the default values. +func NewSigstoreBundle0_dsseEnvelope_signatures()(*SigstoreBundle0_dsseEnvelope_signatures) { + m := &SigstoreBundle0_dsseEnvelope_signatures{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_dsseEnvelope_signaturesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_dsseEnvelope_signaturesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_dsseEnvelope_signatures(), 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 *SigstoreBundle0_dsseEnvelope_signatures) 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 *SigstoreBundle0_dsseEnvelope_signatures) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["keyid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyid(val) + } + return nil + } + res["sig"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSig(val) + } + return nil + } + return res +} +// GetKeyid gets the keyid property value. The keyid property +// returns a *string when successful +func (m *SigstoreBundle0_dsseEnvelope_signatures) GetKeyid()(*string) { + return m.keyid +} +// GetSig gets the sig property value. The sig property +// returns a *string when successful +func (m *SigstoreBundle0_dsseEnvelope_signatures) GetSig()(*string) { + return m.sig +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_dsseEnvelope_signatures) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("keyid", m.GetKeyid()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sig", m.GetSig()) + 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 *SigstoreBundle0_dsseEnvelope_signatures) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKeyid sets the keyid property value. The keyid property +func (m *SigstoreBundle0_dsseEnvelope_signatures) SetKeyid(value *string)() { + m.keyid = value +} +// SetSig sets the sig property value. The sig property +func (m *SigstoreBundle0_dsseEnvelope_signatures) SetSig(value *string)() { + m.sig = value +} +type SigstoreBundle0_dsseEnvelope_signaturesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKeyid()(*string) + GetSig()(*string) + SetKeyid(value *string)() + SetSig(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material.go b/pkg/github/models/sigstore_bundle0_verification_material.go new file mode 100644 index 00000000..a80a4265 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial 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 timestampVerificationData property + timestampVerificationData *string + // The tlogEntries property + tlogEntries []SigstoreBundle0_verificationMaterial_tlogEntriesable + // The x509CertificateChain property + x509CertificateChain SigstoreBundle0_verificationMaterial_x509CertificateChainable +} +// NewSigstoreBundle0_verificationMaterial instantiates a new SigstoreBundle0_verificationMaterial and sets the default values. +func NewSigstoreBundle0_verificationMaterial()(*SigstoreBundle0_verificationMaterial) { + m := &SigstoreBundle0_verificationMaterial{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial(), 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 *SigstoreBundle0_verificationMaterial) 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 *SigstoreBundle0_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["timestampVerificationData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimestampVerificationData(val) + } + return nil + } + res["tlogEntries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSigstoreBundle0_verificationMaterial_tlogEntriesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SigstoreBundle0_verificationMaterial_tlogEntriesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SigstoreBundle0_verificationMaterial_tlogEntriesable) + } + } + m.SetTlogEntries(res) + } + return nil + } + res["x509CertificateChain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_x509CertificateChainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetX509CertificateChain(val.(SigstoreBundle0_verificationMaterial_x509CertificateChainable)) + } + return nil + } + return res +} +// GetTimestampVerificationData gets the timestampVerificationData property value. The timestampVerificationData property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial) GetTimestampVerificationData()(*string) { + return m.timestampVerificationData +} +// GetTlogEntries gets the tlogEntries property value. The tlogEntries property +// returns a []SigstoreBundle0_verificationMaterial_tlogEntriesable when successful +func (m *SigstoreBundle0_verificationMaterial) GetTlogEntries()([]SigstoreBundle0_verificationMaterial_tlogEntriesable) { + return m.tlogEntries +} +// GetX509CertificateChain gets the x509CertificateChain property value. The x509CertificateChain property +// returns a SigstoreBundle0_verificationMaterial_x509CertificateChainable when successful +func (m *SigstoreBundle0_verificationMaterial) GetX509CertificateChain()(SigstoreBundle0_verificationMaterial_x509CertificateChainable) { + return m.x509CertificateChain +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("timestampVerificationData", m.GetTimestampVerificationData()) + if err != nil { + return err + } + } + if m.GetTlogEntries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTlogEntries())) + for i, v := range m.GetTlogEntries() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("tlogEntries", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("x509CertificateChain", m.GetX509CertificateChain()) + 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 *SigstoreBundle0_verificationMaterial) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetTimestampVerificationData sets the timestampVerificationData property value. The timestampVerificationData property +func (m *SigstoreBundle0_verificationMaterial) SetTimestampVerificationData(value *string)() { + m.timestampVerificationData = value +} +// SetTlogEntries sets the tlogEntries property value. The tlogEntries property +func (m *SigstoreBundle0_verificationMaterial) SetTlogEntries(value []SigstoreBundle0_verificationMaterial_tlogEntriesable)() { + m.tlogEntries = value +} +// SetX509CertificateChain sets the x509CertificateChain property value. The x509CertificateChain property +func (m *SigstoreBundle0_verificationMaterial) SetX509CertificateChain(value SigstoreBundle0_verificationMaterial_x509CertificateChainable)() { + m.x509CertificateChain = value +} +type SigstoreBundle0_verificationMaterialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTimestampVerificationData()(*string) + GetTlogEntries()([]SigstoreBundle0_verificationMaterial_tlogEntriesable) + GetX509CertificateChain()(SigstoreBundle0_verificationMaterial_x509CertificateChainable) + SetTimestampVerificationData(value *string)() + SetTlogEntries(value []SigstoreBundle0_verificationMaterial_tlogEntriesable)() + SetX509CertificateChain(value SigstoreBundle0_verificationMaterial_x509CertificateChainable)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries.go b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries.go new file mode 100644 index 00000000..c406172d --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_tlogEntries 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 canonicalizedBody property + canonicalizedBody *string + // The inclusionPromise property + inclusionPromise SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable + // The inclusionProof property + inclusionProof *string + // The integratedTime property + integratedTime *string + // The kindVersion property + kindVersion SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable + // The logId property + logId SigstoreBundle0_verificationMaterial_tlogEntries_logIdable + // The logIndex property + logIndex *string +} +// NewSigstoreBundle0_verificationMaterial_tlogEntries instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries and sets the default values. +func NewSigstoreBundle0_verificationMaterial_tlogEntries()(*SigstoreBundle0_verificationMaterial_tlogEntries) { + m := &SigstoreBundle0_verificationMaterial_tlogEntries{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_tlogEntriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_tlogEntriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_tlogEntries(), 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 *SigstoreBundle0_verificationMaterial_tlogEntries) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCanonicalizedBody gets the canonicalizedBody property value. The canonicalizedBody property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetCanonicalizedBody()(*string) { + return m.canonicalizedBody +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["canonicalizedBody"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCanonicalizedBody(val) + } + return nil + } + res["inclusionPromise"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInclusionPromise(val.(SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable)) + } + return nil + } + res["inclusionProof"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInclusionProof(val) + } + return nil + } + res["integratedTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIntegratedTime(val) + } + return nil + } + res["kindVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_tlogEntries_kindVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetKindVersion(val.(SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable)) + } + return nil + } + res["logId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigstoreBundle0_verificationMaterial_tlogEntries_logIdFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLogId(val.(SigstoreBundle0_verificationMaterial_tlogEntries_logIdable)) + } + return nil + } + res["logIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogIndex(val) + } + return nil + } + return res +} +// GetInclusionPromise gets the inclusionPromise property value. The inclusionPromise property +// returns a SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetInclusionPromise()(SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable) { + return m.inclusionPromise +} +// GetInclusionProof gets the inclusionProof property value. The inclusionProof property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetInclusionProof()(*string) { + return m.inclusionProof +} +// GetIntegratedTime gets the integratedTime property value. The integratedTime property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetIntegratedTime()(*string) { + return m.integratedTime +} +// GetKindVersion gets the kindVersion property value. The kindVersion property +// returns a SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetKindVersion()(SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable) { + return m.kindVersion +} +// GetLogId gets the logId property value. The logId property +// returns a SigstoreBundle0_verificationMaterial_tlogEntries_logIdable when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetLogId()(SigstoreBundle0_verificationMaterial_tlogEntries_logIdable) { + return m.logId +} +// GetLogIndex gets the logIndex property value. The logIndex property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) GetLogIndex()(*string) { + return m.logIndex +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("canonicalizedBody", m.GetCanonicalizedBody()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("inclusionPromise", m.GetInclusionPromise()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("inclusionProof", m.GetInclusionProof()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("integratedTime", m.GetIntegratedTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("kindVersion", m.GetKindVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("logId", m.GetLogId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("logIndex", m.GetLogIndex()) + 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 *SigstoreBundle0_verificationMaterial_tlogEntries) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCanonicalizedBody sets the canonicalizedBody property value. The canonicalizedBody property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetCanonicalizedBody(value *string)() { + m.canonicalizedBody = value +} +// SetInclusionPromise sets the inclusionPromise property value. The inclusionPromise property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetInclusionPromise(value SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable)() { + m.inclusionPromise = value +} +// SetInclusionProof sets the inclusionProof property value. The inclusionProof property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetInclusionProof(value *string)() { + m.inclusionProof = value +} +// SetIntegratedTime sets the integratedTime property value. The integratedTime property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetIntegratedTime(value *string)() { + m.integratedTime = value +} +// SetKindVersion sets the kindVersion property value. The kindVersion property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetKindVersion(value SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable)() { + m.kindVersion = value +} +// SetLogId sets the logId property value. The logId property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetLogId(value SigstoreBundle0_verificationMaterial_tlogEntries_logIdable)() { + m.logId = value +} +// SetLogIndex sets the logIndex property value. The logIndex property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries) SetLogIndex(value *string)() { + m.logIndex = value +} +type SigstoreBundle0_verificationMaterial_tlogEntriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanonicalizedBody()(*string) + GetInclusionPromise()(SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable) + GetInclusionProof()(*string) + GetIntegratedTime()(*string) + GetKindVersion()(SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable) + GetLogId()(SigstoreBundle0_verificationMaterial_tlogEntries_logIdable) + GetLogIndex()(*string) + SetCanonicalizedBody(value *string)() + SetInclusionPromise(value SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable)() + SetInclusionProof(value *string)() + SetIntegratedTime(value *string)() + SetKindVersion(value SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable)() + SetLogId(value SigstoreBundle0_verificationMaterial_tlogEntries_logIdable)() + SetLogIndex(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_inclusion_promise.go b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_inclusion_promise.go new file mode 100644 index 00000000..f10a0221 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_inclusion_promise.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise 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 signedEntryTimestamp property + signedEntryTimestamp *string +} +// NewSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise and sets the default values. +func NewSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise()(*SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) { + m := &SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise(), 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 *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) 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 *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["signedEntryTimestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignedEntryTimestamp(val) + } + return nil + } + return res +} +// GetSignedEntryTimestamp gets the signedEntryTimestamp property value. The signedEntryTimestamp property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) GetSignedEntryTimestamp()(*string) { + return m.signedEntryTimestamp +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("signedEntryTimestamp", m.GetSignedEntryTimestamp()) + 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 *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetSignedEntryTimestamp sets the signedEntryTimestamp property value. The signedEntryTimestamp property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromise) SetSignedEntryTimestamp(value *string)() { + m.signedEntryTimestamp = value +} +type SigstoreBundle0_verificationMaterial_tlogEntries_inclusionPromiseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSignedEntryTimestamp()(*string) + SetSignedEntryTimestamp(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_kind_version.go b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_kind_version.go new file mode 100644 index 00000000..9715e6a9 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_kind_version.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion 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 kind property + kind *string + // The version property + version *string +} +// NewSigstoreBundle0_verificationMaterial_tlogEntries_kindVersion instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion and sets the default values. +func NewSigstoreBundle0_verificationMaterial_tlogEntries_kindVersion()(*SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) { + m := &SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_tlogEntries_kindVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_tlogEntries_kindVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_tlogEntries_kindVersion(), 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 *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) 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 *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["kind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKind(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetKind gets the kind property value. The kind property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetKind()(*string) { + return m.kind +} +// GetVersion gets the version property value. The version property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("kind", m.GetKind()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + 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 *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKind sets the kind property value. The kind property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) SetKind(value *string)() { + m.kind = value +} +// SetVersion sets the version property value. The version property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_kindVersion) SetVersion(value *string)() { + m.version = value +} +type SigstoreBundle0_verificationMaterial_tlogEntries_kindVersionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKind()(*string) + GetVersion()(*string) + SetKind(value *string)() + SetVersion(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_log_id.go b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_log_id.go new file mode 100644 index 00000000..a7884c68 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_tlog_entries_log_id.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_tlogEntries_logId 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 keyId property + keyId *string +} +// NewSigstoreBundle0_verificationMaterial_tlogEntries_logId instantiates a new SigstoreBundle0_verificationMaterial_tlogEntries_logId and sets the default values. +func NewSigstoreBundle0_verificationMaterial_tlogEntries_logId()(*SigstoreBundle0_verificationMaterial_tlogEntries_logId) { + m := &SigstoreBundle0_verificationMaterial_tlogEntries_logId{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_tlogEntries_logIdFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_tlogEntries_logIdFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_tlogEntries_logId(), 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 *SigstoreBundle0_verificationMaterial_tlogEntries_logId) 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 *SigstoreBundle0_verificationMaterial_tlogEntries_logId) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["keyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + return res +} +// GetKeyId gets the keyId property value. The keyId property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) GetKeyId()(*string) { + return m.keyId +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("keyId", m.GetKeyId()) + 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 *SigstoreBundle0_verificationMaterial_tlogEntries_logId) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetKeyId sets the keyId property value. The keyId property +func (m *SigstoreBundle0_verificationMaterial_tlogEntries_logId) SetKeyId(value *string)() { + m.keyId = value +} +type SigstoreBundle0_verificationMaterial_tlogEntries_logIdable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKeyId()(*string) + SetKeyId(value *string)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain.go b/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain.go new file mode 100644 index 00000000..37447097 --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain.go @@ -0,0 +1,92 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_x509CertificateChain 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 certificates property + certificates []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable +} +// NewSigstoreBundle0_verificationMaterial_x509CertificateChain instantiates a new SigstoreBundle0_verificationMaterial_x509CertificateChain and sets the default values. +func NewSigstoreBundle0_verificationMaterial_x509CertificateChain()(*SigstoreBundle0_verificationMaterial_x509CertificateChain) { + m := &SigstoreBundle0_verificationMaterial_x509CertificateChain{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_x509CertificateChainFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_x509CertificateChainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_x509CertificateChain(), 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetCertificates gets the certificates property value. The certificates property +// returns a []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable when successful +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) GetCertificates()([]SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable) { + return m.certificates +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["certificates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable) + } + } + m.SetCertificates(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCertificates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCertificates())) + for i, v := range m.GetCertificates() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("certificates", 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetCertificates sets the certificates property value. The certificates property +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain) SetCertificates(value []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable)() { + m.certificates = value +} +type SigstoreBundle0_verificationMaterial_x509CertificateChainable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificates()([]SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable) + SetCertificates(value []SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable)() +} diff --git a/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain_certificates.go b/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain_certificates.go new file mode 100644 index 00000000..101c4a6c --- /dev/null +++ b/pkg/github/models/sigstore_bundle0_verification_material_x509_certificate_chain_certificates.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates 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 rawBytes property + rawBytes *string +} +// NewSigstoreBundle0_verificationMaterial_x509CertificateChain_certificates instantiates a new SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates and sets the default values. +func NewSigstoreBundle0_verificationMaterial_x509CertificateChain_certificates()(*SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) { + m := &SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateSigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateSigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSigstoreBundle0_verificationMaterial_x509CertificateChain_certificates(), 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["rawBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRawBytes(val) + } + return nil + } + return res +} +// GetRawBytes gets the rawBytes property value. The rawBytes property +// returns a *string when successful +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) GetRawBytes()(*string) { + return m.rawBytes +} +// Serialize serializes information the current object +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("rawBytes", m.GetRawBytes()) + 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 *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetRawBytes sets the rawBytes property value. The rawBytes property +func (m *SigstoreBundle0_verificationMaterial_x509CertificateChain_certificates) SetRawBytes(value *string)() { + m.rawBytes = value +} +type SigstoreBundle0_verificationMaterial_x509CertificateChain_certificatesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRawBytes()(*string) + SetRawBytes(value *string)() +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response.go new file mode 100644 index 00000000..1f5322d1 --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response.go @@ -0,0 +1,92 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse 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 attestations property + attestations []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable +} +// NewItemAttestationsItemWithSubject_digestGetResponse instantiates a new ItemAttestationsItemWithSubject_digestGetResponse and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse()(*ItemAttestationsItemWithSubject_digestGetResponse) { + m := &ItemAttestationsItemWithSubject_digestGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse(), 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 *ItemAttestationsItemWithSubject_digestGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttestations gets the attestations property value. The attestations property +// returns a []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetAttestations()([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) { + return m.attestations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attestations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + } + } + m.SetAttestations(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttestations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttestations())) + for i, v := range m.GetAttestations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attestations", 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 *ItemAttestationsItemWithSubject_digestGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttestations sets the attestations property value. The attestations property +func (m *ItemAttestationsItemWithSubject_digestGetResponse) SetAttestations(value []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() { + m.attestations = value +} +type ItemAttestationsItemWithSubject_digestGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttestations()([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + SetAttestations(value []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations.go new file mode 100644 index 00000000..ab001233 --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations.go @@ -0,0 +1,109 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations 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 attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + bundle ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable + // The repository_id property + repository_id *int32 +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations(), 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBundle gets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +// returns a ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetBundle()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) { + return m.bundle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBundle(val.(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + return res +} +// GetRepositoryId gets the repository_id property value. The repository_id property +// returns a *int32 when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetRepositoryId()(*int32) { + return m.repository_id +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bundle", m.GetBundle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBundle sets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetBundle(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() { + m.bundle = value +} +// SetRepositoryId sets the repository_id property value. The repository_id property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetRepositoryId(value *int32)() { + m.repository_id = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundle()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) + GetRepositoryId()(*int32) + SetBundle(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() + SetRepositoryId(value *int32)() +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle.go new file mode 100644 index 00000000..44f79a7a --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle.go @@ -0,0 +1,139 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle the attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle 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 dsseEnvelope property + dsseEnvelope ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable + // The mediaType property + mediaType *string + // The verificationMaterial property + verificationMaterial ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle(), 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property +// returns a ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetDsseEnvelope()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) { + return m.dsseEnvelope +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDsseEnvelope(val.(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerificationMaterial(val.(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +// returns a *string when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetMediaType()(*string) { + return m.mediaType +} +// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property +// returns a ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetVerificationMaterial()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) { + return m.verificationMaterial +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetDsseEnvelope(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() { + m.dsseEnvelope = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetMediaType(value *string)() { + m.mediaType = value +} +// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetVerificationMaterial(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() { + m.verificationMaterial = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDsseEnvelope()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) + GetMediaType()(*string) + GetVerificationMaterial()(ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) + SetDsseEnvelope(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() + SetMediaType(value *string)() + SetVerificationMaterial(value ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go new file mode 100644 index 00000000..c2d6e083 --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope(), 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go new file mode 100644 index 00000000..ca19f71a --- /dev/null +++ b/pkg/github/orgs/item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go @@ -0,0 +1,51 @@ +package orgs + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial(), 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/orgs/item_attestations_request_builder.go b/pkg/github/orgs/item_attestations_request_builder.go new file mode 100644 index 00000000..c736e5f0 --- /dev/null +++ b/pkg/github/orgs/item_attestations_request_builder.go @@ -0,0 +1,35 @@ +package orgs + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemAttestationsRequestBuilder builds and executes requests for operations under \orgs\{org}\attestations +type ItemAttestationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BySubject_digest gets an item from the github.com/octokit/go-sdk/pkg/github.orgs.item.attestations.item collection +// returns a *ItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemAttestationsRequestBuilder) BySubject_digest(subject_digest string)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if subject_digest != "" { + urlTplParams["subject_digest"] = subject_digest + } + return NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemAttestationsRequestBuilderInternal instantiates a new ItemAttestationsRequestBuilder and sets the default values. +func NewItemAttestationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsRequestBuilder) { + m := &ItemAttestationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/attestations", pathParameters), + } + return m +} +// NewItemAttestationsRequestBuilder instantiates a new ItemAttestationsRequestBuilder and sets the default values. +func NewItemAttestationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAttestationsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/orgs/item_attestations_with_subject_digest_item_request_builder.go b/pkg/github/orgs/item_attestations_with_subject_digest_item_request_builder.go new file mode 100644 index 00000000..cdfa8f16 --- /dev/null +++ b/pkg/github/orgs/item_attestations_with_subject_digest_item_request_builder.go @@ -0,0 +1,65 @@ +package orgs + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemAttestationsWithSubject_digestItemRequestBuilder builds and executes requests for operations under \orgs\{org}\attestations\{subject_digest} +type ItemAttestationsWithSubject_digestItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters list a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +type ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. 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)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. 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)." + Before *string `uriparametername:"before"` + // 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"` +} +// NewItemAttestationsWithSubject_digestItemRequestBuilderInternal instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + m := &ItemAttestationsWithSubject_digestItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/orgs/{org}/attestations/{subject_digest}{?after*,before*,per_page*}", pathParameters), + } + return m +} +// NewItemAttestationsWithSubject_digestItemRequestBuilder instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a ItemAttestationsItemWithSubject_digestGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/orgs/orgs#list-attestations +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(ItemAttestationsItemWithSubject_digestGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemAttestationsItemWithSubject_digestGetResponseable), nil +} +// ToGetRequestInformation list a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a *RequestInformation when successful +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(*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 *ItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) WithUrl(rawUrl string)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + return NewItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/orgs/with_org_item_request_builder.go b/pkg/github/orgs/with_org_item_request_builder.go index 68556a44..85556863 100644 --- a/pkg/github/orgs/with_org_item_request_builder.go +++ b/pkg/github/orgs/with_org_item_request_builder.go @@ -15,6 +15,11 @@ type WithOrgItemRequestBuilder struct { func (m *WithOrgItemRequestBuilder) Actions()(*ItemActionsRequestBuilder) { return NewItemActionsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Attestations the attestations property +// returns a *ItemAttestationsRequestBuilder when successful +func (m *WithOrgItemRequestBuilder) Attestations()(*ItemAttestationsRequestBuilder) { + return NewItemAttestationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Blocks the blocks property // returns a *ItemBlocksRequestBuilder when successful func (m *WithOrgItemRequestBuilder) Blocks()(*ItemBlocksRequestBuilder) { diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response.go new file mode 100644 index 00000000..820ff3a2 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response.go @@ -0,0 +1,92 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsItemWithSubject_digestGetResponse 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 attestations property + attestations []ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse()(*ItemItemAttestationsItemWithSubject_digestGetResponse) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse(), 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 *ItemItemAttestationsItemWithSubject_digestGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttestations gets the attestations property value. The attestations property +// returns a []ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) GetAttestations()([]ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable) { + return m.attestations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attestations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + } + } + m.SetAttestations(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttestations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttestations())) + for i, v := range m.GetAttestations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attestations", 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 *ItemItemAttestationsItemWithSubject_digestGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttestations sets the attestations property value. The attestations property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse) SetAttestations(value []ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() { + m.attestations = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttestations()([]ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + SetAttestations(value []ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() +} diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations.go new file mode 100644 index 00000000..71b36e3b --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations.go @@ -0,0 +1,109 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations 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 attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + bundle ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable + // The repository_id property + repository_id *int32 +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse_attestations and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations()(*ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse_attestations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations(), 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBundle gets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +// returns a ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) GetBundle()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) { + return m.bundle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBundle(val.(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + return res +} +// GetRepositoryId gets the repository_id property value. The repository_id property +// returns a *int32 when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) GetRepositoryId()(*int32) { + return m.repository_id +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bundle", m.GetBundle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBundle sets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) SetBundle(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() { + m.bundle = value +} +// SetRepositoryId sets the repository_id property value. The repository_id property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations) SetRepositoryId(value *int32)() { + m.repository_id = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundle()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable) + GetRepositoryId()(*int32) + SetBundle(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable)() + SetRepositoryId(value *int32)() +} diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle.go new file mode 100644 index 00000000..608b20c5 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle.go @@ -0,0 +1,139 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle the attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle 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 dsseEnvelope property + dsseEnvelope ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable + // The mediaType property + mediaType *string + // The verificationMaterial property + verificationMaterial ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle()(*ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle(), 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property +// returns a ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetDsseEnvelope()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) { + return m.dsseEnvelope +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDsseEnvelope(val.(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerificationMaterial(val.(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +// returns a *string when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetMediaType()(*string) { + return m.mediaType +} +// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property +// returns a ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable when successful +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) GetVerificationMaterial()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) { + return m.verificationMaterial +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) + 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetDsseEnvelope(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() { + m.dsseEnvelope = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetMediaType(value *string)() { + m.mediaType = value +} +// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle) SetVerificationMaterial(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() { + m.verificationMaterial = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDsseEnvelope()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable) + GetMediaType()(*string) + GetVerificationMaterial()(ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable) + SetDsseEnvelope(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable)() + SetMediaType(value *string)() + SetVerificationMaterial(value ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable)() +} diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go new file mode 100644 index 00000000..d482d9ab --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_dsse_envelope.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope()(*ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope(), 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_dsseEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go new file mode 100644 index 00000000..a526c65c --- /dev/null +++ b/pkg/github/repos/item_item_attestations_item_with_subject_digest_get_response_attestations_bundle_verification_material.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial instantiates a new ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial and sets the default values. +func NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial()(*ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) { + m := &ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial(), 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterial) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemAttestationsItemWithSubject_digestGetResponse_attestations_bundle_verificationMaterialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_attestations_post_request_body.go b/pkg/github/repos/item_item_attestations_post_request_body.go new file mode 100644 index 00000000..988c2702 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_request_body.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsPostRequestBody 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 attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. + bundle ItemItemAttestationsPostRequestBody_bundleable +} +// NewItemItemAttestationsPostRequestBody instantiates a new ItemItemAttestationsPostRequestBody and sets the default values. +func NewItemItemAttestationsPostRequestBody()(*ItemItemAttestationsPostRequestBody) { + m := &ItemItemAttestationsPostRequestBody{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostRequestBody(), 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 *ItemItemAttestationsPostRequestBody) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBundle gets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +// returns a ItemItemAttestationsPostRequestBody_bundleable when successful +func (m *ItemItemAttestationsPostRequestBody) GetBundle()(ItemItemAttestationsPostRequestBody_bundleable) { + return m.bundle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsPostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsPostRequestBody_bundleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBundle(val.(ItemItemAttestationsPostRequestBody_bundleable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bundle", m.GetBundle()) + 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 *ItemItemAttestationsPostRequestBody) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBundle sets the bundle property value. The attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +func (m *ItemItemAttestationsPostRequestBody) SetBundle(value ItemItemAttestationsPostRequestBody_bundleable)() { + m.bundle = value +} +type ItemItemAttestationsPostRequestBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundle()(ItemItemAttestationsPostRequestBody_bundleable) + SetBundle(value ItemItemAttestationsPostRequestBody_bundleable)() +} diff --git a/pkg/github/repos/item_item_attestations_post_request_body_bundle.go b/pkg/github/repos/item_item_attestations_post_request_body_bundle.go new file mode 100644 index 00000000..2ff5fd5e --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_request_body_bundle.go @@ -0,0 +1,139 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemItemAttestationsPostRequestBody_bundle the attestation's Sigstore Bundle.Refer to the [Sigstore Bundle Specification](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) for more information. +type ItemItemAttestationsPostRequestBody_bundle 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 dsseEnvelope property + dsseEnvelope ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable + // The mediaType property + mediaType *string + // The verificationMaterial property + verificationMaterial ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable +} +// NewItemItemAttestationsPostRequestBody_bundle instantiates a new ItemItemAttestationsPostRequestBody_bundle and sets the default values. +func NewItemItemAttestationsPostRequestBody_bundle()(*ItemItemAttestationsPostRequestBody_bundle) { + m := &ItemItemAttestationsPostRequestBody_bundle{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostRequestBody_bundleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostRequestBody_bundleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostRequestBody_bundle(), 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 *ItemItemAttestationsPostRequestBody_bundle) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetDsseEnvelope gets the dsseEnvelope property value. The dsseEnvelope property +// returns a ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable when successful +func (m *ItemItemAttestationsPostRequestBody_bundle) GetDsseEnvelope()(ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable) { + return m.dsseEnvelope +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemItemAttestationsPostRequestBody_bundle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dsseEnvelope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDsseEnvelope(val.(ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable)) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["verificationMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemItemAttestationsPostRequestBody_bundle_verificationMaterialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerificationMaterial(val.(ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable)) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +// returns a *string when successful +func (m *ItemItemAttestationsPostRequestBody_bundle) GetMediaType()(*string) { + return m.mediaType +} +// GetVerificationMaterial gets the verificationMaterial property value. The verificationMaterial property +// returns a ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable when successful +func (m *ItemItemAttestationsPostRequestBody_bundle) GetVerificationMaterial()(ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable) { + return m.verificationMaterial +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostRequestBody_bundle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("dsseEnvelope", m.GetDsseEnvelope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verificationMaterial", m.GetVerificationMaterial()) + 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 *ItemItemAttestationsPostRequestBody_bundle) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetDsseEnvelope sets the dsseEnvelope property value. The dsseEnvelope property +func (m *ItemItemAttestationsPostRequestBody_bundle) SetDsseEnvelope(value ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable)() { + m.dsseEnvelope = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *ItemItemAttestationsPostRequestBody_bundle) SetMediaType(value *string)() { + m.mediaType = value +} +// SetVerificationMaterial sets the verificationMaterial property value. The verificationMaterial property +func (m *ItemItemAttestationsPostRequestBody_bundle) SetVerificationMaterial(value ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable)() { + m.verificationMaterial = value +} +type ItemItemAttestationsPostRequestBody_bundleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDsseEnvelope()(ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable) + GetMediaType()(*string) + GetVerificationMaterial()(ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable) + SetDsseEnvelope(value ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable)() + SetMediaType(value *string)() + SetVerificationMaterial(value ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable)() +} diff --git a/pkg/github/repos/item_item_attestations_post_request_body_bundle_dsse_envelope.go b/pkg/github/repos/item_item_attestations_post_request_body_bundle_dsse_envelope.go new file mode 100644 index 00000000..87a4c25b --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_request_body_bundle_dsse_envelope.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemAttestationsPostRequestBody_bundle_dsseEnvelope instantiates a new ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope and sets the default values. +func NewItemItemAttestationsPostRequestBody_bundle_dsseEnvelope()(*ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) { + m := &ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostRequestBody_bundle_dsseEnvelope(), 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 *ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) 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 *ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemItemAttestationsPostRequestBody_bundle_dsseEnvelope) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemAttestationsPostRequestBody_bundle_dsseEnvelopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_attestations_post_request_body_bundle_verification_material.go b/pkg/github/repos/item_item_attestations_post_request_body_bundle_verification_material.go new file mode 100644 index 00000000..dcc88ced --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_request_body_bundle_verification_material.go @@ -0,0 +1,51 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsPostRequestBody_bundle_verificationMaterial struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any +} +// NewItemItemAttestationsPostRequestBody_bundle_verificationMaterial instantiates a new ItemItemAttestationsPostRequestBody_bundle_verificationMaterial and sets the default values. +func NewItemItemAttestationsPostRequestBody_bundle_verificationMaterial()(*ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) { + m := &ItemItemAttestationsPostRequestBody_bundle_verificationMaterial{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostRequestBody_bundle_verificationMaterialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostRequestBody_bundle_verificationMaterialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostRequestBody_bundle_verificationMaterial(), 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 *ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) 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 *ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + return res +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + 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 *ItemItemAttestationsPostRequestBody_bundle_verificationMaterial) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +type ItemItemAttestationsPostRequestBody_bundle_verificationMaterialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/pkg/github/repos/item_item_attestations_post_response.go b/pkg/github/repos/item_item_attestations_post_response.go new file mode 100644 index 00000000..e97c4a5a --- /dev/null +++ b/pkg/github/repos/item_item_attestations_post_response.go @@ -0,0 +1,80 @@ +package repos + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemItemAttestationsPostResponse 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 attestation. + id *int32 +} +// NewItemItemAttestationsPostResponse instantiates a new ItemItemAttestationsPostResponse and sets the default values. +func NewItemItemAttestationsPostResponse()(*ItemItemAttestationsPostResponse) { + m := &ItemItemAttestationsPostResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemItemAttestationsPostResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemItemAttestationsPostResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemItemAttestationsPostResponse(), 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 *ItemItemAttestationsPostResponse) 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 *ItemItemAttestationsPostResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the attestation. +// returns a *int32 when successful +func (m *ItemItemAttestationsPostResponse) GetId()(*int32) { + return m.id +} +// Serialize serializes information the current object +func (m *ItemItemAttestationsPostResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + 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 *ItemItemAttestationsPostResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetId sets the id property value. The ID of the attestation. +func (m *ItemItemAttestationsPostResponse) SetId(value *int32)() { + m.id = value +} +type ItemItemAttestationsPostResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + SetId(value *int32)() +} diff --git a/pkg/github/repos/item_item_attestations_request_builder.go b/pkg/github/repos/item_item_attestations_request_builder.go new file mode 100644 index 00000000..7e4a2973 --- /dev/null +++ b/pkg/github/repos/item_item_attestations_request_builder.go @@ -0,0 +1,79 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemItemAttestationsRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\attestations +type ItemItemAttestationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BySubject_digest gets an item from the github.com/octokit/go-sdk/pkg/github.repos.item.item.attestations.item collection +// returns a *ItemItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemItemAttestationsRequestBuilder) BySubject_digest(subject_digest string)(*ItemItemAttestationsWithSubject_digestItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if subject_digest != "" { + urlTplParams["subject_digest"] = subject_digest + } + return NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemItemAttestationsRequestBuilderInternal instantiates a new ItemItemAttestationsRequestBuilder and sets the default values. +func NewItemItemAttestationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAttestationsRequestBuilder) { + m := &ItemItemAttestationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations", pathParameters), + } + return m +} +// NewItemItemAttestationsRequestBuilder instantiates a new ItemItemAttestationsRequestBuilder and sets the default values. +func NewItemItemAttestationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAttestationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemAttestationsRequestBuilderInternal(urlParams, requestAdapter) +} +// Post store an artifact attestation and associate it with a repository.The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required.Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a ItemItemAttestationsPostResponseable when successful +// returns a BasicError error when the service returns a 403 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/repos/repos#create-an-attestation +func (m *ItemItemAttestationsRequestBuilder) Post(ctx context.Context, body ItemItemAttestationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(ItemItemAttestationsPostResponseable, error) { + requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "403": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + "422": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateValidationErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemAttestationsPostResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemAttestationsPostResponseable), nil +} +// ToPostRequestInformation store an artifact attestation and associate it with a repository.The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required.Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a *RequestInformation when successful +func (m *ItemItemAttestationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body ItemItemAttestationsPostRequestBodyable, 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 *ItemItemAttestationsRequestBuilder when successful +func (m *ItemItemAttestationsRequestBuilder) WithUrl(rawUrl string)(*ItemItemAttestationsRequestBuilder) { + return NewItemItemAttestationsRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_item_attestations_with_subject_digest_item_request_builder.go b/pkg/github/repos/item_item_attestations_with_subject_digest_item_request_builder.go new file mode 100644 index 00000000..f74c474a --- /dev/null +++ b/pkg/github/repos/item_item_attestations_with_subject_digest_item_request_builder.go @@ -0,0 +1,65 @@ +package repos + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemItemAttestationsWithSubject_digestItemRequestBuilder builds and executes requests for operations under \repos\{owner-id}\{repo-id}\attestations\{subject_digest} +type ItemItemAttestationsWithSubject_digestItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters list a collection of artifact attestations with a given subject digest that are associated with a repository.The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +type ItemItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. 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)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. 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)." + Before *string `uriparametername:"before"` + // 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"` +} +// NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal instantiates a new ItemItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAttestationsWithSubject_digestItemRequestBuilder) { + m := &ItemItemAttestationsWithSubject_digestItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations/{subject_digest}{?after*,before*,per_page*}", pathParameters), + } + return m +} +// NewItemItemAttestationsWithSubject_digestItemRequestBuilder instantiates a new ItemItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemItemAttestationsWithSubject_digestItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list a collection of artifact attestations with a given subject digest that are associated with a repository.The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a ItemItemAttestationsItemWithSubject_digestGetResponseable when successful +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/repos/repos#list-attestations +func (m *ItemItemAttestationsWithSubject_digestItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(ItemItemAttestationsItemWithSubject_digestGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue, nil) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemItemAttestationsItemWithSubject_digestGetResponseable), nil +} +// ToGetRequestInformation list a collection of artifact attestations with a given subject digest that are associated with a repository.The authenticated user making the request must have read access to the repository. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a *RequestInformation when successful +func (m *ItemItemAttestationsWithSubject_digestItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(*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 *ItemItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemItemAttestationsWithSubject_digestItemRequestBuilder) WithUrl(rawUrl string)(*ItemItemAttestationsWithSubject_digestItemRequestBuilder) { + return NewItemItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/repos/item_repo_item_request_builder.go b/pkg/github/repos/item_repo_item_request_builder.go index 205fe60a..1e2986c6 100644 --- a/pkg/github/repos/item_repo_item_request_builder.go +++ b/pkg/github/repos/item_repo_item_request_builder.go @@ -25,6 +25,11 @@ func (m *ItemRepoItemRequestBuilder) Activity()(*ItemItemActivityRequestBuilder) func (m *ItemRepoItemRequestBuilder) Assignees()(*ItemItemAssigneesRequestBuilder) { return NewItemItemAssigneesRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// Attestations the attestations property +// returns a *ItemItemAttestationsRequestBuilder when successful +func (m *ItemRepoItemRequestBuilder) Attestations()(*ItemItemAttestationsRequestBuilder) { + return NewItemItemAttestationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // Autolinks the autolinks property // returns a *ItemItemAutolinksRequestBuilder when successful func (m *ItemRepoItemRequestBuilder) Autolinks()(*ItemItemAutolinksRequestBuilder) { diff --git a/pkg/github/user/user_request_builder.go b/pkg/github/user/user_request_builder.go index 209dd798..41c2fec8 100644 --- a/pkg/github/user/user_request_builder.go +++ b/pkg/github/user/user_request_builder.go @@ -2,6 +2,7 @@ package user import ( "context" + i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274 "strconv" i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" @@ -99,6 +100,16 @@ type UserGetResponseable interface { func (m *UserRequestBuilder) Blocks()(*BlocksRequestBuilder) { return NewBlocksRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } +// ByAccount_id gets an item from the github.com/octokit/go-sdk/pkg/github.user.item collection +// returns a *WithAccount_ItemRequestBuilder when successful +func (m *UserRequestBuilder) ByAccount_id(account_id int32)(*WithAccount_ItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + urlTplParams["account_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(account_id), 10) + return NewWithAccount_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} // Codespaces the codespaces property // returns a *CodespacesRequestBuilder when successful func (m *UserRequestBuilder) Codespaces()(*CodespacesRequestBuilder) { diff --git a/pkg/github/user/with_account_item_request_builder.go b/pkg/github/user/with_account_item_request_builder.go new file mode 100644 index 00000000..51abed08 --- /dev/null +++ b/pkg/github/user/with_account_item_request_builder.go @@ -0,0 +1,145 @@ +package user + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// WithAccount_ItemRequestBuilder builds and executes requests for operations under \user\{account_id} +type WithAccount_ItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// WithAccount_GetResponse composed type wrapper for classes i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable, i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable +type WithAccount_GetResponse struct { + // Composed type representation for type i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable + privateUser i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable + // Composed type representation for type i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable + publicUser i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable +} +// NewWithAccount_GetResponse instantiates a new WithAccount_GetResponse and sets the default values. +func NewWithAccount_GetResponse()(*WithAccount_GetResponse) { + m := &WithAccount_GetResponse{ + } + return m +} +// CreateWithAccount_GetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateWithAccount_GetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + result := NewWithAccount_GetResponse() + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + } + } + } + return result, nil +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *WithAccount_GetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + return make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) +} +// GetIsComposedType determines if the current object is a wrapper around a composed type +// returns a bool when successful +func (m *WithAccount_GetResponse) GetIsComposedType()(bool) { + return true +} +// GetPrivateUser gets the privateUser property value. Composed type representation for type i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable +// returns a PrivateUserable when successful +func (m *WithAccount_GetResponse) GetPrivateUser()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable) { + return m.privateUser +} +// GetPublicUser gets the publicUser property value. Composed type representation for type i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable +// returns a PublicUserable when successful +func (m *WithAccount_GetResponse) GetPublicUser()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable) { + return m.publicUser +} +// Serialize serializes information the current object +func (m *WithAccount_GetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetPrivateUser() != nil { + err := writer.WriteObjectValue("", m.GetPrivateUser()) + if err != nil { + return err + } + } else if m.GetPublicUser() != nil { + err := writer.WriteObjectValue("", m.GetPublicUser()) + if err != nil { + return err + } + } + return nil +} +// SetPrivateUser sets the privateUser property value. Composed type representation for type i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable +func (m *WithAccount_GetResponse) SetPrivateUser(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable)() { + m.privateUser = value +} +// SetPublicUser sets the publicUser property value. Composed type representation for type i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable +func (m *WithAccount_GetResponse) SetPublicUser(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable)() { + m.publicUser = value +} +type WithAccount_GetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrivateUser()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable) + GetPublicUser()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable) + SetPrivateUser(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable)() + SetPublicUser(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable)() +} +// NewWithAccount_ItemRequestBuilderInternal instantiates a new WithAccount_ItemRequestBuilder and sets the default values. +func NewWithAccount_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithAccount_ItemRequestBuilder) { + m := &WithAccount_ItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/user/{account_id}", pathParameters), + } + return m +} +// NewWithAccount_ItemRequestBuilder instantiates a new WithAccount_ItemRequestBuilder and sets the default values. +func NewWithAccount_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithAccount_ItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewWithAccount_ItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". +// returns a WithAccount_GetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/users/users#get-a-user-using-their-id +func (m *WithAccount_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(WithAccount_GetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateWithAccount_GetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(WithAccount_GetResponseable), nil +} +// ToGetRequestInformation provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". +// returns a *RequestInformation when successful +func (m *WithAccount_ItemRequestBuilder) 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 *WithAccount_ItemRequestBuilder when successful +func (m *WithAccount_ItemRequestBuilder) WithUrl(rawUrl string)(*WithAccount_ItemRequestBuilder) { + return NewWithAccount_ItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/item_attestations_item_with_subject_digest_get_response.go b/pkg/github/users/item_attestations_item_with_subject_digest_get_response.go new file mode 100644 index 00000000..8ede31c8 --- /dev/null +++ b/pkg/github/users/item_attestations_item_with_subject_digest_get_response.go @@ -0,0 +1,92 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +type ItemAttestationsItemWithSubject_digestGetResponse 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 attestations property + attestations []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable +} +// NewItemAttestationsItemWithSubject_digestGetResponse instantiates a new ItemAttestationsItemWithSubject_digestGetResponse and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse()(*ItemAttestationsItemWithSubject_digestGetResponse) { + m := &ItemAttestationsItemWithSubject_digestGetResponse{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse(), 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 *ItemAttestationsItemWithSubject_digestGetResponse) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetAttestations gets the attestations property value. The attestations property +// returns a []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetAttestations()([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) { + return m.attestations +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attestations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable, len(val)) + for i, v := range val { + if v != nil { + res[i] = v.(ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + } + } + m.SetAttestations(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttestations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttestations())) + for i, v := range m.GetAttestations() { + if v != nil { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + } + err := writer.WriteCollectionOfObjectValues("attestations", 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 *ItemAttestationsItemWithSubject_digestGetResponse) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetAttestations sets the attestations property value. The attestations property +func (m *ItemAttestationsItemWithSubject_digestGetResponse) SetAttestations(value []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() { + m.attestations = value +} +type ItemAttestationsItemWithSubject_digestGetResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttestations()([]ItemAttestationsItemWithSubject_digestGetResponse_attestationsable) + SetAttestations(value []ItemAttestationsItemWithSubject_digestGetResponse_attestationsable)() +} diff --git a/pkg/github/users/item_attestations_item_with_subject_digest_get_response_attestations.go b/pkg/github/users/item_attestations_item_with_subject_digest_get_response_attestations.go new file mode 100644 index 00000000..36d436eb --- /dev/null +++ b/pkg/github/users/item_attestations_item_with_subject_digest_get_response_attestations.go @@ -0,0 +1,110 @@ +package users + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +type ItemAttestationsItemWithSubject_digestGetResponse_attestations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // Sigstore Bundle v0.1 + bundle i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able + // The repository_id property + repository_id *int32 +} +// NewItemAttestationsItemWithSubject_digestGetResponse_attestations instantiates a new ItemAttestationsItemWithSubject_digestGetResponse_attestations and sets the default values. +func NewItemAttestationsItemWithSubject_digestGetResponse_attestations()(*ItemAttestationsItemWithSubject_digestGetResponse_attestations) { + m := &ItemAttestationsItemWithSubject_digestGetResponse_attestations{ + } + m.SetAdditionalData(make(map[string]any)) + return m +} +// CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +// returns a Parsable when successful +func CreateItemAttestationsItemWithSubject_digestGetResponse_attestationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttestationsItemWithSubject_digestGetResponse_attestations(), 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetAdditionalData()(map[string]any) { + return m.additionalData +} +// GetBundle gets the bundle property value. Sigstore Bundle v0.1 +// returns a SigstoreBundle0able when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetBundle()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able) { + return m.bundle +} +// GetFieldDeserializers the deserialization information for the current model +// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateSigstoreBundle0FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBundle(val.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able)) + } + return nil + } + res["repository_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRepositoryId(val) + } + return nil + } + return res +} +// GetRepositoryId gets the repository_id property value. The repository_id property +// returns a *int32 when successful +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) GetRepositoryId()(*int32) { + return m.repository_id +} +// Serialize serializes information the current object +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bundle", m.GetBundle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("repository_id", m.GetRepositoryId()) + 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 *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetAdditionalData(value map[string]any)() { + m.additionalData = value +} +// SetBundle sets the bundle property value. Sigstore Bundle v0.1 +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetBundle(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able)() { + m.bundle = value +} +// SetRepositoryId sets the repository_id property value. The repository_id property +func (m *ItemAttestationsItemWithSubject_digestGetResponse_attestations) SetRepositoryId(value *int32)() { + m.repository_id = value +} +type ItemAttestationsItemWithSubject_digestGetResponse_attestationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundle()(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able) + GetRepositoryId()(*int32) + SetBundle(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SigstoreBundle0able)() + SetRepositoryId(value *int32)() +} diff --git a/pkg/github/users/item_attestations_request_builder.go b/pkg/github/users/item_attestations_request_builder.go new file mode 100644 index 00000000..7a4bb2d2 --- /dev/null +++ b/pkg/github/users/item_attestations_request_builder.go @@ -0,0 +1,35 @@ +package users + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// ItemAttestationsRequestBuilder builds and executes requests for operations under \users\{username}\attestations +type ItemAttestationsRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// BySubject_digest gets an item from the github.com/octokit/go-sdk/pkg/github.users.item.attestations.item collection +// returns a *ItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemAttestationsRequestBuilder) BySubject_digest(subject_digest string)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + urlTplParams := make(map[string]string) + for idx, item := range m.BaseRequestBuilder.PathParameters { + urlTplParams[idx] = item + } + if subject_digest != "" { + urlTplParams["subject_digest"] = subject_digest + } + return NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter) +} +// NewItemAttestationsRequestBuilderInternal instantiates a new ItemAttestationsRequestBuilder and sets the default values. +func NewItemAttestationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsRequestBuilder) { + m := &ItemAttestationsRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/attestations", pathParameters), + } + return m +} +// NewItemAttestationsRequestBuilder instantiates a new ItemAttestationsRequestBuilder and sets the default values. +func NewItemAttestationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAttestationsRequestBuilderInternal(urlParams, requestAdapter) +} diff --git a/pkg/github/users/item_attestations_with_subject_digest_item_request_builder.go b/pkg/github/users/item_attestations_with_subject_digest_item_request_builder.go new file mode 100644 index 00000000..8f2924e0 --- /dev/null +++ b/pkg/github/users/item_attestations_with_subject_digest_item_request_builder.go @@ -0,0 +1,70 @@ +package users + +import ( + "context" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6 "github.com/octokit/go-sdk/pkg/github/models" +) + +// ItemAttestationsWithSubject_digestItemRequestBuilder builds and executes requests for operations under \users\{username}\attestations\{subject_digest} +type ItemAttestationsWithSubject_digestItemRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} +// ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters list a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +type ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters struct { + // A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. 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)." + After *string `uriparametername:"after"` + // A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. 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)." + Before *string `uriparametername:"before"` + // 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"` +} +// NewItemAttestationsWithSubject_digestItemRequestBuilderInternal instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + m := &ItemAttestationsWithSubject_digestItemRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/users/{username}/attestations/{subject_digest}{?after*,before*,per_page*}", pathParameters), + } + return m +} +// NewItemAttestationsWithSubject_digestItemRequestBuilder instantiates a new ItemAttestationsWithSubject_digestItemRequestBuilder and sets the default values. +func NewItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewItemAttestationsWithSubject_digestItemRequestBuilderInternal(urlParams, requestAdapter) +} +// Get list a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a ItemAttestationsItemWithSubject_digestGetResponseable when successful +// returns a BasicError error when the service returns a 404 status code +// [API method documentation] +// +// [API method documentation]: https://docs.github.com/rest/users/attestations#list-attestations +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(ItemAttestationsItemWithSubject_digestGetResponseable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings { + "404": i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.CreateBasicErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, CreateItemAttestationsItemWithSubject_digestGetResponseFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(ItemAttestationsItemWithSubject_digestGetResponseable), nil +} +// ToGetRequestInformation list a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user.The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). +// returns a *RequestInformation when successful +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[ItemAttestationsWithSubject_digestItemRequestBuilderGetQueryParameters])(*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 *ItemAttestationsWithSubject_digestItemRequestBuilder when successful +func (m *ItemAttestationsWithSubject_digestItemRequestBuilder) WithUrl(rawUrl string)(*ItemAttestationsWithSubject_digestItemRequestBuilder) { + return NewItemAttestationsWithSubject_digestItemRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); +} diff --git a/pkg/github/users/with_username_item_request_builder.go b/pkg/github/users/with_username_item_request_builder.go index 5d46a3dc..55cad4fa 100644 --- a/pkg/github/users/with_username_item_request_builder.go +++ b/pkg/github/users/with_username_item_request_builder.go @@ -94,6 +94,11 @@ type WithUsernameGetResponseable interface { SetPrivateUser(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PrivateUserable)() SetPublicUser(value i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.PublicUserable)() } +// Attestations the attestations property +// returns a *ItemAttestationsRequestBuilder when successful +func (m *WithUsernameItemRequestBuilder) Attestations()(*ItemAttestationsRequestBuilder) { + return NewItemAttestationsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} // NewWithUsernameItemRequestBuilderInternal instantiates a new WithUsernameItemRequestBuilder and sets the default values. func NewWithUsernameItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*WithUsernameItemRequestBuilder) { m := &WithUsernameItemRequestBuilder{